Skip to content

Commit af72305

Browse files
committed
Fix the ESMF_NO_GETHOSTID option that recently broke.
1 parent 7e41847 commit af72305

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Infrastructure/VM/src/ESMCI_VMKernel.C

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ void VMK::init(MPI_Comm mpiCommunicator, bool globalResourceControl){
551551
// determine SSI ids and ssipe
552552
ssiid = new int[ncores];
553553
ssipe = new int[ncores];
554+
int localSsi;
554555
#ifdef ESMF_NO_GETHOSTID
555556
for (int i=0; i<ncores; i++){
556557
ssiid[i]=i; // hardcoded assumption of single-CPU SSIs
@@ -563,6 +564,7 @@ void VMK::init(MPI_Comm mpiCommunicator, bool globalResourceControl){
563564
ssiLocalPet=0;
564565
ssiLocalPetList = new int[1];
565566
ssiLocalPetList[0] = mypet;
567+
localSsi = mypet;
566568
#else
567569
int *temp_ssiPetCount = new int[ncores];
568570
long int *temp_ssiid = new long int[ncores];
@@ -597,7 +599,7 @@ void VMK::init(MPI_Comm mpiCommunicator, bool globalResourceControl){
597599
if (temp_ssiPetCount[i] > ssiMaxPetCount)
598600
ssiMaxPetCount = temp_ssiPetCount[i];
599601
}
600-
int localSsi = ssiid[mypet];
602+
localSsi = ssiid[mypet];
601603
ssiLocalPetCount=temp_ssiPetCount[localSsi];
602604
#if 0
603605
{

0 commit comments

Comments
 (0)