Skip to content

Updates for compiling on macOS with clang/gfortran or gcc/gfortran#1

Merged
DusanJovic-NOAA merged 3 commits into
DusanJovic-NOAA:ufs_public_releasefrom
climbfuji:dusan_cmake_rt_compile_on_macos_gnu
Dec 3, 2019
Merged

Updates for compiling on macOS with clang/gfortran or gcc/gfortran#1
DusanJovic-NOAA merged 3 commits into
DusanJovic-NOAA:ufs_public_releasefrom
climbfuji:dusan_cmake_rt_compile_on_macos_gnu

Conversation

@climbfuji

Copy link
Copy Markdown
Collaborator

A couple of updates required to build on macOS with clang/gfortran or gcc/gfortran. This has been tested to compile successfully for:

  • old compile.sh script for IPD PROD, CCPP dynamic PROD, CCPP static PROD
  • new compile.sh script for IPD PROD, CCPP dynamic PROD, CCPP static PROD

Comment thread cmake/configure_macosx.gnu.cmake Outdated
set(NETCDF_LIBDIR $ENV{NETCDF}/lib)
set(NETCDF_LIBS -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf)

set(SIONLIB $ENV{SIONLIB})

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Note that all these SIONLIB settings are ignored unless the MAKEOPT string contains SION=Y, hence no implication on your build. Note also that MKL is required on macOS, because the IBM functions in stochastic_physics aren't available on the mac.

Comment thread tests/compile_cmake.sh Outdated

cmake ${PATHTR} ${CCPP_CMAKE_FLAGS}
make -j ${MAKE_THREADS}
make -j ${MAKE_THREADS} VERBOSE=1

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Please remove VERBOSE=1 option. It produces huge log files, which we save in every commit. This is useful for debugging but is not necessary in regular builds. VERBOSE=1 should be also removed from FV3/ccpp/build_ccpp.sh but that's outside the scope of this PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done. Let me know if you prefer to remove the SIONLIB hooks, since they are optional and not needed to run the model. MKL will have to stay for macOS, though.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

If they are not required then yes, please remove the SIONLIB hooks.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@DusanJovic-NOAA DusanJovic-NOAA merged commit d62d01a into DusanJovic-NOAA:ufs_public_release Dec 3, 2019
DusanJovic-NOAA pushed a commit that referenced this pull request Apr 16, 2021
…y#524)

* point to Jun fv3atm personal fork
* add CDEPS submodule
* add building instructions
* fix issues that came from building
* builds CDEPS targets
* missed w3nco dep
* cleanup use of FoX and remove redundant library links in components
* Add 3 files generated by genf90.pl to the CDEPS-interface/ufs directory. (#1)
* remove dependency on genf90.pl for CDEPS/share
* remove FoX (#2)
remove FoX dependency building and use ESMF Config instead.
Co-authored-by: Jun Wang <junwang-noaa@users.noreply.github.com>
Co-authored-by: BinLi-NOAA <bin.li@noaa.gov>
Co-authored-by: Brian Curtis <brian.curtis@noaa.gov>
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