From ecd95ce97497ddabfdb2c654fd6b169fe3cae819 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Thu, 25 Feb 2021 15:47:13 -0600 Subject: [PATCH 1/5] mpix: add MPI_Info_create_env to mpix.txt This is a new function that should be prefixed with MPIX. Fix fortran bindings and fortran tests to use the MPIX_Info_create_env. --- src/binding/fortran/mpif_h/buildiface | 8 ++++++-- .../fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 | 2 +- src/binding/mpix.txt | 1 + test/mpi/f08/info/infocrenvf90.f90 | 10 +++++----- test/mpi/f77/info/infocrenvf.f | 10 +++++----- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/binding/fortran/mpif_h/buildiface b/src/binding/fortran/mpif_h/buildiface index 6b43d3f335c..bc930472f3b 100755 --- a/src/binding/fortran/mpif_h/buildiface +++ b/src/binding/fortran/mpif_h/buildiface @@ -4701,11 +4701,15 @@ int MPI_Status_c2f( const MPI_Status *c_status, MPI_Fint *f_status ) close ($OUTFD); &ReplaceIfDifferent( $filename, $filename . ".new" ); + # MPI_Info_create_env is from MPI-4, use MPIX prefix + $out_prefix = "mpix_"; + my $uc_prefix = uc($out_prefix); + $OUTFD = "INFOCRENV"; $filename = "infocrenv.c"; open ($OUTFD, ">$filename.new" ) || die "Cannot open $filename.new\n"; $files[$#files+1] = $filename; - &print_header( "mpi_", "MPI_Info_create_env", "info_create_env", "MPI_Fint *" ); + &print_header( $out_prefix, "MPI_Info_create_env", "info_create_env", "MPI_Fint *" ); &print_routine_type_decl( $OUTFD, $out_prefix, "info_create_env" ); $args = "MPI_Fint * v1"; @@ -4714,7 +4718,7 @@ int MPI_Status_c2f( const MPI_Status *c_status, MPI_Fint *f_status ) # Gcc only allows attributes on the prototypes, not the function # definitions print $OUTFD "{\n"; - print $OUTFD " *ierr = MPI_Info_create_env( 0, 0, (MPI_Info *)(v1) );\n"; + print $OUTFD " *ierr = ${uc_prefix}Info_create_env( 0, 0, (MPI_Info *)(v1) );\n"; print $OUTFD "}\n"; close ($OUTFD); &ReplaceIfDifferent( $filename, $filename . ".new" ); diff --git a/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 b/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 index 751455220b3..1590e793e67 100644 --- a/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 +++ b/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 @@ -1630,7 +1630,7 @@ function MPIR_Info_create_c(info) & end function MPIR_Info_create_c function MPIR_Info_create_env_c(info) & - bind(C, name="PMPI_Info_create_env") result(ierror) + bind(C, name="PMPIX_Info_create_env") result(ierror) use, intrinsic :: iso_c_binding, only : c_int use :: mpi_c_interface_types, only : c_Info implicit none diff --git a/src/binding/mpix.txt b/src/binding/mpix.txt index 9b3bc4c944f..b021b18b4a6 100644 --- a/src/binding/mpix.txt +++ b/src/binding/mpix.txt @@ -93,6 +93,7 @@ MPI_Delete_error_class MPI_Delete_error_code MPI_Delete_error_string MPI_Info_get_string +MPI_Info_create_env # mpi.h symbols diff --git a/test/mpi/f08/info/infocrenvf90.f90 b/test/mpi/f08/info/infocrenvf90.f90 index 3eee9b3b65d..910176ae96d 100644 --- a/test/mpi/f08/info/infocrenvf90.f90 +++ b/test/mpi/f08/info/infocrenvf90.f90 @@ -57,24 +57,24 @@ program main ! errs = 0 - call mpi_info_create_env( i1, ierr ) - call mpi_info_create_env( i2, ierr ) + call mpix_info_create_env( i1, ierr ) + call mpix_info_create_env( i2, ierr ) call test_info( i1, i2, errs ) call mpi_info_free( i1, ierr ) - call mpi_info_create_env( i1, ierr ) + call mpix_info_create_env( i1, ierr ) call mpi_init( ierr ) call test_info( i1, i2, errs ) call mpi_info_free( i1, ierr ) - call mpi_info_create_env( i1, ierr ) + call mpix_info_create_env( i1, ierr ) call mpi_finalize( ierr ) call test_info( i1, i2, errs ) call mpi_info_free( i1, ierr ) - call mpi_info_create_env( i1, ierr ) + call mpix_info_create_env( i1, ierr ) call test_info( i1, i2, errs ) call mpi_info_free( i1, ierr ) diff --git a/test/mpi/f77/info/infocrenvf.f b/test/mpi/f77/info/infocrenvf.f index 371e03d2337..dea811cc931 100644 --- a/test/mpi/f77/info/infocrenvf.f +++ b/test/mpi/f77/info/infocrenvf.f @@ -57,24 +57,24 @@ program main C errs = 0 - call mpi_info_create_env( i1, ierr ) - call mpi_info_create_env( i2, ierr ) + call mpix_info_create_env( i1, ierr ) + call mpix_info_create_env( i2, ierr ) call test_info( i1, i2, errs ) call mpi_info_free( i1, ierr ) - call mpi_info_create_env( i1, ierr ) + call mpix_info_create_env( i1, ierr ) call mpi_init( ierr ) call test_info( i1, i2, errs ) call mpi_info_free( i1, ierr ) - call mpi_info_create_env( i1, ierr ) + call mpix_info_create_env( i1, ierr ) call mpi_finalize( ierr ) call test_info( i1, i2, errs ) call mpi_info_free( i1, ierr ) - call mpi_info_create_env( i1, ierr ) + call mpix_info_create_env( i1, ierr ) call test_info( i1, i2, errs ) call mpi_info_free( i1, ierr ) From 4cbc1444ca29ba42017ef9e8811e8e1d15dcb8a0 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Thu, 25 Feb 2021 16:09:09 -0600 Subject: [PATCH 2/5] mpix: add missing new symbols to mpix.txt The new symbols should be defined with MPIX prefix --- src/binding/mpix.txt | 3 +++ src/include/mpi.h.in | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/binding/mpix.txt b/src/binding/mpix.txt index b021b18b4a6..b7dac385a78 100644 --- a/src/binding/mpix.txt +++ b/src/binding/mpix.txt @@ -99,6 +99,9 @@ MPI_Info_create_env MPI_Session MPI_SESSION_NULL +MPI_ERR_SESSION + +MPI_T_ERR_NOT_SUPPORTED MPI_COMM_TYPE_HW_GUIDED MPI_COMM_TYPE_HW_UNGUIDED diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in index b69ae4c3330..eb153338d3e 100644 --- a/src/include/mpi.h.in +++ b/src/include/mpi.h.in @@ -900,9 +900,9 @@ typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *); #define MPI_T_ERR_INVALID_NAME 73 /* Name doesn't match */ #define MPI_T_ERR_INVALID 74 /* Generic error code for MPI_T added in MPI-3.1 */ -#define MPI_ERR_SESSION 75 /* Invalid session handle */ +#define MPIX_ERR_SESSION 75 /* Invalid session handle */ -#define MPI_T_ERR_NOT_SUPPORTED 76 /* Requested functionality not supported */ +#define MPIX_T_ERR_NOT_SUPPORTED 76 /* Requested functionality not supported */ #define MPI_ERR_LASTCODE 0x3fffffff /* Last valid error code for a predefined error class */ From 6d444c00b2fc66edd1ed623886c70f0c6bfe8a40 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Thu, 25 Feb 2021 16:05:36 -0600 Subject: [PATCH 3/5] mpi: do not remove deprecated constant The redefinition changes the value of MPI_T_ERR_INVALID_ITEM from 63 to 62. It is harmless to the leave the constants there. --- src/include/mpi.h.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in index eb153338d3e..98dbbbfba9d 100644 --- a/src/include/mpi.h.in +++ b/src/include/mpi.h.in @@ -884,8 +884,7 @@ typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *); be initialized */ #define MPI_T_ERR_INVALID_INDEX 62 /* The index is invalid or has been deleted */ -#define MPI_T_ERR_INVALID_ITEM MPI_T_ERR_INVALID_INDEX - /* Deprecated. If a queried item index is out of range, +#define MPI_T_ERR_INVALID_ITEM 63 /* Deprecated. If a queried item index is out of range, * MPI-4 will return MPI_T_ERR_INVALID_INDEX instead. */ #define MPI_T_ERR_INVALID_HANDLE 64 /* The handle is invalid */ #define MPI_T_ERR_OUT_OF_HANDLES 65 /* No more handles available */ From 64d927a465b169ce302e192186e236eeb0f70f69 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Thu, 25 Feb 2021 17:31:02 -0600 Subject: [PATCH 4/5] misc: update README.vin Add text to explain the device configure option that may be needed to succeed in configure. --- README.vin | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.vin b/README.vin index a85b31cdd74..7fe995da846 100644 --- a/README.vin +++ b/README.vin @@ -81,7 +81,7 @@ shared memory), Hydra process management) of MPICH up and running. you will have to duplicate it on the other machines after installation. -(d) Configure MPICH specifying the installation directory: +(d) Configure MPICH specifying the installation directory and device: for csh and tcsh: @@ -91,6 +91,20 @@ shared memory), Hydra process management) of MPICH up and running. ./configure --prefix=/home//mpich-install 2>&1 | tee c.txt + The configure will try to determine the best device (the internal + network modules) based on system environment. It will abort when it + can't decide which is the best choice. Supply the device option to + proceed. E.g. + + ./configure --prefix=... --with-device=ch4:ofi |... + + or: + + ./configure --prefix=... --with-device=ch4:ucx |... + + Refer to section below -- Alternate Channels and Devices -- for + more details. + Bourne-like shells, sh and bash, accept "2>&1 |". Csh-like shell, csh and tcsh, accept "|&". If a failure occurs, the configure command will display the error. Most errors are straight-forward From da3ca8a310bb7bc52a7ec611e03a1e689551de76 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Thu, 25 Feb 2021 22:21:33 -0600 Subject: [PATCH 5/5] maint: add --so-version option to release.pl Since we always update the so version string right before we cut the tarball, it is more convenient and robust to add this option to the release script. --- maint/release.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maint/release.pl b/maint/release.pl index 25d4b1e6ae6..38cb137215e 100755 --- a/maint/release.pl +++ b/maint/release.pl @@ -14,6 +14,7 @@ my $arg = 0; my $branch = ""; my $version = ""; +my $so_version = ""; my $append_commit_id; my $root = cwd(); my $with_autoconf = ""; @@ -122,6 +123,7 @@ sub run_cmd GetOptions( "branch=s" => \$branch, "version=s" => \$version, + "so-version=s" => \$so_version, "append-commit-id!" => \$append_commit_id, "with-autoconf" => \$with_autoconf, "with-automake" => \$with_automake, @@ -208,6 +210,10 @@ sub run_cmd my $date = `date`; chomp $date; system(qq(perl -p -i -e 's/\\[MPICH_RELEASE_DATE_m4\\],\\[unreleased development copy\\]/[MPICH_RELEASE_DATE_m4],[$date]/g' ./maint/version.m4)); + +if ($so_version) { + system(qq(perl -p -i -e 's/\\[libmpi_so_version_m4\\],\\[0:0:0\\]/[libmpi_so_version_m4],[$so_version]/g' ./maint/version.m4)); +} # the main version.m4 file will be copied to hydra's version.m4, including the # above modifications print("done\n");