- Timestamp:
- 01/06/12 14:59:32 (5 months ago)
- Files:
-
- 1 modified
-
trunk/src/mcrun2/mcstas.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mcrun2/mcstas.py
r3216 r3241 123 123 124 124 options = self.options 125 mpi = self.options.use_mpi126 125 127 126 # Handle proxy options with values … … 148 147 for key, value in self.params.items()] 149 148 150 # Run McStas 151 if not mpi: 152 LOG.debug('Running: %s', self.binpath) 153 return Process(self.binpath).run(args, pipe=pipe) 154 else: 149 return self.runMPI(args, pipe) 150 151 def runMPI(self, args, pipe=False): 152 """ Run McStas, possible via mpi """ 153 binpath = self.binpath 154 mpi = self.options.use_mpi 155 if mpi: 155 156 LOG.debug('Running via MPI: %s', self.binpath) 156 mpi_args = ['-np', str(options.mpi), self.binpath]157 mpi_args +=args158 return Process(options.mpirun).run(mpi_args, pipe=pipe)157 binpath = self.options.mpirun 158 args = ['-np', str(self.options.mpi), self.binpath] + args 159 return Process(binpath).run(args, pipe=pipe) 159 160 160 161 def get_info(self): 161 return McStasInfo( Process(self.binpath).run(['--info'], pipe=True))162 return McStasInfo(self.runMPI(['--info'], pipe=True)) 162 163 163 164 def cleanup(self):
