1
1

Wow. This bug has existed for '''YEARS''' (probably ever since Open

MPI started!).

The FLAG argument to fortran attribute copy functions is a LOGICAL,
meaning that it can only return .TRUE. or .FALSE.  The corresponding C
argument is an int, and the MPI spec says that it must return 1 or 0.
However, in Fortran, .TRUE. is not always necessarily == 1.  So we
need to expand the test to see if it's a Fortran callback.  If so,
check for the Fortran .TRUE. value (not 1).  If it's a C callback,
then check for 1.

This commit was SVN r25965.
Этот коммит содержится в:
Jeff Squyres 2012-02-20 14:39:15 +00:00
родитель 765de087ef
Коммит b10ebf4b2d

Просмотреть файл

@ -946,19 +946,21 @@ int ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object,
so that no comparison is done for prdefined at all and it
just falls off the error checking loop in attr_set */
if (1 == flag) {
if (0 != (hash_value->attr_flag & OMPI_KEYVAL_F77)) {
if (0 != (hash_value->attr_flag & OMPI_KEYVAL_F77_MPI1)) {
new_attr->av_set_from = OMPI_ATTRIBUTE_FORTRAN_MPI1;
} else {
new_attr->av_set_from = OMPI_ATTRIBUTE_FORTRAN_MPI2;
}
if (0 != (hash_value->attr_flag & OMPI_KEYVAL_F77) &&
OMPI_FORTRAN_VALUE_TRUE == flag) {
if (0 != (hash_value->attr_flag & OMPI_KEYVAL_F77_MPI1)) {
new_attr->av_set_from = OMPI_ATTRIBUTE_FORTRAN_MPI1;
} else {
new_attr->av_set_from = OMPI_ATTRIBUTE_C;
new_attr->av_set_from = OMPI_ATTRIBUTE_FORTRAN_MPI2;
}
flag = 1;
} else if (1 == flag) {
new_attr->av_set_from = OMPI_ATTRIBUTE_C;
}
if (1 == flag) {
set_value(type, new_object, &newattr_hash, key,
new_attr, true);
} else {
OBJ_RELEASE(new_attr);
}