Download G4beamline User`s Guide

Transcript
8.5.1 Signals
G4beamline responds to signal SIGUSR1 by flushing all NTuples to disk. So for a long job you can look
at intermediate results.
G4beamline responds to signal SIGUSR2 by closing up and exiting cleanly. In each worker this is
detected between events. This is especially useful on Hopper, as SIGUSR1 and SIGUSR2 are the only
signals users can send to the application; all others cause immediate termination without saving results.
8.5.2 Estimating how many workers to use
In general, if your simulation runs >100 events/sec on a typical core, then MPI will probably max out
around 10-20 ranks, because the serial operations in rank 0 will saturate. For a simulation that runs 13
ev/sec on a Hopper worker node, rank 0 saturates around 800 workers. From the parallelization plots in
section 8.5.4 below, it’s clear that on Hopper rank 0 saturates around 8,000 events per second. There are
several design and code changes that could be done to mitigate the rank 0 bottleneck, but for now this is
not considered serious enough to warrant development.
Note that a larger number of messages per event will reduce the number of workers that can be used
effectively, because the serial I/O in rank 0 will dominate. So for high performance, avoid printf,
steppingVerbose=1, trace, and a large number of NTuples.
There can be rather large overheads in starting each MPI process; on Hopper, 1600 ranks can take
several minutes to start up (from rank 0 starting to the last worker processing its first event). Startup is
loosely but not strictly in rank order.
The best way to estimate how many workers to use is to plot the performance (events per second) as a
function of the number of workers. When rank 0 becomes saturated, the events per second will likewise
saturate. Usually a few minutes will suffice for each point, and you can use the wallClockLimit
parameter to terminate the jobs. Be sure it is large enough for all workers to start up – if they don’t all
start up, the symptom is a droop in the Events/sec vs. nWorkers plot (as in Benchmark2 on hopper,
below, for 1600 workers). Another symptom of not all workers starting up would be an exception “Not
all Workers Contributed Data”, for the profile or totalenergy commands.
8.5.3 MPI on Mac OS X with OpenMPI
Here is the build of OpenMPI:
./configure --disable-dlopen --enable-static --disable-shared \
--disable-mpi-f77 --disable-mpi-f90 --prefix=/usr/local
make
make install
If you have other systems on a network that could be used via MPI, install OpenMPI on them and
configure it to use them. My instance of OpenMPI only uses the cores on my machine, and message
passing is via shared memory.
After installing OpenMPI, build G4beamline from source:
mkdir G4beamline-2.14-mpi
cd G4beamline-2.14-mpi
../G4beamline-2.14-source/configure --enable-mpi
make
1/10/14 TJR
G4beamline User’s Guide
155