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

SCREAM build error with updated Fortran interface of SCORPIO #526

Open
dqwu opened this issue Jul 5, 2023 · 5 comments
Open

SCREAM build error with updated Fortran interface of SCORPIO #526

dqwu opened this issue Jul 5, 2023 · 5 comments
Assignees

Comments

@dqwu
Copy link
Contributor

dqwu commented Jul 5, 2023

Steps to reproduce this issue on Perlmutter

git clone https://github.com/E3SM-Project/scream.git
cd scream
git submodule update --init --recursive

cd externals/scorpio
git fetch origin
git checkout master

cd ../../cime/scripts
./create_newcase --machine pm-cpu --case F2010-SCREAMv1-DYAMOND2_ne4pg2_ne4pg2 --compset F2010-SCREAMv1-DYAMOND2 --res ne4pg2_ne4pg2

cd F2010-SCREAMv1-DYAMOND2_ne4pg2_ne4pg2

./case.setup

./case.build

Build error

scream/components/eamxx/src/share/io/scream_scorpio_interface.F90:50:7:
   50 |   use pio_nf,       only: PIO_enddef, PIO_inq_dimid, PIO_inq_dimlen, PIO_inq_varid, &
      |       1
Fatal Error: Cannot open module file 'pio_nf.mod' for reading at (1): No such file or directory
compilation terminated.

Need to decide whether this build error should be fixed on SCORPIO side or on SCREAM side.

@jayeshkrishna
Copy link
Contributor

Does the code work if you change the module included to pio (if so, that should be the fix for this issue)?

use pio,       only: PIO_enddef, PIO_inq_dimid, PIO_inq_dimlen, PIO_inq_varid, &

@dqwu
Copy link
Contributor Author

dqwu commented Jul 11, 2023

Does the code work if you change the module included to pio (if so, that should be the fix for this issue)?

use pio,       only: PIO_enddef, PIO_inq_dimid, PIO_inq_dimlen, PIO_inq_varid, &

With this fix, a new build error is

scream/components/eamxx/src/share/io/scream_scorpio_interface.F90:52:7:

   52 |   use pionfatt_mod, only: PIO_put_att   => put_att
      |       1 
Fatal Error: Cannot open module file 'pionfatt_mod.mod' for reading at (1): No such file or directory

@jayeshkrishna
Copy link
Contributor

All of the pio functions should be available via the pio module, so all these statements should use "use pio" instead

@dqwu
Copy link
Contributor Author

dqwu commented Jul 11, 2023

All of the pio functions should be available via the pio module, so all these statements should use "use pio" instead

put_att not found in the pio module.

scream/components/eamxx/src/share/io/scream_scorpio_interface.F90:52:16:
    
   52 |   use pio, only: PIO_put_att   => put_att
      |                1
Error: Symbol 'put_att' referenced at (1) not found in module 'pio'

@dqwu
Copy link
Contributor Author

dqwu commented Sep 8, 2023

@jayeshkrishna
Your scream branch jayeshkrishna/eamxx/rm_old_pio_mods can fix this issue. That branch also works with the default scorpio module (release 1.4.1).

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