Using Agave

A template ChronoGPU project to run on Agave

GitHub repo: chgpu_agave_template

To test run the template project on Agave

Warning

In order to use the google drive and git as instructed, you need to update your personal configure files for rclone and git on the cluster first.

Note

If you prefer to use GUI tools for git operations, neglect the corresponding command line instructions below and go ahead and use the GUI tools you are familiar with. Do note that using the command line could potentially streamline your workflow and improve your efficiency further.

  1. Logon to the Agave cluster
ssh your.username@asu.agave.edu
  1. Navigate to your workspace

    For example,

cd Workspace/Chrono

Your working directory may be different from mine. It is recommended to have a directory called something like “Workspace” in your home directory to host all your projects

  1. Clone this repo
git clone https://github.com/JulianTao/chgpu_agave_template.git
  1. Navigate to the new directory
cd chgpu_agave_template
  1. Examine the directory structure
ls -al

It includes:

  • a CMakeList.txt
  • a bash file to be run by sbatch
  • a .gitignore file to ignore the output and log files for git operations
  • source files
    • mychgpu.cpp
    • GpuDemoUtils.hpp
    • mychgpu.json
  1. Edit mychgpu.sh if needed, following the instructions inside

  2. Run the bash file

sbatch mychgpu.sh
  1. Examine the OUTPUT directory and the log files .err and .out.
  2. Examine the shared google drive, there should be a new folder data folder with the name specified in the bash script.

To create your own project based on the template

Warning

In order to use git as instructed below, you need to configure git first on your computer.

  1. On GitHub, navigate to the main page of the repository. chgpu_agave_template
  2. Above the file list, click Use this template, which usually appears in green.
  3. Type a name for your repository, and an optional description. The project name should be concise but indicative, e.g., “sample_prep”. For a more comprehensive instruction on how to create a repo from a template, check here
Note

Instead of using “template”, you can also “fork” the repo and then update the settings such as repo name etc. There are some differences though, as discussed here

  1. On your own computer, clone the new repo.

  2. Rename the cpp,json, sh files with your project name. For example, mychgpu.cpp –> sample_prep.cpp; mychgpu.json –> sample_prep.json; and mychgpu.sh –> sample_prep.json

  3. Edit the source cpp and json files for your project.

  4. Update the CMakeList.txt file:

    Replace the word mychgpu with your project name.

    For example, change

set(MY_PROJECT mychgpu)

to

set(MY_PROJECT sample_prep)
  1. Update the mychgpu.sh file
  • Search and replace all instances of mychgpu with your project name, e.g., sample_prep
  • Update the slurm requests as shown in the example bash script.
  1. Commit the changes and push to the github repo.
git add --all
git commit -m 'update to sample_prep'
git push
  1. Repeat the steps the same as in the “test run” example above, except that you work on the new project repo.
  2. Congratulations, you run your first ChronoGPU project on Agave.