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

Compiler error in cloverleaf proxy app. #1418

Open
dpugmire opened this issue Nov 6, 2024 · 2 comments
Open

Compiler error in cloverleaf proxy app. #1418

dpugmire opened this issue Nov 6, 2024 · 2 comments

Comments

@dpugmire
Copy link
Contributor

dpugmire commented Nov 6, 2024

I am building ascent (and all of the dependencies) using: scripts/build_ascent/build_ascent.sh on a macbook M3 with gfortran version: GNU Fortran (Homebrew GCC 14.2.0_1) 14.2.0

I get an error:

84%] Building C object examples/proxies/cloverleaf3d-ref/CMakeFiles/cloverleaf3d_par.dir/timer_c.c.o
cc: error: unknown argument: '-fallow-invalid-boz'
cc: error: unknown argument: '-fallow-argument-mismatch'

google suggests a fix that is already in the cmake.txt:
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
add_compile_options(-fallow-invalid-boz -fallow-argument-mismatch)
endif()

I had to manually build the file with the failure and remove the argments. Once I did that, cloverleaf will build and run.

@cyrush
Copy link
Member

cyrush commented Nov 12, 2024

@dpugmire -- sorry you hit this.

Those flags should already be in there:

if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "10" AND Fortran_COMPILER_FAMILY_IS_GNU)

I wonder if the homebrew version is reporting a strange version?

@cyrush
Copy link
Member

cyrush commented Dec 6, 2024

@dpugmire circling back, it looks like the issue is that the c++ compiler is seeing these flags and does not know what do to with them.

Our logic should only be adding these as Fortran compile options.

Are you also using homebrew as c-compilers?

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

No branches or pull requests

2 participants