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

merge latest master #3

Merged
merged 6 commits into from
Apr 2, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
conda: Macros: add '-L' argument to the linker command (CICE-Consorti…
…um#418)

On Linux, compiling CICE in serial mode under the conda environment
currently fails as the linker does not find the NetCDF libraries.

Compiling in parallel mode does work as the MPI compilation wrappers
seem to pass the necessary flag to the linker under the hood.

Explicitely tell the linker the location of the libraries using the
`SLIBS` variable in the Macros file. To be on the safe side, also do it
on macOS.
phil-blain authored Mar 26, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 9040fe2be7146638ced75f36a513b665828db844
2 changes: 1 addition & 1 deletion configuration/scripts/machines/Macros.conda_linux
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ LD:= $(FC)
MODDIR += -I$(CONDA_PREFIX)/include

# Libraries to be passed to the linker
SLIBS := -lnetcdf -lnetcdff
SLIBS := -L$(CONDA_PREFIX)/lib -lnetcdf -lnetcdff

# Necessary flag to compile with OpenMP support
ifeq ($(ICE_THREADED), true)
2 changes: 1 addition & 1 deletion configuration/scripts/machines/Macros.conda_macos
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ MODDIR += -I$(CONDA_PREFIX)/include
CFLAGS_HOST = -isysroot$(shell xcrun --show-sdk-path)

# Libraries to be passed to the linker
SLIBS := -lnetcdf -lnetcdff
SLIBS := -L$(CONDA_PREFIX)/lib -lnetcdf -lnetcdff

# Necessary flag to compile with OpenMP support
ifeq ($(ICE_THREADED), true)