8000 GitHub - hyan46/ASUAgaveGuide
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hyan46/ASUAgaveGuide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Guide to Agave Cluster

The information of the guideline can be found in Research Computing | Get Started | Core Facilities

Login to the Agave cluster

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!

Prepare your environment (Optional, Only for Python)

Follow the guideline: Using anaconda environments - Research Computing - ASU Research Computing Confluence

  1. Run the following commands to create environment
    module load anaconda/py3
    conda create -n ENV_NAME  # Create a new environment
        
  2. Install your environment with required packages
    source activate ENV_NAME
    conda install numpy # Install all pacakge you need
        

Upload your code and data

There are multiple ways of uploading your code and data.

  1. 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
  2. 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.

  3. Use software that supports sftp Examples:
    • Use WinSCP in windows
    • Use Fugu or CyberDuck for mac
  4. Use git You can use git clone to get the code from the repository, which is generally recommended for code upload.

Prepare your code with additional bash file

  1. 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.
  2. 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
              
  3. 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.

  4. Please remember to save the files with the i in your file name so each node is saving into different file name.

Submit your code

sbatch run.sh

This will submit the code with diffurent SLURM_ARRAY_TASK_ID into different computational nodes.

Check you code status

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.

Collect results

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0