ROOT-Sim ships with two sample models in the models folder of the project: pcs and phold. For example, to compile the pcs model simply run:

cd models/pcs
{installdir}/bin/rootsim-cc *.c

If you installed ROOT-Sim system-wide the second command becomes simply:

rootsim-cc *.c -o model

To test the correctness of the model, it can be run sequentially, typing:

./model --serial --lp <number of required LPs> This allows to spot errors in the implementation more easily.

Then, to run it in parallel, type:

./model --wt <number of desired threads> --lp <number of required LPs>

To run in a distributed environment, you can use standard MPI commands, such as:

mpiexec -n 2 --hostfile hosts --map-by node ./model --wt 2 --lp 16

This command runs the simulation model on two nodes (-n 2) specified in the hosts file. Each node uses two concurrent threads (--wt 2). The simulation involves 16 total Logical Processes (--lp 16).