This lesson is about...
# Are you using a special reservation for a workshop?
# If so, set it here:
nersc_reservation = None
# Load common tools for all lessons
import sys
sys.path.insert(0, "..")
from lesson_tools import (
check_nersc,
fake_focalplane
)
nersc_host, nersc_repo = check_nersc(reservation=nersc_reservation)
if nersc_host is not None:
%reload_ext slurm_magic
The NERSC login nodes do not support MPI, so all of the previous examples are running serially. To run in parallel, we can submit a batch job version of the above examples:
%%writefile simscan.py
import toast
from toast.mpi import MPI
if nersc_host is not None:
%srun -N 1 -C knl -n 32 -c 2 --cpu_bind=cores -t 00:03:00 python simscan.py