Skip to content

Template and instructions on running chrono gpu projects on Agave.

Notifications You must be signed in to change notification settings

juliantao/chgpu_agave_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A template ChronoGPU project to run on Agave

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.

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.

See the workflow website for detailed information.

  1. Logon to the Agave cluster
  1. Navigate to your workspace

    For example,

cd Workspace/Chrono

Note: 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. See the workflow website for detailed information.

  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

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

    Note that if you want to keep the project names and file names, neglect the renaming and searching/replacing processes in the following steps. This way, you only need to modify the technical contents and it may save some time. The downside is when you have multiple projects, all of the executives will have the same name. It may cause confusions in the long run.

  5. If you prefer, 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

  6. Edit the source cpp and json files for your project. Add .obj files to the data subfolder as needed.

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

About

Template and instructions on running chrono gpu projects on Agave.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published