Simulated Scan Strategies

This lesson is about...

In [6]:
# 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
Running on NERSC machine 'cori'
  with access to repos: mp107, desi, m1759, cosmo
Using default repo mp107

Running in Parallel

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:

In [12]:
%%writefile simscan.py

import toast
from toast.mpi import MPI
Overwriting intro.py
In [13]:
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