Skip to content

Commit 8b3bd1b

Browse files
committed
DOC: Added docstring for MpiCommandLine with example usage.
1 parent fbfdc2d commit 8b3bd1b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

nipype/interfaces/base.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,23 @@ class MpiCommandLineInputSpec(CommandLineInputSpec):
12661266

12671267

12681268
class MpiCommandLine(CommandLine):
1269+
'''Implements functionality to interact with command line programs
1270+
that can be run with MPI (i.e. using 'mpiexec').
1271+
1272+
Examples
1273+
--------
1274+
>>> from nipype.interfaces.base import MpiCommandLine
1275+
>>> mpi_cli = MpiCommandLine(command='my_mpi_prog')
1276+
>>> mpi_cli.inputs.args = '-v'
1277+
>>> mpi_cli.cmdline
1278+
'my_mpi_prog -v'
1279+
1280+
>>> mpi_cli.inputs.use_mpi = True
1281+
>>> mpi_cli.inputs.n_procs = 8
1282+
>>> mpi_cli.cmdline
1283+
1284+
'mpiexec -n 8 my_mpi_prog -v'
1285+
'''
12691286
input_spec = MpiCommandLineInputSpec
12701287

12711288
@property

0 commit comments

Comments
 (0)