|
bcMPI - utilitiesautobuild-bcmpi.shdescriptionShell script to bootstrap the checkout and build process using the developer recommended conventions. Currently requires subversion access, non-developers may still find it useful as a reference. usageDownload and save to your $HOME directory. Create a working directory and cd into it: % mkdir -p /tmp/${USER}/bcMPI
% cd /tmp/${USER}/bcMPI
Checkout and build with chosen configuration: % sh ${HOME}/autobuild-bcmpi.sh kodos-openmpi-ib-oct64mpi
bcmpi_testdescriptionInstalled in bcmpi/regress starting with bcMPI-1.1. A standalone C program which tests the target MPI environment configuration without complications from the MATLAB or Octave interpreter. Successful completion indicates that programs can be started, the MPI and bcMPI libraries can be found, and basic MPI communication is functioning. usageCreate and submit or run the
outputSuccessful output will contain a bunch of lines ending with "err=0". The final lines should be "bcmpi_finalize(): err=0". Any failure will require fixing your environment configuration before the bcMPI toolboxes can be expected to work. create_job_file.pydescriptionA python script to generate batch system job files. It can create PBS, LSF or SH job files. Information to create a job file is read from installation, queue, job specific configuration files and command line options. Input values to this script may be specified in configuration files or as command line options or both. Command line option values overwrite configuration file values. configuration options
configuration filesParaM.pjc - The installation specific variables are set and installed in etc/ParaM.pjc file. Read by the job file generation script by default. queue.pjc - Batch system target queue specific variables can be set in queue.pjc file. An example is installed in share/examples. User has to copy this file, modify it (optional) and specify it in the command line. Job specific variables may be set in a user defined configuration file. This file follows the same format as queue configuration file. usageTo generate a job script example.pbs for program file example.m, using user defined queue.pjc:
To create a job script using user defined queue.pjc and job specifc variables in config.job:
outputCreates a batch system job file specified in batch-script option or redirects the output to stdout. create_job_files.shA warpper script for job creation script that creates batch system job files for the program files in regress and examples directories. User may modify the m files list and options to the job creation script. usageIf queue cofiguration file is not specified in the command line, uses example config file.
Users may copy and modify example target queue config file in share/examples/queue.pjc.
outputCreates a batch system job file specified in batch-script option or redirects the output to stdout. environment setupdescriptionThe environ files are responsible for setting all the environment variables required for running bcMPI applications. The appropriate file should be sourced by the shell script or at the command prompt. usageThe non-interpreter specific variables are set in
Users should source one of the interpreter specific environ files, these will in turn source the common files: For csh shells:
For sh shells:
mpi_matlabdescriptionA wrapper script that enables the MATLAB interpreter to
be started in an MPI environment. It starts by moving the
command line parameters passed by mpiexec (or mpirun) to the
environment. It next builds a new command line to start the
interpreter, and creates a temporary standard input file with
instructions to
It also contains preliminary code to monitor the running MATLAB process. This feature was never finished because the PBS job scheduler was found to be killing the mpi_matlab script but leaving MATLAB running, consuming resources and eventually preventing additional jobs from being run. Code remains for developer diagnostics. interpreter options
MPI flagsSet the environment variable MPI_MATLAB_FLAGS to control the behaviour of mpi_matlab. Note that the default value used by installed tests and examples can be changed in your configuration.
Filename substitutionsThe filename for each MPI process must be unique, otherwise all processes will open the same file and most output will be lost. Note that not all substitutions are available for all MPI environments, experiment to see what works best. The default is to not redirect stdout or stderr, the final behaviour is then determined by the MPI environment. filename substitution values
mpi_octavedescriptionSame as mpi_matlab, except it works with Octave. interpreter options
MPI flagsSet the environment variable MPI_OCTAVE_FLAGS to control the behaviour of mpi_octave. Supported options are the same as for mpi_matlab. Note that the default value used by installed tests and examples can be changed in your configuration. mpi_setupThe environment provided by MPI is not guaranteed until after MPI_Init() has been called. This is problematic for bcMPI because the interpreter must be started before MPI_Init() can be called. Use mpi_setup to generate a portable shell script which will initialize paths, change to the correct working directory, and set the command to be run. After initialization, the generated script will exec mpi_matlab or mpi_octave. usage examplesTo run example.m using MATLAB: % mpi_setup example matlab MATLAB_COMMAND=example
% mpirun example
By convention, the name of the generated script (first parameter to mpi_setup) is the name of the matlab script without the ".m". The second parameter is the name of the interpreter ("matlab" or "octave"). Either MPI_MATLAB_FLAGS and MPI_OCTAVE_FLAGS will always be propogated: % setenv MPI_MATLAB_FLAGS -oe
% mpi_setup example matlab MATLAB_COMMAND=example
% mpirun example
Additional environment variables may be set by adding name=value to the mpi_setup command: % mpi_setup example octave \
OCTAVE_COMMAND=example \
FOO=bar
% mpirun example
Empty values are supported, but currently there is no way to force a variable to be undefined. Parameters to the mpi wrapper may be adedd after variables, although this is intended for developer use only: % mpi_setup example octave \
OCTAVE_COMMAND=example \
FOO=bar \
--qwerty
% mpirun example
mpistart.pydescriptionUnsupported developer debugging tool. Replacement for MPICH's mpirun, starts all processes on the local host for quick debugging. Must be manually installed. |
