Tags

Running Programs

it is assumed that if you are running Off-Site then a Bmad Distribution has already been built or you are using a Conda-Forge instance. If not, please consult the instructions for Distribution or Conda-Forge Setup.

Environment Setup

The first thing to do is to check that your environment has been properly setup. To do this, use the command

accinfo

This command should display a summary of the active Distribution's information, build architecture, selected Fortran compiler and enviromental configuration. If not, instructions for setting up the environment for a Distribution is given here. On-Site environment setup is given here.

List Programs

To get a list of the Bmad programs that have been built use the command:

ls $ACC_EXE

[If On-Site you will also see other CESR related programs.]

Note: If you have built your own custom program, this program will not be in the $ACC_EXE directory (unless you have done your program build from within the Distribution tree which is not recommended). See the build system documentation for infomation on building your own Bmad based programs.

Run a Program

The $ACC_EXE directory is in the system path so you can type the name of any of the programs that are in the directory to run the program. As a test you can run the Tao program:

tao -lat $ACC_ROOT_DIR/tao/examples/cesr/bmad_L9A18A000-_MOVEREC.lat 

Assuming there is no tao.init file in your working directory, running Tao should result in a plot window poping up that looks like:

tao.jpg



Running Parallel Programs with MPI or OpenMP

Some Bmad based proprograms can use OpenMP or Open MPI to run multi-threaded. The documentation on an individual program will indicate if this is possible for that program. When building an Off-Site Distribution, to compile with OpenMP, set the ACC_ENABLE_OPENMP variable in the util/dist_prefs file to "*Y*". To compile with MPI, set the ACC_ENABLE_MPI varible in the util/dist_prefs file to "*Y*".

There is a plethora of information on the web about OpenMP and MPI. Briefly, with OpenMP, computation is done on a number of cores on the machine you are connected to. With OpenMP, simply set the number of threads by setting the environment variable OMP_NUM_THREADS before running the program. Example:

export OMP_NUM_THREADS=8

An MPI program can run with multiple cores on a single machine or be distributed accross a cluster. How to run on a cluster is cluster dependent so see your local cluster Guru for details (for Cornell's Compute Farm documentation is here). For running an MPI program on a single machine, use the mpiexec or mpirun (which ever works for you) command. For example the command might look something like:

mpiexex -np 12 ../production/bin/lux_mpi

where the -np switch sets the number of threads.
Topic revision: r8 - 19 Apr 2024, DavidSagan



  • ACC/ACL Web

  • CLASSE Computing Info
  • CLASSE

Create personal sidebar

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback