Attention

SCARF is migrating to Rocky 9, please see Rocky 9 Migration for details on the Rocky 9 cluster

mcstas

Note

SCARF is migrating to the SLURM batch system, instructions on this page which refer to LSF commands, parameters or configuration do not apply to SLURM. Please see our SLURM page for more information.

RHEL7 Modules:

mcstas/2.4.1-intel-17.0.2
mcstas/2.7.1-intel-2019b

Description for mcstas:

Description from McStas website: “McStas is a general tool for simulating neutron scattering instruments and experiments. It is actively supported by DTU Physics, NBI KU, ESS, PSI and ILL.”

Using mcstas:

McStas is run on the command line using a job submission script eg:

#!/bin/bash
#SBATCH -n 4 #### Number of cores to use
#SBATCH -o %j.o
#SBATCH -e %j.e
# Run for 60 hours
#SBATCH -t 60:00:00
#SBATCH --exclusive

#Load desired
module load mcstas/2.4.1-intel-17.0.2

# compiling the c file
mcstas -I <path_to_instrument_files> -t -o <c_file> <instr_file>
# compiling using mpicc
mpicc -o <outputfile> <c_file> -lm -DUSE_MPI
# running
mcrun <outputfile> --ncount=<neutrons> --format=PGPLOT --mpi=auto
wait

Submit using:

[me@scarf]$ sbath jcl

Where jcl is the name of the job submission script file from above. To change the number of cores, please make sure to change the #SBATCH -n value.

To monitor your jobs progress use the normal LSF batch commands eg:

[me@scarf]$ squeue -u <username>

or

[me@scarf]$ squeue -u <username> -l

ISIS_tables have been added to McStas.

Documentation for mcstas:

The McStas manual can be found on: http://www.mcstas.org/documentation/manual/mcstas-2.0-manual.pdf