Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Run the script on 2 cores with this command to produce a "run54.h5" file:

Code Block
mpirun -n 2 python mpiDataSource.py

In addition to running offline, these parallel scripts can be run in real time while the data is being taken and can complete within a few minutes of the end of the run (you can see how to submit MPI psana-python batch jobs here).  Note that this interface does not currently work with the shared-memory analysis mode.

The timestamps of each event are automatically saved in the output file, which can be used to quickly "jump" to the big data (e.g. camera images) of interesting events using small python scripts like this.

It is important to emphasize that this code is optimized for producing SMALL HDF5 files.  For example, it will not run quickly if you save large images for every event.  This may also cause the machines to run out of memory.