-
Notifications
You must be signed in to change notification settings - Fork 251
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
Changes to build UFS-WM on MacOS platform with clang@15/[email protected] #2551
base: develop
Are you sure you want to change the base?
Conversation
@grantfirl new fv3 hash is NOAA-EMC/fv3atm@7d99880 |
no changes from develop branch for the build.sh script
Successfully tested the build of the code (S2SWA) with the hash 7d99880 on NOAA AWS MacOS instance. |
if mode() == "load" then | ||
LmodMsgRaw([===[ | ||
Please export these env. variables after the module is successfully loaded: | ||
> export LDFLAGS+=" -L${libjpeg_turbo_ROOT}/lib -ljpeg -Wl,-rpath,$libjpeg_turbo_ROOT}/lib -L${jasper_ROOT}/lib -ljasper -Wl,-rpath,${jasper_ROOT}/lib -L${libpng_ROOT}/lib -lpng -Wl,-rpath,${libpng_ROOT}/lib " |
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.
This seems like a hack to me. Can't this be done in the modulefile?
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.
@climbfuji - it seems that @DavidHuber-NOAA found a great solution (below in a comment) that worked seamlessly!.. Will update the branch with that approach.
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.
Oops, that was preliminary, the env. variables ${libjpeg_turbo_ROOT}, ${jasper_ROOT}, ${libpng_ROOT} do not expand into full paths during the build... so getting linking issues.
The is is that these variables are not available when the Lmod file is being evaluated - this is a specifics of the Lmod. It is evaluated first before being executed/loaded.
I will attempt to find some other solutions, but so far other solutions appear to be cumbersome.
I can't review this because I don't have a mac to test on.
…On Thu, Jan 9, 2025 at 5:21 PM Natalie Perlin ***@***.***> wrote:
@natalie-perlin <https://github.com/natalie-perlin> requested your review
on: #2551 <#2551>
Changes to build UFS-WM on MacOS platform with ***@***.******@***.***
—
Reply to this email directly, view it on GitHub
<#2551 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANDS4FTDMEM5R7I4TAAYVNL2J3Y5XAVCNFSM6AAAAABUW5GLMOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVHA3TIMRVGY3DSMY>
.
You are receiving this because your review was requested.Message ID:
***@***.***
com>
--
George W Vandenberghe
*Lynker Technologies at * NOAA/NWS/NCEP/EMC
5830 University Research Ct., Rm. 2141
College Park, MD 20740
***@***.***
301-683-3769(work) 3017751547(cell)
|
@natalie-perlin do you think you can combine ufs_macosx.gnu into ufs_macosx.gnu.lua? I mean like https://github.com/ufs-community/ufs-weather-model/blob/develop/modulefiles/ufs_wcoss2.intel.lua. Also, some test result or instruction will be helpful for people using mac even in sequential mode. |
if mode() == "load" then | ||
LmodMsgRaw([===[ | ||
Please export these env. variables after the module is successfully loaded: | ||
> export LDFLAGS+=" -L${libjpeg_turbo_ROOT}/lib -ljpeg -Wl,-rpath,$libjpeg_turbo_ROOT}/lib -L${jasper_ROOT}/lib -ljasper -Wl,-rpath,${jasper_ROOT}/lib -L${libpng_ROOT}/lib -lpng -Wl,-rpath,${libpng_ROOT}/lib " | ||
]===]) |
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.
Untested, but something like this should work:
if mode() == "load" then | |
LmodMsgRaw([===[ | |
Please export these env. variables after the module is successfully loaded: | |
> export LDFLAGS+=" -L${libjpeg_turbo_ROOT}/lib -ljpeg -Wl,-rpath,$libjpeg_turbo_ROOT}/lib -L${jasper_ROOT}/lib -ljasper -Wl,-rpath,${jasper_ROOT}/lib -L${libpng_ROOT}/lib -lpng -Wl,-rpath,${libpng_ROOT}/lib " | |
]===]) | |
local ldflags=os.getenv("LDFLAGS") or "" | |
setenv("LDFLAGS", ldflags .. " -L${libjpeg_turbo_ROOT}/lib -ljpeg -Wl,-rpath,$libjpeg_turbo_ROOT}/lib -L${jasper_ROOT}/lib -ljasper -Wl,-rpath,${jasper_ROOT}/lib -L${libpng_ROOT}/lib -lpng -Wl,-rpath,${libpng_ROOT}/lib ") |
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.
if mode() == "load" then | ||
LmodMsgRaw([===[ | ||
Please export these env. variables after the module is successfully loaded: | ||
> export LDFLAGS+=" -L${libjpeg_turbo_ROOT}/lib -ljpeg -Wl,-rpath,$libjpeg_turbo_ROOT}/lib -L${jasper_ROOT}/lib -ljasper -Wl,-rpath,${jasper_ROOT}/lib -L${libpng_ROOT}/lib -lpng -Wl,-rpath,${libpng_ROOT}/lib " |
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.
You're missing a {
here. The $libjpeg_turbo_ROOT}
should be ${libjpeg_turbo_ROOT}
Without that, it would fail with a syntax error.
How did you test this?
Description:
Updates to build UFS WM on MacOSX platforms, Ventura or Sonoma OS, [email protected], [email protected]
openmpi/5.0.3 (or 4.1.6, tested as well) is built as a part of the spack-stack-1.8.0.
Tested on three MacOS systems:
Files changed:
Running of the UFS-WM was tested as a part of the UFS-SRW App, successfully ran a standard community test. A corresponding PR in the UFS-SRW repo:
ufs-community/ufs-srweather-app#1171
Priority:
(TBD)
Git Tracking
No regular testing of UFS-WM on MacOS systems is being done
This PR addresses the issues from #2371,
and uses the solution proposed.
UFSWM Blocking Dependencies:
Uses spack-stack-1.8.0
#2453
except for using mapl-2.40.3-esmf-8.6.0 required for the current ufs-wm build
At the moment, all the modules are loaded in the ufs_macosx.gnu.lua file; ufs_common.lua not used
Changes
Library Changes/Upgrades:
Directions for building spack-stack
Detailed directions to build spack-stack-1.8.0 with the software versions used in this PR:
https://docs.google.com/document/d/1Z0L7eujZGtyeZRzcgguyZPsZpkwb2Om7UhFqQPVtxnE/edit?usp=sharing
Testing Log: