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

Allow build flexibility for ufs-utils utilities. #836

Merged
merged 2 commits into from
Jul 17, 2023

Conversation

aerorahul
Copy link
Contributor

@aerorahul aerorahul commented Jul 15, 2023

DESCRIPTION OF CHANGES:

This PR:

  • allows a user the flexibility to call the build_all.sh script from anywhere; thereby relaxing the need to cd into the cloned ufs_utils directory. This capability is used in the build system for the GFS and GEFS.
  • allows the user to specify a build directory (the default is retained as ./build)
  • allows a user to reuse a previously created build directory (the default is to create a new ./build directory with every execution of `build_all.sh as was before)
  • allows user to provide an installation prefix (the default is retained as the current directory)

The default behaviors have not been altered in this PR. Users should see no impact with this change.

TESTS CONDUCTED:

  • Compile branch on all Tier 1 machines using Intel (Orion, Jet, Hera and WCOSS2).
  • Compile branch on Hera using GNU.
  • Compile branch in 'Debug' mode on WCOSS2.
  • Run unit tests locally on any Tier 1 machine. (Done on Hera.)

Describe any additional tests performed.
The executables created from develop and this branch are identical. No additional tests were performed.

DEPENDENCIES:

None

DOCUMENTATION:

No updates are necessary.

@GeorgeGayno-NOAA
Copy link
Collaborator

I tried a default build on Hera. Although -BUILD_TESTING=OFF by default, it tried to build the tests:

-- Set BUILD_TESTING to YES and build unit testing package under tests

Then, it failed trying to install the tests in /usr/local/bin:

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/emcsfc_ice_blend
CMake Error at sorc/emcsfc_ice_blend.fd/cmake_install.cmake:47 (file):
  file INSTALL cannot copy file
  "/scratch1/NCEPDEV/stmp2/George.Gayno/UFS_UTILS/build/sorc/emcsfc_ice_blend.fd/emcsfc_ice_blend"
  to "/usr/local/bin/emcsfc_ice_blend": Success.

@aerorahul
Copy link
Contributor Author

I tried a default build on Hera. Although -BUILD_TESTING=OFF by default, it tried to build the tests:

-- Set BUILD_TESTING to YES and build unit testing package under tests

Then, it failed trying to install the tests in /usr/local/bin:

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/emcsfc_ice_blend
CMake Error at sorc/emcsfc_ice_blend.fd/cmake_install.cmake:47 (file):
  file INSTALL cannot copy file
  "/scratch1/NCEPDEV/stmp2/George.Gayno/UFS_UTILS/build/sorc/emcsfc_ice_blend.fd/emcsfc_ice_blend"
  to "/usr/local/bin/emcsfc_ice_blend": Success.

My apologies @GeorgeGayno-NOAA
I was quoting the arguments for CMAKE_FLAGS and shouldn't have been. Its been fixed and I tested on Hera.

@GeorgeGayno-NOAA GeorgeGayno-NOAA merged commit 9d1622b into ufs-community:develop Jul 17, 2023
@aerorahul aerorahul deleted the feature/build-opts branch July 17, 2023 21:07
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