From 2095e1b887e9d9186a0adc2234e6ef4df6d084d4 Mon Sep 17 00:00:00 2001 From: "Mark A. Potts" Date: Wed, 5 Feb 2020 17:34:06 -1000 Subject: [PATCH 1/3] fixes problem with MPI_Comm_Split in openmpi when hash is negative --- src/module_NEMS_Rusage.F90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/module_NEMS_Rusage.F90 b/src/module_NEMS_Rusage.F90 index 34c62c47..84ee96c2 100644 --- a/src/module_NEMS_Rusage.F90 +++ b/src/module_NEMS_Rusage.F90 @@ -678,7 +678,7 @@ subroutine color_by_hash(name,namelen,commin,comm_name,comm_hosts,rank_world,ier c_name1(1) = ctry(itry:itry) c_length=namelen+1 c_error=-999 - c_crc32c=nems_c_crc32(c_name1,c_length,c_error) + c_crc32c=abs(nems_c_crc32(c_name1,c_length,c_error)) if(c_error/=0) then ! Should never get here. This indicates the name is ! empty or beyond 2**31-3 bytes. @@ -686,7 +686,8 @@ subroutine color_by_hash(name,namelen,commin,comm_name,comm_hosts,rank_world,ier return endif hash=c_crc32c - + + if(hash < 0) hash = MPI_UNDEFINED call MPI_Comm_Split(commin,hash,rank_world,comm_name,error) if(error/=0) then ierr=2 From f83d15b871acddc92ca8ce5984cf87a115d1481c Mon Sep 17 00:00:00 2001 From: Mark Potts Date: Thu, 6 Feb 2020 11:26:23 -0500 Subject: [PATCH 2/3] removed redundant check on hash > 0 --- src/module_NEMS_Rusage.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/module_NEMS_Rusage.F90 b/src/module_NEMS_Rusage.F90 index 84ee96c2..02c0485d 100644 --- a/src/module_NEMS_Rusage.F90 +++ b/src/module_NEMS_Rusage.F90 @@ -687,7 +687,6 @@ subroutine color_by_hash(name,namelen,commin,comm_name,comm_hosts,rank_world,ier endif hash=c_crc32c - if(hash < 0) hash = MPI_UNDEFINED call MPI_Comm_Split(commin,hash,rank_world,comm_name,error) if(error/=0) then ierr=2 From cd9d88a3fdc7d3e9a4c58b2145b305d899fdfed5 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sun, 15 Mar 2020 19:18:08 -0600 Subject: [PATCH 3/3] hera.gnu config --- src/conf/module-setup.sh.inc | 2 +- src/incmake/env/rdhpcs/hera.gnu.mk | 7 +++++++ src/module_NEMS_Rusage.F90 | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/incmake/env/rdhpcs/hera.gnu.mk diff --git a/src/conf/module-setup.sh.inc b/src/conf/module-setup.sh.inc index b427faa9..7bd64f4c 100644 --- a/src/conf/module-setup.sh.inc +++ b/src/conf/module-setup.sh.inc @@ -58,7 +58,7 @@ elif [[ -L /usrx && "$( readlink /usrx 2> /dev/null )" =~ dell ]] ; then fi module purge elif [[ -d /glade ]] ; then - # We are on NCAR Cheyenne + # We are on NCAR Cheyenne if ( ! eval module help > /dev/null 2>&1 ) ; then . /glade/u/apps/ch/modulefiles/default/localinit/localinit.sh fi diff --git a/src/incmake/env/rdhpcs/hera.gnu.mk b/src/incmake/env/rdhpcs/hera.gnu.mk new file mode 100644 index 00000000..41eedf90 --- /dev/null +++ b/src/incmake/env/rdhpcs/hera.gnu.mk @@ -0,0 +1,7 @@ +MACHINE_ID=hera +FULL_MACHINE_ID=hera +USE_MODULES=YES +DEFAULT_MODULE=$(FULL_MACHINE_ID)/ESMF_NUOPC +BUILD_TARGET=$(FULL_MACHINE_ID).$(NEMS_COMPILER) +NEMS_COMPILER=gnu +MODULE_LOGIC=$(call ULIMIT_MODULE_LOGIC,200000) diff --git a/src/module_NEMS_Rusage.F90 b/src/module_NEMS_Rusage.F90 index 02c0485d..747746bf 100644 --- a/src/module_NEMS_Rusage.F90 +++ b/src/module_NEMS_Rusage.F90 @@ -686,7 +686,7 @@ subroutine color_by_hash(name,namelen,commin,comm_name,comm_hosts,rank_world,ier return endif hash=c_crc32c - + call MPI_Comm_Split(commin,hash,rank_world,comm_name,error) if(error/=0) then ierr=2