You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

subsection: impact + bmad

uses code from Eric's https://github.com/ericcropp/Impact-T_Examples

Via Open OnDemand:

(no port forwarding needed)

  1. login to open ondemand at https://s3df.slac.stanford.edu/ondemand
  2. click on the top menu bar and choose interactive apps → Jupyter
  3. Select Custom for Jupyter Image
  4. Select Apptainer Image
  5. Set the "Commands to initate Jupyter" to be:
  6. # Set the environment variable for the Apptainer image path
    export APPTAINER_IMAGE_PATH=/sdf/group/facet/sanjeev/containers/impact-bmad_latest.sif
    export NOTEBOOK_ROOT=$HOME/impact_bmad_container_notebooks
    mkdir -p $HOME/impact_bmad_container_notebooks
    
    # Define the jupyter function to use Apptainer for executing Jupyter with necessary bindings and running mkdir and cp commands
    function jupyter() {
    apptainer exec -B /sdf,/fs,/sdf/scratch,/lscratch ${APPTAINER_IMAGE_PATH} bash -c "
            mkdir -p ${NOTEBOOK_ROOT} &&
            cp -r /opt/notebooks/* ${NOTEBOOK_ROOT}/";
      	apptainer exec -B /sdf,/fs,/sdf/scratch,/lscratch ${APPTAINER_IMAGE_PATH}  jupyter $@;
    }
  7. Click use JupyterLab instead of Jupyter Notebook
  8. For run on cluster type select: Batch; s3df; account: FACET; Partition Milano
  9. Select number of hours and cores 
  10. Configure rest of settings
  11. Launch and connect
  12. The container will copy the necessary notebooks to $HOME/impact_bmad_container_notebooks. Click on this directory via the jupyter ui and run the Impact / Bmad Sim. 
  13. MPI is being implemented and will work soon
  • No labels