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

Develop 162 draft wrapper #2

Merged
merged 4 commits into from
Oct 21, 2022
Merged

Conversation

mattldawson
Copy link
Owner

@mattldawson mattldawson commented Oct 19, 2022

closes ESCOMP#162 on TUV-x repo.

Includes wrapper for TUV-x in CAM with initialization and finalization functions. TUV-x cores are initialized for each OpenMP thread and each MPI task.

Temporarily copies TUV-x configuration data to run directory for use during development until https://github.com/NCAR/tuv-x/issues/163 is completed.

Linking the TUV-x, json-fortran, and musica libraries required a minor modification to CMEPS. I will follow up with CIME developers to see if there is a better way to do this.

FOLLOW UP: I met briefly with Jim Edwards and showed him this approach to build the libraries. He said it looked ok high-level, and that we can submit a PR to CMEPS for the modification and they would go over it in more detail then.

Comment on lines 123 to 131
#ifdef _OPENMP
use omp_lib, only : omp_get_thread_num
#endif

#ifdef _OPENMP
thread_id = omp_get_thread_num( )
#else
thread_id = 1
#endif
Copy link
Owner Author

Choose a reason for hiding this comment

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

@fvitt - is this the right way to know if OpenMP is being used? It doesn't seem to be used in the modeling2 configuration I've been using, but I saw code similar to this in other parts of CAM

@mattldawson mattldawson merged commit 46ff4f3 into develop-add-tuvx Oct 21, 2022
@mattldawson mattldawson deleted the develop-162-draft-wrapper branch October 21, 2022 17:38
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.

2 participants