It is important to have the mpi_f08 Type(MPI_Status) be the same
length (in bytes) as the mpif.h status (which is an array of
MPI_STATUS_SIZE INTEGERs). The reason is because MPI_Status_ctof()
basically does the following:
MPI_Fint *f_status = ...;
int *s = (int*) &c_status;
for i=0..sizeof(MPI_Status)/sizeof(int)
f_status[i] = c_status[i];
Meaning: the Fortran status needs to be able to hold as many INTEGERs
are there are C int's that can fit in sizeof(MPI_Status) bytes.
This is because a Fortran INTEGER may be larger than a C int (e.g.,
Fortran 8 bytes vs. C 4 bytes). Hence, the assignment on the Fortran
side will take sizeof(INTEGER) bytes for each sizeof(int) bytes in the
C MPI_Status.
This commit pads out the mpi_f08 Type(MPI_Status) with enough INTEGERs
to make it the same size as an array of MPI_TYPE_SIZE INTEGERs.
Hence, MPI_Status_ctof() will work properly, regardless of whether it
is assinging to an mpi_f08 Type(MPI_Status) or an mpif.h array of
MPI_STATUS_SIZE INTEGERs.
Thanks to @ahaichen for reporting the issue.
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
This PR adds a new configure option: --with-wrapper-cc.
This option allows the user to set the compiler that will
be invoked by mpicc, shmemcc, etc. This allows the user
to build Open MPI with one compiler (a C standards compliant
compiler like clang or gcc) and have the wrapper use
another compiler (icc for example). This allows building
Open MPI with the best available compiler while still
supporting compiling Open MPI for a specific compiler
suite.
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
The "-r" option now concatenates using the rpmbuild_options
variable. The "-r" option in prior versions of buildrpm.sh
concatenated using the configure_options variable, which uses special
delineation for Autoconf options (first word of argument string is
"configure_options"). This resulted in an RPM build failure as the
Autoconf options would contain nested RPM option statements.
Signed-off-by: John K. McIver III <john.mciver.iii@gmail.com>
Since we added the use of git submodules recently, this trivial script
has been helpful to me to "git clean" not only the top-level Open MPI
repo, but also all the included submodules, too.
NOTE: this script does the (harsh) "git clean -dfx" command, which
deletes everything that git does not know about. Use with care!
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
NULL pointer arithmetic is undefined behaviour in c.
The payload_ptr can be NULL in the moment when mpool is not initialized.
References from the c11 standard:
- 6.5.6 Additive operators
- 6.3.2.3 Pointers
Signed-off-by: Christoph Niethammer <niethammer@hlrs.de>
bugfix: provider selection would not differentiate between ipv4
and ipv6 addresses which would cause some nodes to be unable
to communicate between each other. Adding a check for address
format to provider selection to ensure that all nodes use the
same address format.
Signed-off-by: Nikola Dancejic <dancejic@amazon.com>