Skip to content

Latest commit

 

History

History
92 lines (74 loc) · 2.19 KB

File metadata and controls

92 lines (74 loc) · 2.19 KB

Guide to Optimization on Amarel

Setup Git Repositories

Clone EIANN and nested into amarel login node. Switch to pre_release branch for nested.

$ git clone https://github.com/Milstein-Lab/EIANN.git
$ git clone https://github.com/neurosutras/nested.git
$ cd nested
nested$ git checkout pre_release

Dependencies

Setup conda environment and local installation for EIANN

nested$ cd ../EIANN
EIANN$ conda create --name eiann python=3.11
EIANN$ conda activate eiann
EIANN$ pip install -r requirements.txt
EIANN$ conda install anaconda::mpi4py
EIANN$ pip install --target ~/miniconda/envs/eiann/lib/python3.11/site-packages -e .

Modules

Load required modules

EIANN$ cd ..
$ module use /projects/community/modulefiles
$ module load openmpi/4.1.6

Editing .bashrc

This above procedure would require you to type that all out every time you ssh into Amarel. Instead, you can add instructions to the .bashrc file so that the conda environment is automatically activated and the required modules are loaded. First, open up the file:

vim ~/.bashrc
i

Then, add this to the end of the file (loading modules and adding directories to PYTHONPATH):

# Load OpenMPI and activate conda environment when in EIANN directory
if [[ "$PWD" == *"/EIANN" ]]; then
    module use /projects/community/modulefiles
    module load openmpi/4.1.6
    if [[ "$CONDA_DEFAULT_ENV" != "eiann" ]]; then
        conda activate eiann
    fi
else
    if [[ "$CONDA_DEFAULT_ENV" == "eiann" ]]; then
        conda deactivate
    fi
fi

# Add EIANN and nested directories to PYTHONPATH
export PYTHONPATH=$PYTHONPATH:/home/yc1376

Where <user> is the Amarel username (found with echo $USER).

Now, save and quit the vim session.

<esc>
:wq

Save the changes:

source ~/.bashrc

Making a jobscript

Now to make jobscript, model it on EIANN/EIANN/optimize/jobscripts/optimize_EIANN_amarel.sh

Navigation

To navigate between Home and Scratch directories:

$ cd /home/$USER
$ cd /scratch/$USER

Interactive Session

To just setup an interactive session to run smaller tasks, do this:

srun --cpus-per-task=6 --time=00:30:00 --pty bash