SWDEV-408607: Removed MPi message. Aded changelog and readme

Change-Id: I31efaf53ce4bf1b25c2bd94197a0b41bff84b0ff
This commit is contained in:
Giovanni LB
2023-06-30 21:50:49 -03:00
parent f1f5c4485d
commit 02fbd5887b
3 changed files with 34 additions and 26 deletions
+11 -9
View File
@@ -18,8 +18,9 @@ import gc
try:
from mpi4py import MPI
MPI_IMPORTED = True
except:
pass
MPI_IMPORTED = False
class PerfEvent(ctypes.Structure):
_fields_ = [
@@ -330,15 +331,16 @@ def apply_min_event(min_event_time, OCCUPANCY, EVENTS, DBFILES, TIMELINES):
if __name__ == "__main__":
comm = None
mpi_root = True
try:
comm = MPI.COMM_WORLD
if comm.Get_size() < 2:
if MPI_IMPORTED:
try:
comm = MPI.COMM_WORLD
if comm.Get_size() < 2:
comm = None
else:
mpi_root = comm.Get_rank() == 0
except:
print('Could not load MPI')
comm = None
else:
mpi_root = comm.Get_rank() == 0
except:
print('Could not load MPI')
comm = None
pathenv = os.getenv('OUTPUT_PATH')
if pathenv is None: