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

Simplify link flags in configure #534

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

gassmoeller
Copy link
Member

A suggestion for how to simplify the link options in the configure script. This should be carefully tested on systems with:

  • Intel compiler + MKL
  • GNU compiler without MKL (this worked on my system)
  • GNU compiler with MKL through debian apt
  • GNU compiler with MKL through conda
  • GNU compiler on MacOS with MKL through conda

@illorenzo7
Copy link
Contributor

I at least tested this on Pleiades (intel + mkl) and it fixed my issue with the "$MKL_LIB" appearing in configure instead of "-mkl". (So it now compiles with this fix).

@feathern
Copy link
Contributor

I just tested the GNU compiler with and without MKL (using Openblas through conda). This worked fine for me.

@feathern
Copy link
Contributor

I also just tested the GNU compiler with MKL installed via apt. No problems there either.

@cianwilson
Copy link
Member

I tested this on an intel mac (OS Ventura 13.6.7) using:

conda config --set channel_priority strict
conda env create -f environment.yml
conda activate radev
conda install mkl
export MKLROOT=$CONDA_PREFIX
./configure --FC=mpifort --CC=gcc -conda-mkl
make
make install

which produced a functioning executable (tested on an input_example) despite an ld warning:

ld: warning: object file (cmkdir.o) was built for newer macOS version (13.0) than being linked (11.5)

@gassmoeller
Copy link
Member Author

So that seems pretty good then.

ld: warning: object file (cmkdir.o) was built for newer macOS version (13.0) than being linked (11.5)

Hmm, I cannot see how my change could have affected that, the flags for Macos should be exactly as before. Can you check if setting STD_FLAGS='-lc++' in the lines above resolves the warning? Then it would be related to #532 and not this one.

Copy link
Contributor

@feathern feathern left a comment

Choose a reason for hiding this comment

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

This looks good. We just checked and there was no linking against the standard C++ library. I'm merging.

@feathern feathern merged commit 7a3b31f into geodynamics:main Jun 20, 2024
7 checks passed
@gassmoeller gassmoeller deleted the fix_configure branch June 20, 2024 00:58
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.

4 participants