Esempio n. 1
0
def test_rundak():
    """ run dakota to solve rosenbrock all driven from python """
    __have_mpi__ = False
    if (not __have_mpi__):
        _dakota.run_dakota_data("test_dakface.in", AnObj())
    else:
        from boost.mpi import world
        _dakota.run_dakota_mpi_data("test_dakface.in", world, AnObj())
    print "made it back from dakota call"
Esempio n. 2
0
def test_rundak():
    """ run dakota to solve rosenbrock all driven from python """
    __have_mpi__ = False
    if (not __have_mpi__):
        _dakota.run_dakota_data("test_dakface.in", AnObj())
    else:
        from boost.mpi import world
        _dakota.run_dakota_mpi_data("test_dakface.in", world, AnObj())
    print "made it back from dakota call"
Esempio n. 3
0
 def execute(self):
     """ call dakota, providing self as data. Callback will then call run_iteration for the driver """
     import twister.interfaces.dakota._dakota as _dakota
     # calls dakota with arguments that equal "dakota dakota.in"
     # import OUR boost-python binding for dakota, defined in dakota_python_binding.c,
     # which calls to OUR function all_but_actual_main() in Dakota/src/library_mode.C
     print "running DAKOTA from input file: ", self.infile
     if (self.__have_mpi__):
         from boost.mpi import world
         _dakota.run_dakota_mpi_data(self.infile, world, self)
     else:
         _dakota.run_dakota_data(self.infile, self)