Skip to content

Commit

Permalink
Merge pull request #5089 from hzhou/2102_mpix_fix
Browse files Browse the repository at this point in the history
misc: more preparations for the 4.0a1 release

Approved-by: Ken Raffenetti <[email protected]>
  • Loading branch information
hzhou authored Feb 26, 2021
2 parents aeeeed1 + da3ca8a commit e414249
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 18 deletions.
16 changes: 15 additions & 1 deletion README.vin
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -91,6 +91,20 @@ shared memory), Hydra process management) of MPICH up and running.

./configure --prefix=/home/<USERNAME>/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
Expand Down
6 changes: 6 additions & 0 deletions maint/release.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
my $arg = 0;
my $branch = "";
my $version = "";
my $so_version = "";
my $append_commit_id;
my $root = cwd();
my $with_autoconf = "";
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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");
Expand Down
8 changes: 6 additions & 2 deletions src/binding/fortran/mpif_h/buildiface
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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" );
Expand Down
2 changes: 1 addition & 1 deletion src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/binding/mpix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,15 @@ MPI_Delete_error_class
MPI_Delete_error_code
MPI_Delete_error_string
MPI_Info_get_string
MPI_Info_create_env

# mpi.h symbols

MPI_Session
MPI_SESSION_NULL
MPI_ERR_SESSION

MPI_T_ERR_NOT_SUPPORTED

MPI_COMM_TYPE_HW_GUIDED
MPI_COMM_TYPE_HW_UNGUIDED
7 changes: 3 additions & 4 deletions src/include/mpi.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -900,9 +899,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 */
Expand Down
10 changes: 5 additions & 5 deletions test/mpi/f08/info/infocrenvf90.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
10 changes: 5 additions & 5 deletions test/mpi/f77/info/infocrenvf.f
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit e414249

Please sign in to comment.