Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable openacc #91

Merged
merged 11 commits into from
Jun 15, 2023
Merged

Enable openacc #91

merged 11 commits into from
Jun 15, 2023

Conversation

K20shores
Copy link
Collaborator

@K20shores K20shores commented Jun 14, 2023

  • Adds support for building openacc
  • Wraps cuda and openacc code in their own namespaces so that function names can be the same if desired
  1. Setup a localrc file
makelocalrc -d . -x -gcc /glade/u/apps/gust/23.04/spack/opt/spack/ncarcompilers/0.8.0/gcc/12.2.0/bin/gcc -gpp /glade/u/apps/gust/23.04/spack/opt/spack/ncarcompilers/0.8.0/gcc/12.2.0/bin/g++ -g77 /glade/u/apps/gust/23.04/spack/opt/spack/ncarcompilers/0.8.0/gcc/12.2.0/bin/gfortran
  1. Start a session
qinteractive -A<AccountNumber> --ngpus=1
  1. Tell nvidia to use this file.
export NVLOCALRC=/glade/u/home/kshores/localrc
  1. Load the modules
module load nvhpc/23.1 cmake/3.25
  1. Build micm with open acc
cd micm/build
cmake -DENABLE_OPENACC=ON -DENABLE_REGESSION_TESTS=OFF -D GPU_TYPE="cc80"  ..
  1. Run the tests
make test

@K20shores K20shores changed the base branch from main to AddForcingTerm_CUDA June 14, 2023 20:22
@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c2cbcf2) 92.71% compared to head (12d261d) 92.71%.

Additional details and impacted files
@@                 Coverage Diff                  @@
##           AddForcingTerm_CUDA      #91   +/-   ##
====================================================
  Coverage                92.71%   92.71%           
====================================================
  Files                       17       17           
  Lines                      961      961           
====================================================
  Hits                       891      891           
  Misses                      70       70           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@sjsprecious sjsprecious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @K20shores for making these changes so quickly! This is extremely helpful for our GPU development efforts and I only have a minor suggestion before merging it.

src/CMakeLists.txt Outdated Show resolved Hide resolved
@K20shores K20shores merged commit 13d44f3 into AddForcingTerm_CUDA Jun 15, 2023
@K20shores K20shores deleted the enable_openacc branch June 15, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants