diff --git a/refactored/da/tm5/observationoperator.py b/refactored/da/tm5/observationoperator.py index 5784d1964d9e9fca6dc175c6f4924bbabff62869..f11395ba60025c2f8745974e77f9eaafb2697e07 100755 --- a/refactored/da/tm5/observationoperator.py +++ b/refactored/da/tm5/observationoperator.py @@ -515,7 +515,7 @@ class TM5ObservationOperator(ObservationOperator): jobfile = os.path.join(targetdir,'jb.%s.jb'%jobid) logfile = jobfile.replace('.jb','.log') - nprocesses = int(self.DaCycle['da.optimizer.nmembers'])/5 # Note that we assign 5 tracers to each processor, this seems good for TM5 + nprocesses = min(1, int(self.DaCycle['da.optimizer.nmembers'])) # )/5 # Note that we assign 5 tracers to each processor, this seems good for TM5 jobparams = {'jobname':'tm5', 'jobnodes':'ncomp %d'%int(nprocesses), 'jobtime':'00:30:00', @@ -524,7 +524,11 @@ class TM5ObservationOperator(ObservationOperator): template = DaPlatForm.GetJobTemplate(jobparams,block=True) template += 'cd %s\n'%targetdir - template += '%s -np %d %s tm5.rc\n'%(self.tm_settings['mpirun.command'],int(nprocesses),self.Tm5Executable,) + # avoid mpi if we only use one process + if nprocesses > 1: + template += '%s -np %d %s tm5.rc\n'%(self.tm_settings['mpirun.command'],int(nprocesses),self.Tm5Executable,) + else: + template += '%s tm5.rc\n'%(self.Tm5Executable,) dummy = DaPlatForm.WriteJob(jobfile,template,jobid)