Changes between Version 4 and Version 5 of Command-line execution

Show
Ignore:
Timestamp:
09/24/12 11:16:58 (12 years ago)
Author:
jorisborgdorff
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Command-line execution

    v4 v5  
    1 == Command-line execution == 
     1= Command-line execution = 
    22 
    33Before MUSCLE can be run from the command-line, it needs a few environment variables to be set. To do this, run 
     
    77The [path/to/muscle] should point to where MUSCLE is installed on your machine. 
    88 
    9 === Local execution === 
     9== Local execution == 
    1010 
    1111Depending on the complexity of the code and the runtime requirements MUSCLE has different execution modes. In the simplest case, all the code can be run on a single machine, and no debugger or MPI is used. Use, for example, the {{{SimpleExample.cxa.rb}}} provided with MUSCLE. This will write data from submodel w to submodel r. 
     
    2121For execution on a local computer this command should be sufficient. 
    2222 
    23 === Execution on multiple machines === 
     23== Execution on multiple machines == 
    2424 
    2525If multiple machines are needed to run the code, they need some way of locating each other. This is where the {{{--main}}} flag is used, it indicates that the simulation manager will be run on the current location. Suppose we are running {{{SimpleExample.cxa.rb}}} which is provided with MUSCLE, which has the submodels "w" and "r". Then if the machines all have access to one of the other machines, you can run 
     
    2929which will run w on the current machine. On the command-line, it will show the following lines: 
    3030{{{ 
    31 === Running MUSCLE2 Simulation Manager === 
     31== Running MUSCLE2 Simulation Manager == 
    3232[10:04:37 muscle] Started the connection handler, listening on 192.168.2.1:9000 
    3333}}} 
     
    3838This will start the simulation, contacting the simulation manager at {{{192.168.2.1:9000}}}. For testing purposes, both commands can also be run on the same machine. 
    3939 
    40 === Running MPI === 
     40== Running MPI == 
    4141 
    4242There are three ways of running a native submodel with MPI.  
    4343 
    44 ==== Starting MPI with MUSCLE ==== 
     44=== Starting MPI with MUSCLE === 
    4545 
    4646If the MPI executable can be run by the user, first the variables "submodelName:mpiexec_command" and "submodelName:mpiexec_args" should be given in the CxA file. The most straightforward is running with the {{{--native}}} flag. Simply run 
     
    5050Of course, replace path/to/cxa.rb with your CxA file, and replace {{{--main}}} with {{{--manager ip:port}}} if another execution is already main. Running this way requires that only one submodel is run at a time. 
    5151 
    52 ==== Starting MPI directly ==== 
     52=== Starting MPI directly === 
    5353 
    5454The second way, more direct, does not require the variable "submodelName:mpiexec_command" to be set. Then, the executable that was compiled with the MUSCLE C++ API can be called as follows: 
     
    5858Since you run mpiexec yourself, this does not require the mpiexec_command to be set. The command first specifies the native executable, and any arguments that the executable needs, and then it has two dashes "--" and then the same arguments as in the previous command. 
    5959 
    60 ==== Starting Java separately ==== 
     60=== Starting Java separately === 
    6161 
    6262Since the MUSCLE C++ API needs to communicate with Java code, in the previous examples a fork was performed to execute the Java core of MUSCLE. Some implementations of MPI do not allow this behavior, so there a different approach is needed.