Changes between Version 19 and Version 20 of Configuration

Show
Ignore:
Timestamp:
02/20/14 14:17:48 (11 years ago)
Author:
jorisborgdorff
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Configuration

    v19 v20  
    2929If the conduit entrance and exit have the same name, the second argument of {{{tie}}} is optional. 
    3030 
    31 === Native code === 
     31=== Non-Java instances === 
    3232 
    33 For native executables that uses the MUSCLE API, the following parameters may be set: {{{"submodelName:command"}}} to set the path to the executable; and {{{"submodelName:args"}}} to give additional command-line parameters to the executable. Suppose my executable is somewhere in my home {{{bin}}} directory, this could be 
     33For non-Java instances that use the MUSCLE API, the Ruby classes `NativeInstance` (any executable binary), `PythonInstance` (Python script), `MPIInstance` (executable binary using MPI), and `MatlabInstance` (Matlab script) may be used. The first argument is the instance name, the second is the executable or script. After that, a number of optional arguments may be provided: 
     34||= Parameter =||= Meaning =||= Example =||= Recognized by class =|| 
     35|| `args` || Arguments to the script or executable || `'param1 param2'` || All || 
     36|| `java_class` || Custom Java subclass of NativeKernel || `'uni.dep.MyKernel'` || All || 
     37|| `mpiexec` || Command to run MPI || `mpiexec`|| `MPIInstance` || 
     38|| `mpiexec_args` || Arguments to MPI executor || `-np 4`|| `MPIInstance` || 
     39|| `matlab`|| `Command to run Matlab` || `/opt/bin/matlab` || `MatlabInstance` || 
     40|| `matab_args` || `Arguments to Matlab` || `-matlab_arg1 -matlab_arg2` || `MatlabInstance || 
     41|| `python` || `Command to run Python` || `/opt/bin/python` || `PythonInstance` || 
     42 
     43The optional arguments are specified by stating the parameter, a colon, and the parameter value. For a normal executable, for example: 
    3444{{{ 
    35 subA["command"] = ENV['HOME'] + "/bin/subA" 
    36 subA["args"] = "paramA paramB" 
     45w = NativeInstance.new('w', '/path/to/w') 
     46}}} 
     47to provide arguments and a Java class, state 
     48{{{ 
     49w = NativeInstance.new('w', '/path/to/w', args: 'param1 param2', java_class: 'uni.dep.MyNativeKernel') 
    3750}}} 
    3851 
    39 For MPI code, two additional parameters should be set: {{{"mpiexec_command"}}} with the name or the path the the mpiexec/mpirun executable; and {{{"mpiexec_args"}}} which are the arguments, like "-np 2", etc. 
     52Equivalently, to specify a MPI executable to run with four cores under the `mpiexec` command, use: 
     53{{{ 
     54w = MPIInstance.new('w', '/path/to/w', mpiexec_args: '-np 4') 
     55}}} 
    4056 
    41  
     57For Python: 
     58{{{ 
     59w = PythonInstance('w', 'myscript.py') 
     60}}} 
    4261=== Filters === 
    4362