Using Agave
A template ChronoGPU project to run on Agave
GitHub repo: chgpu_agave_template
To test run the template project on Agave
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.
- Logon to the Agave cluster
ssh your.username@asu.agave.eduNavigate to your workspace
For example,
cd Workspace/ChronoYour 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
- Clone this repo
git clone https://github.com/JulianTao/chgpu_agave_template.git- Navigate to the new directory
cd chgpu_agave_template- Examine the directory structure
ls -alIt 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
Edit
mychgpu.shif needed, following the instructions insideRun the bash file
sbatch mychgpu.sh- Examine the
OUTPUTdirectory and the log files.errand.out. - 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
In order to use git as instructed below, you need to configure git first on your computer.
- On GitHub, navigate to the main page of the repository. chgpu_agave_template
- Above the file list, click
Use this template, which usually appears in green. - 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
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
On your own computer, clone the new repo.
Rename the
cpp,json,shfiles with your project name. For example,mychgpu.cpp–>sample_prep.cpp;mychgpu.json–>sample_prep.json; andmychgpu.sh–>sample_prep.jsonEdit the source
cppandjsonfiles for your project.Update the
CMakeList.txtfile:Replace the word
mychgpuwith your project name.For example, change
set(MY_PROJECT mychgpu)to
set(MY_PROJECT sample_prep)- Update the
mychgpu.shfile
- Search and replace all instances of
mychgpuwith your project name, e.g.,sample_prep - Update the slurm requests as shown in the example bash script.
- Commit the changes and push to the github repo.
git add --all
git commit -m 'update to sample_prep'
git push- Repeat the steps the same as in the “test run” example above, except that you work on the new project repo.
- Congratulations, you run your first ChronoGPU project on Agave.