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

Compile Errors with GCC version 10> #237

Open
sit23 opened this issue Jun 7, 2022 · 2 comments
Open

Compile Errors with GCC version 10> #237

sit23 opened this issue Jun 7, 2022 · 2 comments
Labels
infrastructure Isca infrastructure: installation, CI, HPC setups

Comments

@sit23
Copy link
Contributor

sit23 commented Jun 7, 2022

Errors with most recent g-fortran and gcc compilers

Description

I've been testing out the gfortran installation of Isca on AWS EC2 Ubuntu and have run into problems with new compiler errors that I hadn't seen before. These are principally:

Error: Type mismatch between actual argument at (1) and actual argument at (2) **********.

and

Error: BOZ literal constant at (1) is neither a data-stmt-constant nor an actual argument to INT, REAL, DBLE, or CMPLX intrinsic function [see '-fno-allow-invalid-boz']

This appears to be because the more recent versions of GCC compilers are now throwing errors in both of these cases where they were not previously doing so.


Isca version
Main ExeClim version


System Information:
system='Linux', node='ip-172-31-47-194', release='5.15.0-1004-aws', version='#6-Ubuntu SMP Thu Mar 31 09:44:20 UTC 2022', machine='x86_64'

This is an EC2 AWS instance.

One workaround for this is to pass extra compiler flags. To do this, add the following line to your experiment script:

cb.compile_flags.extend(['-fallow-argument-mismatch', '-fallow-invalid-boz'])

This tells the compiler to turn these two error types into warnings, thus allowing the model to compile. In future we should look to fix the errors or automatically include these flags.

@sit23 sit23 added the infrastructure Isca infrastructure: installation, CI, HPC setups label Jun 7, 2022
@ntlewis
Copy link
Contributor

ntlewis commented Jun 8, 2022

@sit23 Just wanted to link this to P/R #236 which was me beginning to have a crack at fixing this. It's also causing the trip tests to fail (because they use these more recent compilers). Unfortunately it's not a one line change, so I've put this on hold until I have the time to finish properly.

@ntlewis
Copy link
Contributor

ntlewis commented Jun 8, 2022

I hadn't spotted that other compiler flag, I'll add that into my P/R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Isca infrastructure: installation, CI, HPC setups
Projects
None yet
Development

No branches or pull requests

2 participants