Resolving issues with deprecated MPI features

Warning:

This section only applies if you did not include the --enable-mpi1-compatibility flag when building Open MPI version 4.0.1 (see Before you begin).

This section describes how to resolve the issues with deprecated calls, if you have not built Open MPI v4.0.1+ with the --enable-mpi1-compatibility flag.

ScaLAPACK uses the MPI_Type_struct function, which was deprecated in version 2 of the MPI standard and removed entirely from version 3. To replace all occurrences of this obsolete feature, correct the ScaLAPACK source using sed:

sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' ./BLACS/SRC/cgamn2d_.c
sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' ./BLACS/SRC/dgamn2d_.c
sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' ./BLACS/SRC/igamn2d_.c
sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' ./BLACS/SRC/igamx2d_.c
sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' ./BLACS/SRC/sgamn2d_.c
sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' ./BLACS/SRC/sgamx2d_.c
sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' ./BLACS/SRC/zgamn2d_.c
sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' ./BLACS/SRC/zgamx2d_.c

Alternatively, to modify the code, download this scalapack_openmpi4_fix.patch file and apply it:

patch -p1 < scalapack_openmpi4_fix.patch

For details about the features removed in Open MPI 4.0.0+, see Removed MPI constructs on the Open MPI website.

Previous Next