Changeset 9508


Ignore:
Timestamp:
Dec 20, 2014 4:34:20 PM (4 years ago)
Author:
gahacke
Message:

customizing tests for pyro behavior on local machines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyomo/trunk/pyomo/pysp/tests/examples/test_ph.py

    r9449 r9508  
    3232_baseline_suffix = ".gz"
    3333_pyro_external_ns = False
     34
     35_pyomo_ns_options = ""#"-n localhost -r"
     36_dispatch_srvr_options = ""#"localhost"
     37_taskworker_options = ""#"localhost"
     38_runph_options = ""#"--pyro-hostname=localhost"
    3439
    3540#
     
    203208            cmd += "mpirun "
    204209            if not _pyro_external_ns:
    205                 cmd += "-np 1 pyomo_ns : "
    206             cmd += "-np 1 dispatch_srvr : "\
    207                    "-np 1 pyro_mip_server : "\
    208                    "-np 1 runph -r 1 --solver-manager=pyro --shutdown-pyro"
     210                cmd += "-np 1 pyomo_ns "+_pyomo_ns_options+" : "
     211            cmd += ("-np 1 dispatch_srvr "+_dispatch_srvr_options+" : "
     212                    "-np 1 pyro_mip_server "+_taskworker_options+" : "
     213                    "-np 1 runph -r 1 --solver-manager=pyro --shutdown-pyro "+_runph_options)
    209214        elif self.solver_manager == 'phpyro':
    210215            cmd += "mpirun "
    211216            if not _pyro_external_ns:
    212                 cmd += "-np 1 pyomo_ns : "
    213             cmd += "-np 1 dispatch_srvr : "\
    214                    "-np %s phsolverserver : "\
    215                    "-np 1 runph -r 1 --solver-manager=phpyro --shutdown-pyro"\
    216                    % (self.num_scenarios)
     217                cmd += "-np 1 pyomo_ns "+_pyomo_ns_options+" : "
     218            cmd += ("-np 1 dispatch_srvr "+_dispatch_srvr_options+" : "
     219                    "-np %s phsolverserver "+_taskworker_options+" : "
     220                    "-np 1 runph -r 1 --solver-manager=phpyro --shutdown-pyro "+_runph_options) \
     221                    % (self.num_scenarios)
    217222        else:
    218223            raise RuntimeError("Invalid solver manager "+str(self.solver_manager))
Note: See TracChangeset for help on using the changeset viewer.