Changeset 3246 for trunk

Show
Ignore:
Timestamp:
01/12/12 13:47:29 (4 months ago)
Author:
jos
Message:

Run mpi programs directly in the --info case

Location:
trunk/src/mcrun2
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/mcrun2/main.py

    r3242 r3246  
    263263    LOG.info('===') 
    264264 
     265    if options.info: 
     266        print 'info!' 
     267        mcstas.run(override_mpi=False) 
     268        exit() 
     269 
    265270    # Set fixed parameters 
    266271    for key, value in fixed_params.items(): 
  • trunk/src/mcrun2/mcstas.py

    r3245 r3246  
    117117        Process(options.cc).run(args) 
    118118 
    119     def run(self, pipe=False, extra_opts=None): 
     119    def run(self, pipe=False, extra_opts=None, override_mpi=None): 
    120120        ''' Run simulation ''' 
    121121        args = [] 
     
    147147                 for key, value in self.params.items()] 
    148148 
    149         return self.runMPI(args, pipe) 
    150  
    151     def runMPI(self, args, pipe=False): 
     149        return self.runMPI(args, pipe, override_mpi) 
     150 
     151    def runMPI(self, args, pipe=False, override_mpi=None): 
    152152        """ Run McStas, possible via mpi """ 
    153153        binpath = self.binpath 
    154154        mpi = self.options.use_mpi 
    155         if mpi: 
     155        if override_mpi or override_mpi is None and mpi: 
    156156            LOG.debug('Running via MPI: %s', self.binpath) 
    157157            binpath = self.options.mpirun