Changes between Version 2 and Version 3 of Command-line execution
- Timestamp:
- 09/05/12 18:18:36 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Command-line execution
v2 v3 9 9 === Local execution === 10 10 11 Depending 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 SimpleExampleprovided with MUSCLE. This will write data from submodel w to submodel r.11 Depending 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. 12 12 {{{ 13 13 muscle2 --cxa $MUSCLE_HOME/share/muscle/examples/cxa/SimpleExample.cxa.rb --main --all kernels 14 14 }}} 15 When we dissect this command line, it starts the with the cxa file it needs, {{{$MUSCLE_HOME/share/muscle/examples/cxa/SimpleExample.cxa.rb}}}. Then {{ --main}} indicates that the current execution is the main execution site, more on that later. Finally, {{{--allkernels}}} indicates that all kernels specified in the cxa file should be executed at the same time.15 When we dissect this command line, it starts the with the cxa file it needs, {{{$MUSCLE_HOME/share/muscle/examples/cxa/SimpleExample.cxa.rb}}}. Then {{{--main}}} indicates that the current execution is the main execution site, more on that later. Finally, {{{--allkernels}}} indicates that all kernels specified in the cxa file should be executed at the same time. 16 16 17 17 For execution on a local computer this command should be sufficient. … … 19 19 === Execution on multiple machines === 20 20 21 If 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 the SimpleExample 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 run21 If 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 22 22 {{{ 23 23 muscle2 --main --cxa $MUSCLE_HOME/share/muscle/examples/cxa/SimpleExample.cxa.rb w