EMSES-tutorials

Initial Tutorial (Running EMSES)

Follow the steps below to set up and run EMSES on Kyoto University’s supercomputer camphor.


1. Development Environment Setup

Goal: Connect to the supercomputer remotely from VSCode.


2. Environment Configuration and EMSES Installation

Goal: Secure storage space, install dependencies, and set up EMSES.

# Secure storage space
mkdir /LARGE0/gr20001/$USER
ln -s /LARGE0/gr20001/$USER ~/large0

# Add environment variables to .bashrc
grep -qxF 'module load intel-python' ~/.bashrc || echo 'module load intel-python' >> ~/.bashrc
grep -qxF 'export PATH="$PATH:$HOME/.local/bin"' ~/.bashrc || echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc

exec $SHELL -l

# Install tutorial repository
mkdir ~/large0/Github
cd ~/large0/Github
git clone https://github.com/CS12-Laboratory/EMSES-tutorials.git
cd EMSES-tutorials
pip install -r requirements.txt # includes: git+https://github.com/CS12-Laboratory/MPIEMSES3D.git

# Open in VSCode
code --reuse-window ~/large0/Github/EMSES-tutorials
Details: Installing EMSES (MPIEMSES3D) **For end-users (non-developers)** Already included when running `pip install -r requirements.txt`: ```bash pip install git+https://github.com/CS12-Laboratory/MPIEMSES3D.git ``` **For developers** ```bash cd ~/large0/Github git clone https://github.com/CS12-Laboratory/MPIEMSES3D.git cd MPIEMSES3D pip install -e . # runs make ```

3. Preparing Execution

Goal: Set up executable files and submit jobs.

emses-cp dshield0/ # = cpem dshield0/
emses-cp dshield1/
emses-cp dshield2/
cd ~/large0/Github/EMSES-tutorials/dshield0
mysbatch job.sh

mysbatch: A custom command (from camptools) that reads nodes(:) from plasma.inp, sets the process count in job.sh, and then runs sbatch.


4. Job Monitoring and Management


5. Checking Job Completion


6. Visualization

Method 1: Generate PNG/GIF with .mypython/plot.py Example: phisp_2d_xy.png plot

Method 2: Use Jupyter Notebook (dshield0/plot_example.ipynb)

  1. Python interpreter setup

    • Example using venv:

      cd ~/large0
      /usr/bin/python3.11 -m venv .venv
      # reinstall
      ~/large0/.venv/bin/python -m pip install -r ~/large0/Github/EMSES-tutorials/requirements.txt
      ~/large0/.venv/bin/python -m pip install -U emout
      

      Then select ~/large0/.venv/bin/python in VSCode.

    • Or specify camphor’s Intel-Python: /opt/system/app/intelpython/2024.2.0/bin/python

    select-interpreter

  2. References


7. Simulation Extensions


8. Predicting Results

Q1. What does the potential distribution look like in ds0? Q2. What changes occur in ds1? Q3. How do electrons and ions behave in ds1? Q4. How does ds2 differ? Q5. What is the effect of changing temperature?


9. Practice Tasks


10. How to Study


References


Do you want me to also polish this into a shorter “quick start” handout (like one page with only the essential steps), or keep it as a full manual style?