[MITgcm-support] [External] Compiling issue
Martin Losch
Martin.Losch at awi.de
Tue Jul 28 18:18:53 EDT 2020
Hi Rob,
what happened is that the preprocessing step did not work properly and you still have some macros (namely “ _d “ which should expand to “D”) in your preprocessed file.
Is this the only place where this happens? Or just the first one?
In fact this part:
> cat obcs_calc.F | ../tools/set64bitConst.sh
should already do this substitution, but because it is done before the cpp step, the header file where your lines are from (EEPARAMS.h) has not yet been included. The sequence should have been like this:
cat obcs_calc.F | cpp -traditional -P -DWORDLENGTH=4 -DTARGET_CRAYXT -DNML_EXTENDED_F77 -DALLOW_USE_MPI -DALWAYS_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -I/opt/cray/pe/mpt/7.7.11/gni/mpich-pgi/19.1/include -I/opt/cray/pe/netcdf/4.6.3.2/PGI/19.5/include | ../tools/set64bitConst.sh > obcs_calc.f
So I guess something went wrong in the genmake-step, but I can't be sure. The preprocessing command in the Makefile should look something like this:
# C preprocessing and replacing the _d in constants:
CPPCMD = cat $< | cpp -traditional -P $(DEFINES) $(INCLUDES) | $(TOOLSDIR)/set64bitConst.sh
In your case it’s probably the other way around (which is wrong)
CPPCMD = cat $< | $(TOOLSDIR)/set64bitConst.sh | cpp -traditional -P $(DEFINES) $(INCLUDES)
I am not sure how you did that. Maybe there’s something in your build options file ../tools/build_options/gaea_c2, can you send that?
Check the output of the genmake step (just do “make makefile” in your build directory, again) if you can find anything suspicious.
hope that helps,
Martin
> On 28. Jul 2020, at 21:10, Nazarian, Robert <rnazarian at fairfield.edu> wrote:
>
> Hi Martin,
>
> Thanks. Here are lines 491-495 of obcs_calc.f:
>
> C Real-type constant for some frequently used simple number (0,1,2,1/2):
> Real*8 zeroRS, oneRS, twoRS, halfRS
> PARAMETER ( zeroRS = 0.0 _d 0 , oneRS = 1.0 _d 0 )
> PARAMETER ( twoRS = 2.0 _d 0 , halfRS = 0.5 _d 0 )
> Real*8 zeroRL, oneRL, twoRL, halfRL
> PARAMETER ( zeroRL = 0.0 _d 0 , oneRL = 1.0 _d 0 )
> PARAMETER ( twoRL = 2.0 _d 0 , halfRL = 0.5 _d 0 )
>
> Thanks,
> Rob
>
> Robert Nazarian, PhD
> Assistant Professor, Department of Physics
> Fairfield University
> (203) 254-4000 ext. 3440
> rnazarian at fairfield.edu<mailto:rnazarian at fairfield.edu>
> Twitter: @fairfielduphys
> Instagram: fairfielduphysics
>
> On Jul 28, 2020, at 1:21 AM, Martin Losch <Martin.Losch at awi.de<mailto:Martin.Losch at awi.de>> wrote:
>
> Hi Rob,
>
> it would help to look at lines 491-495 of your obc_calc.f (this is different for different enviroments and compilers, because the header files are not always the same). For example, when I compile this experiment, the corresponding lines obcs_calc.f are just comments. Can you post your lines 491-495 of obcs_calc.f (not the upper case .F file)?
>
> Martin
>
> On 27. Jul 2020, at 17:03, Nazarian, Robert <rnazarian at fairfield.edu<mailto:rnazarian at fairfield.edu>> wrote:
>
> Hi everyone,
>
> I recently downloaded the latest version of the MITgcm and have had an issue compiling the internal wave verification code. For reference, I’m using the following commands, which worked for previous versions of the model:
> module unload PrgEnv-intel
> module load PrgEnv-pgi
> module load cray-netcdf
> ../tools/genmake2 -mpi -of ../tools/build_options/gaea_c2 -mods=../verification/internal_wave/code
> make depend
> make
>
> After the make command, I receive the following error:
> cat obcs_calc.F | ../tools/set64bitConst.sh | cpp -traditional -P -DWORDLENGTH=4 -DTARGET_CRAYXT -DNML_EXTENDED_F77 -DALLOW_USE_MPI -DALWAYS_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -I/opt/cray/pe/mpt/7.7.11/gni/mpich-pgi/19.1/include -I/opt/cray/pe/netcdf/4.6.3.2/PGI/19.5/include > obcs_calc.f
> ftn -byteswapio -Mnodclchk -tp k8-64 -pc=64 -fastsse -O3 -Mlarge_arrays -c obcs_calc.f
> PGF90-S-0084-Illegal use of symbol d0 - KIND parameter (obcs_calc.f: 491)
> PGF90-S-0084-Illegal use of symbol d0 - KIND parameter (obcs_calc.f: 491)
> PGF90-S-0084-Illegal use of symbol d0 - KIND parameter (obcs_calc.f: 492)
> PGF90-S-0084-Illegal use of symbol d0 - KIND parameter (obcs_calc.f: 492)
> PGF90-S-0084-Illegal use of symbol d0 - KIND parameter (obcs_calc.f: 494)
> PGF90-S-0084-Illegal use of symbol d0 - KIND parameter (obcs_calc.f: 494)
> PGF90-S-0084-Illegal use of symbol d0 - KIND parameter (obcs_calc.f: 495)
> PGF90-S-0084-Illegal use of symbol d0 - KIND parameter (obcs_calc.f: 495)
> 0 inform, 0 warnings, 8 severes, 0 fatal for obcs_calc
> make: *** [Makefile:927: obcs_calc.o] Error 2
>
> Any advice on fixing this/these compilation error(s)? Any feedback is appreciated.
>
> Thanks,
> Rob
>
> Robert Nazarian, PhD
> Assistant Professor, Department of Physics
> Fairfield University
> (203) 254-4000 ext. 3440
> rnazarian at fairfield.edu<mailto:rnazarian at fairfield.edu><mailto:rnazarian at fairfield.edu>
> Twitter: @fairfielduphys
> Instagram: fairfielduphysics
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
> https://urldefense.com/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!KIFmrYtlezdzESbnm_I!U1Ojm5-8AmxJoir0Nig3HVTFsyqMr4SBFJKiprrIXkZWHaGmEu80ja_FKr7md7Oy9GGT$
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
> https://urldefense.com/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!KIFmrYtlezdzESbnm_I!U1Ojm5-8AmxJoir0Nig3HVTFsyqMr4SBFJKiprrIXkZWHaGmEu80ja_FKr7md7Oy9GGT$
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
More information about the MITgcm-support
mailing list