Product specifications
Table Of Contents
- Table of Contents
- 1 Introduction
- 2 Feature Overview
- 3 Step-by-Step Cluster Setup and MPI Usage Checklists
- 4 InfiniPath Cluster Setup and Administration
- Introduction
- Installed Layout
- Memory Footprint
- BIOS Settings
- InfiniPath and OpenFabrics Driver Overview
- OpenFabrics Drivers and Services Configuration and Startup
- Other Configuration: Changing the MTU Size
- Managing the InfiniPath Driver
- More Information on Configuring and Loading Drivers
- Performance Settings and Management Tips
- Host Environment Setup for MPI
- Checking Cluster and Software Status
- 5 Using QLogic MPI
- Introduction
- Getting Started with MPI
- QLogic MPI Details
- Use Wrapper Scripts for Compiling and Linking
- Configuring MPI Programs for QLogic MPI
- To Use Another Compiler
- Process Allocation
- mpihosts File Details
- Using mpirun
- Console I/O in MPI Programs
- Environment for Node Programs
- Environment Variables
- Running Multiple Versions of InfiniPath or MPI
- Job Blocking in Case of Temporary InfiniBand Link Failures
- Performance Tuning
- MPD
- QLogic MPI and Hybrid MPI/OpenMP Applications
- Debugging MPI Programs
- QLogic MPI Limitations
- 6 Using Other MPIs
- A mpirun Options Summary
- B Benchmark Programs
- C Integration with a Batch Queuing System
- D Troubleshooting
- Using LEDs to Check the State of the Adapter
- BIOS Settings
- Kernel and Initialization Issues
- OpenFabrics and InfiniPath Issues
- Stop OpenSM Before Stopping/Restarting InfiniPath
- Manual Shutdown or Restart May Hang if NFS in Use
- Load and Configure IPoIB Before Loading SDP
- Set $IBPATH for OpenFabrics Scripts
- ifconfig Does Not Display Hardware Address Properly on RHEL4
- SDP Module Not Loading
- ibsrpdm Command Hangs when Two Host Channel Adapters are Installed but Only Unit 1 is Connected to the Switch
- Outdated ipath_ether Configuration Setup Generates Error
- System Administration Troubleshooting
- Performance Issues
- QLogic MPI Troubleshooting
- Mixed Releases of MPI RPMs
- Missing mpirun Executable
- Resolving Hostname with Multi-Homed Head Node
- Cross-Compilation Issues
- Compiler/Linker Mismatch
- Compiler Cannot Find Include, Module, or Library Files
- Problem with Shell Special Characters and Wrapper Scripts
- Run Time Errors with Different MPI Implementations
- Process Limitation with ssh
- Number of Processes Exceeds ulimit for Number of Open Files
- Using MPI.mod Files
- Extending MPI Modules
- Lock Enough Memory on Nodes When Using a Batch Queuing System
- Error Creating Shared Memory Object
- gdb Gets SIG32 Signal Under mpirun -debug with the PSM Receive Progress Thread Enabled
- General Error Messages
- Error Messages Generated by mpirun
- MPI Stats
- E Write Combining
- F Useful Programs and Files
- G Recommended Reading
- Glossary
- Index

C–Integration with a Batch Queuing System
Using SLURM for Batch Queuing
IB6054601-00 H C-3
A
Allocating Resources
When the mpirun command starts, it requires specification of the number of node
programs it must spawn (via the
-np option) and specification of an mpihosts
file listing the nodes on which the node programs may be run. (See “Environment
for Node Programs” on page 5-17 for more information.) Since performance is
usually important, a user might require that his node program be the only
application running on each node CPU. In a typical batch environment, the MPI
user would still specify the number of node programs, but would depend on the
batch system to allocate specific nodes when the required number of CPUs
become available. Thus, batch_mpirun would take at least an argument
specifying the number of node programs and an argument specifying the MPI
program to be executed. For example:
$ batch_mpirun -np n my_mpi_program
After parsing the command line arguments, the next step of batch_mpirun is to
request an allocation of n processors from the batch system. In SLURM, this uses
the command:
eval ‘srun --allocate --ntasks=$np --no-shell‘
Make sure to use back quotes rather than normal single quotes. $np is the shell
variable that your script has set from the parsing of its command line options. The
--no-shell option to srun prevents SLURM from starting a subshell. The srun
command is run with eval to set the SLURM_JOBID shell variable from the output
of the srun command.
With these specified arguments, the SLURM function srun blocks until there are
$np processors available to commit to the caller. When the requested resources
are available, this command opens a new shell and allocates the number of
processors to the requestor.
Generating the mpihosts File
Once the batch system has allocated the required resources, your script must
generate an mpihosts file, which contains a list of nodes that will be used. To do
this, the script must determine which nodes the batch system has allocated, and
how many processes can be started on each node. This is the part of the script
batch_mpirun that performs these tasks, for example:
mpihosts_file=‘mktemp -p /tmp mpihosts_file.XXXXXX‘
srun --jobid=${SLURM_JOBID} hostname -s | sort | uniq -c \
| awk ’{printf "%s:%s\n", $2, $1}’ > $mpihosts_file
The first command creates a temporary hosts file with a random name, and
assigns the name to the variable mpihosts_file it has generated.
The next instance of the SLURM srun command runs hostname -s once for
each process slot that SLURM has allocated. If SLURM has allocated two slots on
one node, hostname -s is output twice for that node.