Exemple #1
0
    def _configure(self):

        # XXX: to be removed
        # XXX: for backward compatibility
        dump_instrument = self.inventory.dump_instrument
        if dump_instrument:
            import warnings
            warnings.warn(
                'This option is not supported anymore. Please use --dump-pml')

        # handle dumppml
        # this overrides the option dumpconfiguration in order to
        # provide a simpler interface for users.
        dumppml = self.inventory.dumppml
        if dumppml:
            self.inventory.dumpconfiguration = True
            self._showHelpOnly = True

        base._configure(self)
        self.geometer = self.inventory.geometer
        self.overwrite_datafiles = self.inventory.overwrite_datafiles

        self.sequence = self.inventory.sequence
        self.buffer_size = self._getBufferSize()
        self.ncount = self.inventory.ncount
        if self.parallel:
            # every node only need to run a portion of the total counts
            partitions = getPartitions(self.ncount, self.mpiSize)
            self.ncount = partitions[self.mpiRank]

        # tracer
        tracer = self.inventory.tracer
        if tracer.name == 'no-neutron-tracer':
            tracer = None
        self.tracer = tracer

        return
Exemple #2
0
    def _configure(self):

        # XXX: to be removed
        # XXX: for backward compatibility
        dump_instrument = self.inventory.dump_instrument
        if dump_instrument:
            import warnings
            warnings.warn('This option is not supported anymore. Please use --dump-pml')
        
        # handle dumppml
        # this overrides the option dumpconfiguration in order to
        # provide a simpler interface for users.
        dumppml = self.inventory.dumppml
        if dumppml:
            self.inventory.dumpconfiguration = True
            self._showHelpOnly = True

        base._configure(self)
        self.geometer = self.inventory.geometer
        self.overwrite_datafiles = self.inventory.overwrite_datafiles
        
        self.sequence = self.inventory.sequence
        if self.inventory.mode == 'worker':
            self.buffer_size = self._getBufferSize()
            self.ncount = self.inventory.ncount
            if self.parallel:
                # every node only need to run a portion of the total counts
                partitions = getPartitions(self.ncount, self.mpi.size)
                self.ncount = partitions[self.mpi.rank]

        # tracer
        tracer = self.inventory.tracer
        if tracer.name == 'no-neutron-tracer':
            tracer = None
        self.tracer = tracer
        
        return
Exemple #3
0
 def __init__(self, name):
     base.__init__(self, name)
     self._warning = journal.warning(name)
     return
Exemple #4
0
 def _defaults(self):
     base._defaults(self)
     self.inventory.geometer = _build_geometer(self)
     return
Exemple #5
0
 def _defaults(self):
     base._defaults(self)
     self.inventory.geometer = _build_geometer( self )
     return
Exemple #6
0
 def __init__(self, name):
     base.__init__(self, name)
     self._warning = journal.warning( name )
     return