E3SM-Project / E3SM

Energy Exascale Earth System Model source code. NOTE: use "maint" branches for your work. Head of master is not validated.
https://docs.e3sm.org/E3SM
Other
343 stars 352 forks source link

MPAS build problem on ANL workstations #910

Closed jgfouca closed 8 years ago

jgfouca commented 8 years ago

From slack:

mpif90  -mcmodel=medium -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none  -O2   -DMPAS_NO_LOG_REDIRECT -DMPAS_NO_ESMF_INIT -DMPAS_ESM_SHR_CONST -DMPAS_PERF_MOD_TIMERS -c mpas_io.f90 -I/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_\
gnu.20160603_210627/bld/glc/source/core_landice/mode_forward -I/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_gnu.20160603_210627/bld/glc/source/core_landice/shared -I/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_gnu.20160603_21\
0627/bld/glc/source/core_landice/analysis_members -I/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_gnu.20160603_210627/bld/glc/source/inc -I/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_gnu.20160603_210627/sharedlibroot.20160603\
_210627/gnu/mpich/nodebug/nothreads/include -I/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_gnu.20160603_210627/sharedlibroot.20160603_210627/gnu/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/soft/apps/packages/climate/netcdf/4.3.3.1c\
-4.2cxx-4.4.2f-parallel/gcc-5.1.0/mpich-3.2/include -I/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_gnu.20160603_210627/bld/pio -I/include -I../external/esmf_time_f90
f951: Warning: Nonexistent include directory '/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_gnu.20160603_210627/bld/glc/source/inc' [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/homes/acmetest/acme/scratch/ERS.f09_g16_g.MPASLI_ONLY.anlworkstation_gnu.20160603_210627/bld/pio' [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/include' [-Wmissing-include-dirs]
mpas_io.f90:22:43:

    integer, parameter :: MPAS_INT_FILLVAL = NF_FILL_INT
                                           1
Error: Parameter 'nf_fill_int' at (1) has not been declared or is a variable, which does not reduce to a constant expression
mpas_io.f90:23:53:

    character, parameter :: MPAS_CHAR_FILLVAL = achar(NF_FILL_CHAR)
                                                     1
Error: Parameter 'nf_fill_char' at (1) has not been declared or is a variable, which does not reduce to a constant expression
mpas_io.f90:24:54:

    real (kind=RKIND), parameter :: MPAS_REAL_FILLVAL = NF_FILL_DOUBLE
                                                      1
Error: Parameter 'nf_fill_double' at (1) has not been declared or is a variable, which does not reduce to a constant expression

3:15
is this a problem with my local netcdf? I'm using netcdf-4.3.3.1-parallel-gcc5
Noel Keen
4:37 PM yea actually
4:38
i just "fixed" that with the stand-alone mpas this morning
4:39
you wanna add
include 'netcdf.inc' after the use statements
Jim Foucar
4:39 PM is someone going to update the ACME MPAS' with that change?
Noel Keen
4:40 PM i ran into this while using PIO2....
4:42
now i'm not sure if it was related to going to PIO2 or not... but the fix is easy/harmless.  i don't know answer to your question.  i can make the change and test it if Doug thinks its a good solution?
Jim Foucar
4:43 PM that would be helpful
jayeshkrishna commented 8 years ago

@jgfouca : How can you recreate this issue? Does this issue occur only on the ANL workstations?

jgfouca commented 8 years ago

@jayeshkrishna : That's the only place I've seen it. I think @ndkeen was seeing it elsewhere. Maybe he can comment real quick to say what machine that was.

jayeshkrishna commented 8 years ago

@ndkeen was seeing it when building standalone MPAS with PIO2 I think. This is different than the config (ACME+PIO1) we have right now and might be a different problem.

jayeshkrishna commented 8 years ago

I am wondering if this is related to the netcdf install (whether the nf_fill* are available via the netcdf mod?) on the ANL workstations. @sarich : Were you able to verify that the netcdf installations on the ANL workstations worked correctly?

jayeshkrishna commented 8 years ago

@jgfouca : How are you building the case (Can you provide the commands so that I can reproduce it?)?

jgfouca commented 8 years ago

@jayeshkrishna : sure.

create_test ERS.f09_g16_g.MPASLI_ONLY

... should do it. On the ANL workstations.

jayeshkrishna commented 8 years ago

thanks, I will give it a try and let you know the results

jgfouca commented 8 years ago

@jayeshkrishna , thanks! I should mention, it looks like my branch to get ANL workstations working hasn't been merged yet: https://github.com/ACME-Climate/ACME/pull/909

You'll have to work off that branch until it gets merged.

jayeshkrishna commented 8 years ago

Thanks, did the other tests build correctly (Is this the only one that fails?)?

jgfouca commented 8 years ago

All the tests that use MPAS compsets failed to build.

jayeshkrishna commented 8 years ago

@jgfouca : I just tried building the test on compute001 and saw that env_mach_specific was empty. Is that expected?

jgfouca commented 8 years ago

@jayeshkrishna : classic git mistake on my part. I did a commit -a but I had untracked files. Please pull and try again.

jayeshkrishna commented 8 years ago

ok, thanks. Now I am able to reproduce the problem mentioned above.

ndkeen commented 8 years ago

I was trying to build stand-alone mpas on edison/cori. As part of that, I used a PIO2 build and I saw those compiler errors (that you referred to). They were easy to fix and it builds (on edison/cori with intel). Without PIO2, we had some other issues, but the PIO being used was an old build from a few years ago.

jayeshkrishna commented 8 years ago

After adding the paths to the pnetcdf library the case is building for me on compute001. Please try out the patch and incorporate it into your branch if it works for you,

See the patch here - https://gist.github.com/jayeshkrishna/1ad746aa105acce21b590ededa239e49

douglasjacobsen commented 8 years ago

@jayeshkrishna So, this (proposed) fix doesn't need any modifications to the MPAS framework? Does this also fix the issues you previously had related to PIO2, or have you tried that?

jayeshkrishna commented 8 years ago

No, this change only affects the machine files. This fix does not handle the issues that we previously saw with ACME+PIO2 (PIO2 no longer exposes NF_FILL* - PIO1 exposed, probably not intended, NF_FILL* in pnetcdf via the pio modules). For fixing that issue I suggest the following,

douglasjacobsen commented 8 years ago

@jayeshkrishna I don't know that adding the PIO2 fill values to PIO1 would be appropriate, as that will break backwards compatibility with previous versions of PIO for MPAS only users outside of ACME.

It might be better to just include the correct NetCDF include file / module, since that should be a more robust solution.

At that point though, it's really just a matter of choosing the correct file to include / use. Does include 'netcdf.inc' fix the issues for you? (I suspect use netcdf doesn't).

jayeshkrishna commented 8 years ago

Including netcdf.inc in MPAS should also work (if you are using "use netcdf" you might have to use NF90_FILL*).

jgfouca commented 8 years ago

@jayeshkrishna , your patch fixed the problem, thanks