[MITgcm-support] [External] Compiling issue

Martin Losch Martin.Losch at awi.de
Wed Jul 29 16:32:13 EDT 2020


Hi Rob,

use git to find out what is different between your branch and the master on the github repository.
You must have accidentally changed something, otherwise this issue would not occur.

As a simple test you can use git to clone a new repository and try again with that one.

Martin

> On 29. Jul 2020, at 20:45, Nazarian, Robert <rnazarian at fairfield.edu> wrote:
> 
> Hi Martin,
> 
> The line-break fix has corrected the error message in the output. The compilation is still failing, however, during the ‘make’ with the same 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
> 
> I also took a look in the genmake2 file, and there are no occurrences of CPPCMD. I referenced this with the file documentation (here: http://mitgcm.org/download/git_snapshot/MITgcm/tools/genmake2) and noticed two issues. First, this genmake2 file uses variable CPP insteps of CPPCMD. Second, the following command is missing in my genmake2 file, which looks like it is responsible, at least partially, for the errors: # C preprocessing and replacing the _d in constants: CPPCMD = cat \$< | ${CPP} \$(DEFINES) \$(INCLUDES) | ${S64}. I’m not sure, however, why this is missing, since I am using the latest code, which should contain these commands. Perhaps it would be advantageous to revert back to prior genmake2 files?
> 
> 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 29, 2020, at 2:16 PM, Martin Losch <Martin.Losch at awi.de<mailto:Martin.Losch at awi.de>> wrote:
> 
> Hi Rob,
> 
> I am not sure if that’s the problem but there is an error message in the output:
> 
>  using OPTFILE="../tools/build_options/gaea_c3"
> ../tools/build_options/gaea_c3: line 4: uar,v: command not found
> 
> You accidentally inserted a line-break in the $Header line of gaea_c3 that is interpreted as an (unknown) command, so that maybe the rest of the file is not read.
> 
> Please fix and try again. Otherwise I have no idea.
> 
> Is obcs_calc.f the only file with this problem? What does the CPPCMD look like in your Makefile?
> 
> Martin
> 
> On 29. Jul 2020, at 17:26, Nazarian, Robert <rnazarian at fairfield.edu<mailto:rnazarian at fairfield.edu>> wrote:
> 
> Hi Martin,
> 
> Thanks for the advice. The output of the genmake step (reproduced below), looks OK to me:
> 
> ../tools/genmake2  "-mpi" "-of" "../tools/build_options/gaea_c3" "-mods=../verification/internal_wave/code"
> 
> GENMAKE :
> 
> A program for GENerating MAKEfiles for the MITgcm project.
> For a quick list of options, use "genmake2 -h"
> or for more detail see the Developer's HOWTO manual at:
> https://urldefense.com/v3/__http://mitgcm.org/public/docs.html__;!!KIFmrYtlezdzESbnm_I!RQgh_Y9uEZJq1k2-qk6TyHOv9DWtwf6rZeu4CjCy4YYq_JPHzSufRM-24tlAam67MdIK$
> 
> ===  Processing options files and arguments  ===
> getting local config information:  none found
> Warning: ROOTDIR was not specified ; try using a local copy of MITgcm found at ".."
> getting OPTFILE information:
>  using OPTFILE="../tools/build_options/gaea_c3"
> ../tools/build_options/gaea_c3: line 4: uar,v: command not found
> getting AD_OPTFILE information:
>  using AD_OPTFILE="../tools/adjoint_options/adjoint_default"
> Turning on MPI cpp macros
> 
> ===  Checking system libraries  ===
> Do we have the system() command using ftn...  yes
> Do we have the fdate() command using ftn...  yes
> Do we have the etime() command using ftn...  yes
> Can we call simple C routines (here, "cloc()") using ftn...  yes
> Can we unlimit the stack size using ftn...  yes
> Can we register a signal handler using ftn...  yes
> Can we use stat() through C calls...  yes
> Can we create NetCDF-enabled binaries...  yes
> 
> ===  Setting defaults  ===
> Adding MODS directories: ../verification/internal_wave/code
> Making source files in eesupp from templates
> Making source files in pkg/exch2 from templates
> Making source files in pkg/regrid from templates
> 
> ===  Determining package settings  ===
> getting package dependency info from  ../pkg/pkg_depend
> getting package groups info from      ../pkg/pkg_groups
> checking list of packages to compile:
>  using PKG_LIST="../verification/internal_wave/code/packages.conf"
>  before group expansion packages are: gfd obcs kl10
>  replacing "gfd" with:  mom_common mom_fluxform mom_vecinv generic_advdiff debug mdsio rw monitor
>  after group expansion packages are:  mom_common mom_fluxform mom_vecinv generic_advdiff debug mdsio rw monitor obcs kl10
> applying DISABLE settings
> applying ENABLE settings
>  packages are:  debug generic_advdiff kl10 mdsio mom_common mom_fluxform mom_vecinv monitor obcs rw
> applying package dependency rules
>  packages are:  debug generic_advdiff kl10 mdsio mom_common mom_fluxform mom_vecinv monitor obcs rw
> Adding STANDARDDIRS='eesupp model'
> Searching for *OPTIONS.h files in order to warn about the presence
>  of "#define "-type statements that are no longer allowed:
>  found CPP_OPTIONS="./CPP_OPTIONS.h"
>  found CPP_EEOPTIONS="./CPP_EEOPTIONS.h"
> Creating the list of files for the adjoint compiler.
> 
> ===  Creating the Makefile  ===
> setting INCLUDES
> Determining the list of source and include files
> Writing makefile: Makefile
> Add the source list for AD code generation
> Making list of "exceptions" that need ".p" files
> Making list of NOOPTFILES
> Add rules for links
> Adding makedepend marker
> 
> ===  Done  ===
> 
> I mis-stated the name of the build options file that I am using — it is gaea_c3. I am attaching it to this message.
> 
> Thanks very much,
> 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
> 
> 
> On Jul 28, 2020, at 6:18 PM, Martin Losch <Martin.Losch at awi.de<mailto:Martin.Losch at awi.de><mailto:Martin.Losch at awi.de>> wrote:
> 
> 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<mailto:rnazarian at fairfield.edu><mailto: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><mailto: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><mailto: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><mailto: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><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><mailto: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
> https://urldefense.com/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!KIFmrYtlezdzESbnm_I!SACEBA7mrCw8n-p9BVpzZxr2am6LnSHFtt8YmZD_AAAOVvJCzwhG1A47eKOp7SM0yCu-$
> 
> _______________________________________________
> 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!SACEBA7mrCw8n-p9BVpzZxr2am6LnSHFtt8YmZD_AAAOVvJCzwhG1A47eKOp7SM0yCu-$
> 
> <gaea_c3>_______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> https://urldefense.com/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!KIFmrYtlezdzESbnm_I!RQgh_Y9uEZJq1k2-qk6TyHOv9DWtwf6rZeu4CjCy4YYq_JPHzSufRM-24tlAaltFOcff$
> 
> _______________________________________________
> 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!RQgh_Y9uEZJq1k2-qk6TyHOv9DWtwf6rZeu4CjCy4YYq_JPHzSufRM-24tlAaltFOcff$
> 
> _______________________________________________
> 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