Back to home page

EIC code displayed by LXR

 
 

    


Warning, /jana2/src/examples/SubeventCUDAExample/README.md is written in an unsupported language. File is not indexed.

0001 # Run on JLab ifarm GPUs
0002 
0003 This is an example that can run on a single GPU.
0004 
0005 1. On the `ifarm` node, ask for a GPU compute node with 8000 MB memory.
0006 
0007     ```bash
0008     module load cuda
0009 
0010     srun --gres gpu:${gpu_type}:1 -p gpu --mem-per-cpu=8000 --pty bash
0011     ```
0012     ${gpu_type} can be `T4`, `TitanRTX` or `A100`.
0013 
0014 2. On the compute node, build the whole application with cmake option "USE_CUDA=On".
0015 
0016    ```bash
0017     # bash-4.2$ rm -rf build/*
0018     bash-4.2$ cmake -DUSE_CUDA=On -S . -B build  # add the cmake option to config
0019     #### output
0020     #-- Found CUDA: /apps/cuda/11.4.2 (found version "11.4")
0021     bash-4.2$ cmake --build build -j 32 --target install  # build and install as normal
0022    ```
0023    Launch the application.
0024    ```bash
0025    bash-4.2$ ./install/bin/SubeventCUDAExample
0026    ```
0027