The information of the guideline can be found in Research Computing | Get Started | Core Facilities
ssh ASURITE@agave.asu.edu
Please replace the ASURITE with your ASU ID.
After that you will be login to the Login Node
, which is a node to set up your enviornment and submit jobs, not for computing!
Follow the guideline: Using anaconda environments - Research Computing - ASU Research Computing Confluence
- Run the following commands to create environment
module load anaconda/py3 conda create -n ENV_NAME # Create a new environment
- Install your environment with required packages
source activate ENV_NAME conda install numpy # Install all pacakge you need
There are multiple ways of uploading your code and data.
- You can use
dropbox
to upload the files to the server. Here is the guide of using Dropbox. Dropbox Uploader - Research Computing - ASU Research Computing Confluence - To use command line
scp
, you can use the following (LINUX or Mac only)scp PATH_TO_YOUR_FILE ASURITE@agave.asu.edu:~
Please change the PATH_TO_YOUR_FILE with the file with your names.
- Use software that supports sftp
Examples:
- Use WinSCP in windows
- Use Fugu or CyberDuck for mac
- Use git
You can use
git clone
to get the code from the repository, which is generally recommended for code upload.
- You need to prepare a bash file
run.sh
to be able to submit the code.Here are some examples Here are some explanations
- #SBATCH –mem-per-cpu=512 # Specify the memory per each node, here is 512MB
- #SBATCH –job-name=’test’ # Name of your job, can change
- #SBATCH –error=job.%J.err # Error files output, can leave as it is
- #SBATCH –output=job.%J.out # files standard output, can leave as it is
- #SBATCH –array 1-10 # Important, change as you needed, this
69D1
says how many iterations it will run. In general, this number will be passed into each computation node with the variable
SLURM_ARRAY_TASK_ID
in your code.
run.sh
file examples- MATLAB example
#!/bin/sh #SBATCH --mem-per-cpu=512 #SBATCH --job-name='test' #SBATCH --error=job.%J.err #SBATCH --output=job.%J.out #SBATCH --array 1-3 module load matlab/2016a matlab -nodisplay -r "run, quit"
This is similar as above.
- Python example
#!/bin/sh #SBATCH --mem-per-cpu=512 #SBATCH --job-name='test' #SBATCH --error=job.%J.err #SBATCH --output=job.%J.out #SBATCH --array 1-10 module purge # Always purge modules to ensure consistent environments # Load required modules for job's environment module load anaconda/py3 source activate pytorch python test.py source deactivate pytorch
- MATLAB example
- Prepere your code. You need to add the following in your code:
- Python exmaple:
i = int(os.environ["SLURM_ARRAY_TASK_ID"])
- Matlab example:
i=str2num(getenv('SLURM_ARRAY_TASK_ID'));
This basically load the variable
SLURM_ARRAY_TASK_ID
into your file. This will be used as a seed in your random number generator in your simulation study. - Python exmaple:
- Please remember to save the files with the
i
in your file name so each node is saving into different file name.
sbatch run.sh
This will submit the code with diffurent SLURM_ARRAY_TASK_ID
into different computational nodes.
You can use squeue
to check the status of all jobs
It is often convinient to search only your jobs by
squeue|grep ASURITE
. Please replace the ASURITE with your ASU ID.
Please go into the saved files to check results. If the saved files are not generated or the result is not correct. Please check in job.ID.err
to see if there are any errors showing up.