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

Rebuild issue with Intel fortran and -warn all #373

Open
mennodeij opened this issue Aug 16, 2022 · 3 comments
Open

Rebuild issue with Intel fortran and -warn all #373

mennodeij opened this issue Aug 16, 2022 · 3 comments

Comments

@mennodeij
Copy link

mennodeij commented Aug 16, 2022

If I build the attached small test project with Intel Fortran and use the following cmake commandline:

FC=ifort cmake <path/to/smalltest> -DPFUNIT_DIR=<path/to/pFUnit>/cmake -D
CMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_Fortran_FLAGS_RELWITHDEBINFO="-O2 -g -warn all,noexternals"

then issue the following make/rebuild commands:

make && ctest && make clean && make

the second make will fail. I have tracked this to the use of -warn all, and -warn all,nointerfaces solves the problem.

I don't know why -warn all gives problems, while -warn all,nointerfaces does not. Possibly related to the generation of *_genmod.mod files

smalltest.zip

@tclune
Copy link
Member

tclune commented Sep 5, 2022

Apologies - things got a but busy with my day job and I'm only now circling back to some of the recent tickets. (I guess thta's what holiday weekends are for! :-)

I'm happy to adjust the flags along the lines you suggest, but will first attempt to read the man pages in the hope of getting a clue why "nointerfaces" is needed.

@tclune
Copy link
Member

tclune commented Sep 5, 2022

OK - on my OSX system, your reproducer actually fails on the first make. I'm thinking this is an Intel compiler bug.
First, because it gives different behavior on subsequent passes on your system, but also because nointerfaces is the default setting.

I will attempt to submit a reproducer to Intel.

@mennodeij
Copy link
Author

Thanks for looking into this and I agree that it is probably a compiler bug. If I can help getting this to the attention of Intel, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants