Skip to content

Commit

Permalink
Added logging info for mpi calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
Valdes-Tresanco-MS committed Nov 10, 2022
1 parent a66c23a commit 0c8e734
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion GMXMMPBSA/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ def load_calc_list(self):
nframes = self.numframes if self.master else 0
nmframes = self.numframes_nmode if self.master else 0
self.calc_list = CalculationList(self.timer, nframes, nmframes, self.mpi_size)

if self.master:
logging.info(f'Starting calculations in {self.mpi_size} CPUs...')
if (self.INPUT['pbrun'] or self.INPUT['rismrun'] or self.INPUT['nmoderun']) and self.mpi_size > 1:
logging.warning('PB/RISM/NMODE will be calculated with multiple threads, make sure you have enough RAM.')
if not self.INPUT['mutant_only']:
self.calc_list.append(PrintCalc('Running calculations on normal system...'), timer_key=None)
self._load_calc_list(self.pre, False, self.normal_system)
Expand Down Expand Up @@ -712,6 +715,8 @@ def get_cl_args(self, args=None):
args.remove('mpi')
elif 'MPI' in args:
args.remove('MPI')
elif self.mpi_size > 1:
pass
else:
_mpi = False
mpi_cl = f' mpirun -np {self.mpi_size} ' if _mpi else ' '
Expand Down

0 comments on commit 0c8e734

Please sign in to comment.