Skip to content

Commit e4b3d27

Browse files
committed
TL: final update before PR
1 parent 86d3dc4 commit e4b3d27

File tree

1 file changed

+7
-23
lines changed

1 file changed

+7
-23
lines changed

pySDC/helpers/fieldsIO.py

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -522,23 +522,9 @@ def setupMPI(cls, comm: MPI.Intracomm, iLoc, nLoc):
522522
cls.comm = comm
523523
cls.iLoc = iLoc
524524
cls.nLoc = nLoc
525-
cls.mpiFile:MPI.File = None
526-
cls.mpiType:MPI.Datatype = None
527-
cls.mpiFileType:MPI.Datatype = None
528-
cls._nCollectiveIO = None
529-
530-
@property
531-
def nCollectiveIO(self):
532-
"""
533-
Number of collective IO operations over all processes, when reading or writing a field.
534-
535-
Returns:
536-
--------
537-
int: Number of collective IO accesses
538-
"""
539-
if self._nCollectiveIO is None:
540-
self._nCollectiveIO = self.comm.allreduce(self.nVar * np.prod(self.nLoc[:-1]), op=MPI.MAX)
541-
return self._nCollectiveIO
525+
cls.mpiFile: MPI.File = None
526+
cls.mpiType: MPI.Datatype = None
527+
cls.mpiFileType: MPI.Datatype = None
542528

543529
@property
544530
def MPI_ON(self):
@@ -558,13 +544,11 @@ def MPI_SETUP(self):
558544
"""Setup subarray masks for each processes"""
559545
self.mpiType = MPI_DTYPE(self.dtype)
560546
self.mpiFileType = self.mpiType.Create_subarray(
561-
[self.nVar, *self.gridSizes], # Global array sizes
562-
[self.nVar, *self.nLoc], # Local array sizes
563-
[0, *self.iLoc] # Global starting indices of local blocks
564-
)
547+
[self.nVar, *self.gridSizes], # Global array sizes
548+
[self.nVar, *self.nLoc], # Local array sizes
549+
[0, *self.iLoc], # Global starting indices of local blocks
550+
)
565551
self.mpiFileType.Commit()
566-
print("MPI_TYPE ", self.mpiType)
567-
print("MPI_FILETYPE ", self.mpiFileType)
568552

569553
def MPI_FILE_OPEN(self, mode):
570554
"""Open the binary file in MPI mode"""

0 commit comments

Comments
 (0)