-
Notifications
You must be signed in to change notification settings - Fork 13
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
Incorporate MICM into build and start chem process structure #114
Open
zmoon
wants to merge
10
commits into
ufs-community:develop
Choose a base branch
from
zmoon:micm-external
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
19a414d
Add MICM as Git submodule (latest release)
zmoon d09805d
Add MUSICA as Git submodule (latest release)
zmoon 46b5303
Revert "Add MUSICA as Git submodule (latest release)"
zmoon fd1ea3c
Revert "Add MICM as Git submodule (latest release)"
zmoon ee3ba6c
Add MUSICA with FetchContent
zmoon eac63f2
Test getting MICM version
zmoon d3d3f53
Group `add_test`s with their `add_executable` blocks
zmoon 75ae399
consistency
zmoon 0f78027
Oops forgot to commit this
zmoon 817b760
Apply suggestions from code review
zmoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zmoon marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module CCPr_Chem_mod | ||
implicit none | ||
|
||
private | ||
public :: get_micm_version | ||
|
||
contains | ||
|
||
function get_micm_version() result(res) | ||
use musica_util, only: string_t | ||
use musica_micm, only: get_micm_version_ => get_micm_version | ||
character(len=256) :: res | ||
|
||
type(string_t) :: micm_version_ | ||
|
||
micm_version_ = get_micm_version_() | ||
res = micm_version_%get_char_array() | ||
|
||
end function get_micm_version | ||
|
||
end module CCPr_Chem_mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set(_lib CATChem_process_chem) | ||
|
||
set(_srcs CCPr_Chem_Mod.F90) | ||
|
||
add_library(${_lib} ${_srcs}) | ||
target_link_libraries(${_lib} PUBLIC CATChem_core) | ||
target_link_libraries(${_lib} PRIVATE musica::musica-fortran) | ||
set_target_properties( | ||
${_lib} | ||
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/include | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program test_chem | ||
use CATChem, only: cc_get_micm_version | ||
use testing_mod, only: assert | ||
implicit none | ||
|
||
character(len=:), allocatable :: micm_version | ||
character(len=*), parameter :: expected_micm_version = "3.7.0" | ||
|
||
micm_version = trim(adjustl(cc_get_micm_version())) | ||
print "('MICM version:', 1x, '''', a, '''')", micm_version | ||
call assert(micm_version == expected_micm_version, & | ||
"MICM version should be "//expected_micm_version) | ||
|
||
end program test_chem |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just nothing that, without adding these, was getting this error:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note, it seems like really it's only necessary to add CXX to get a successful build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@K20shores do you know if there's a way to get MUSICA to build without changing this, by specifying something elsewhere instead? Just curious, as our project code is all Fortran really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zmoon I think this is required. If not, I don't think the linker will be properly configured. I could be wrong though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zmoon I was able to build your fork
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @K20shores , that's good to hear.