[MITgcm-support] [EXTERNAL] Re: Compiling Problems
Madeleine Youngs
myoungs at umd.edu
Wed Aug 14 14:51:53 EDT 2024
Hi All,
Thanks for all the support! I have tried the make CLEAN and the gfort compiler and I get the same error. I do not have any code mods so it can’t be that. I did successfully create diagnostics_check.f:
Would you want me to attach a file for the .f and .F files?
I also noticed this:
original 'Makefile' generated but was unable to
run compiled test-program (please see 'genmake.log’)
Thanks,
Madeleine
running: check_fortran_compiler
ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -O2 -align -ip -c genmake_tcomp.f
ifort: command line warning #10121: overriding '-march=core-avx2' with '-march=core-avx2'
ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -O2 -align -ip -o genmake_tcomp genmake_tcomp.o
ifort: command line warning #10121: overriding '-march=core-avx2' with '-march=core-avx2'
mpirun -np 1 ./genmake_tcomp
No host list provided
--> set FC_CHECK= 3 /5
running: look_for_makedepend()
--> set MAKEDEPEND=$(TOOLSDIR)/xmakedepend
running: check_HAVE_CLOC()
running: get_fortran_c_namemangling()
cc -O2 -ip -fPIC -c genmake_test.c
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
genmake_test.c(1): warning #266: function "tsub" declared implicitly
void tcall( char * string ) { tsub( string ); }
^
ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -c genmake_tcomp.f
ifort: command line warning #10121: overriding '-march=core-avx2' with '-march=core-avx2'
--> set FC_NAMEMANGLE='#define FC_NAMEMANGLE(X) X ## _'
cc -O2 -ip -fPIC -c genmake_tc_1.c
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -o genmake_tc genmake_tc_2.f genmake_tc_1.o
ifort: command line warning #10121: overriding '-march=core-avx2' with '-march=core-avx2'
HELLO WORLD 1723660750.37632
--> set HAVE_CLOC='t'
running: check_HAVE_SETRLSTK()
cc -O2 -ip -fPIC -c genmake_tc_1.c
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
program hello
external setrlstk
call setrlstk()
end
ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -o genmake_tc genmake_tc_2.f genmake_tc_1.o
ifort: command line warning #10121: overriding '-march=core-avx2' with '-march=core-avx2'
--> set HAVE_SETRLSTK='t'
running: check_HAVE_SIGREG()
cc -O2 -ip -fPIC -c genmake_tc_1.c
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
genmake_tc_1.c(11): warning #274: declaration is not visible outside of function
unsigned int sn, siginfo_t si, struct ucontext *sc )
^
program hello
integer anint
common /iv/ anint
external sigreg
call sigreg(anint)
end
ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -o genmake_tc genmake_tc_2.f genmake_tc_1.o
ifort: command line warning #10121: overriding '-march=core-avx2' with '-march=core-avx2'
--> set HAVE_SIGREG='t'
running: check_HAVE_STAT()
cc -O2 -ip -fPIC -c genmake_tc_1.c
program hello
integer nbyte
call tfsize(nbyte)
print *," HELLO WORLD", nbyte
end
ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -o genmake_tc genmake_tc_2.f genmake_tc_1.o
--> set HAVE_STAT='t'
running: check_netcdf_libs()
=== genmake_tnc.F >>>
program fgennc
#include "netcdf.inc"
integer iret, ncid, xid
iret = nf_create('genmake_tnc.nc', NF_CLOBBER, ncid)
IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret)
iret = nf_def_dim(ncid, 'X', 11, xid)
IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret)
iret = nf_close(ncid)
IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret)
end
<<< genmake_tnc.F ===
cat genmake_tnc.F | cpp -P -traditional -DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DNML_TERMINATOR -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME_FCT -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -I/opt/cray/pe/mpich/8.1.25/ofi/intel/19.0/include/
WARNING: CPP failed to pre-process the netcdf test.
Please check that $INCLUDES is properly set.
ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -O2 -align -ip -c genmake_tnc.f \
&& ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -O2 -align -ip -o genmake_tnc.o
ifort: command line warning #10121: overriding '-march=core-avx2' with '-march=core-avx2'
genmake_tnc.f(12): error #5082: Syntax error, found END-OF-FILE when expecting one of: <LABEL> <END-OF-STATEMENT> ; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
program fgennc
--------------------^
compilation aborted for genmake_tnc.f (code 1)
==> try again with added '-lnetcdf'
cat genmake_tnc.F | cpp -P -traditional -DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DNML_TERMINATOR -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME_FCT -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -I/opt/cray/pe/mpich/8.1.25/ofi/intel/19.0/include/ > genmake_tnc.f \
&& ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -O2 -align -ip -c genmake_tnc.f \
&& ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -O2 -align -ip -o genmake_tnc genmake_tnc.o -lnetcdf
==> try again with added '-lnetcdff -lnetcdf'
cat genmake_tnc.F | cpp -P -traditional -DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DNML_TERMINATOR -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME_FCT -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -I/opt/cray/pe/mpich/8.1.25/ofi/intel/19.0/include/ > genmake_tnc.f \
&& ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -O2 -align -ip -c genmake_tnc.f \
&& ftn -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g -O2 -align -ip -o genmake_tnc genmake_tnc.o -lnetcdf
--> set HAVE_NETCDF=''
running: check_HAVE_FLUSH()
check_HAVE_FLUSH: successful
--> set HAVE_FLUSH='t'
> On Aug 14, 2024, at 10:14 AM, Jody Klymak <jklymak at uvic.ca> wrote:
>
> Hi Madeleine
>
> When I have linking problems like this I sometimes fine `make CLEAN` to be a useful step if I’m not starting from a clean install.
>
> Just a shot in the dark.
>
> Cheers, Jody
>
>> On Aug 14, 2024, at 10:05 AM, Wang, Ou (US 329B) <ou.wang at jpl.nasa.gov> wrote:
>>
>> You don't often get email from ou.wang at jpl.nasa.gov <mailto:ou.wang at jpl.nasa.gov>. Learn why this is important <https://aka.ms/LearnAboutSenderIdentification>
>> Hi Madeleine,
>>
>> Can you share your version of diagnostics_ini_io.f and diagnostics_ini_io.F? I would think the error is related to a broken link to “DIAGNOSTICS.h”, not something related to the opt file. Also, did the compilation successfully generate diagnostics_check.f, which uses the variable “diagMdsDir” as well?
>> It would be helpful if you can also share your versions of diagnostics_check.f and diagnostics_check.F.
>>
>> Best,
>> Ou Wang
>>
>>
>> From: MITgcm-support <mitgcm-support-bounces at mitgcm.org <mailto:mitgcm-support-bounces at mitgcm.org>> on behalf of Madeleine Youngs <myoungs at umd.edu <mailto:myoungs at umd.edu>>
>> Date: Tuesday, August 13, 2024 at 8:08 PM
>> To: mitgcm-support at mitgcm.org <mailto:mitgcm-support at mitgcm.org> <mitgcm-support at mitgcm.org <mailto:mitgcm-support at mitgcm.org>>
>> Subject: [EXTERNAL] Re: [MITgcm-support] Compiling Problems
>>
>> Hi Takaya,
>>
>> That didn’t seem to fix the issue, but thank you for sending this along!
>>
>> Madeleine
>>
>>
>> On Aug 13, 2024, at 6:10 PM, Takaya Uchida <tu22 at fsu.edu <mailto:tu22 at fsu.edu>> wrote:
>>
>> Hi Madeleine,
>>
>> I’ve copy and pasted below the opt file I ended up using to compile MITgcm on Derecho.
>>
>> #
>> # Build options for Derecho at NCAR
>> #
>>
>> FC=ftn
>> CC=cc
>> DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DNML_TERMINATOR'
>> CPP='cpp -P -traditional'
>> EXTENDED_SRC_FLAG='-132'
>> NOOPTFLAGS='-O2 -g -march=core-avx2'
>> LIBS=''
>> INCLUDES='-I/opt/cray/pe/mpich/8.1.25/ofi/intel/19.0/include/'
>>
>> if test "x$DEVEL" != x ; then
>> FFLAGS="$FFLAGS -W0 -WB -convert big_endian -assume byterecl -fPIC -O0 -g -noalign -fpstkchk -check all -fpe0 -traceback -ftrapuv -fpmodel except -warn all -march=core-avx2"
>> else
>> FFLAGS="$FFLAGS -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g"
>> fi
>>
>> if test "x$IEEE" = x ; then
>> FOPTIM='-O2 -align -ip'
>> else
>> FOPTIM='-O2 -align -ip -mp'
>> fi
>> CFLAGS='-O2 -ip -fPIC'
>>
>> The list of modules I load are:
>>
>> module load ncarenv/23.09 craype/2.7.23 intel-classic/2023.2.1 ncarcompilers/1.0.0 cray-mpich/8.1.27 hdf5/1.12.2 netcdf/4.9.2
>>
>> ----------------------------------
>> Takaya Uchida (内田貴也)
>> Assistant Research Scientist
>> Florida State University
>> Center for Ocean-Atmospheric Prediction Studies
>> https://roxyboy.github.io/ <https://urldefense.us/v3/__https:/roxyboy.github.io/__;!!PvBDto6Hs4WbVuu7!NnRx5vlbDYZWIRraW2gZnWzzXsE782jeSZ_0N-DP52xAVkHbj-uEwC3rZ_U5PHL8Ay0r9294n_QD_ImbsRJV$>
>>
>> <Center for Ocean-Atmospheric Prediction Studies signature alt.png>
>>
>>
>> On Aug 13, 2024, at 8:51 PM, Madeleine Youngs <myoungs at umd.edu <mailto:myoungs at umd.edu>> wrote:
>>
>> Hi Everyone,
>>
>> I am working on compiling checkpoint68y on Derecho using no opt file (?) and I am getting this error. Any advice on what the issue is?
>>
>>
>> mpif90 -W0 -WB -msse2 -convert big_endian -assume byterecl -O2 -align -lmpich -lnetcdff -lnetcdf -c diagnostics_fract_fill.f
>> cat diagnostics_ini_io.F | cpp -traditional -P -DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME_FCT -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -DHAVE_FLUSH -I. | ../../../tools/set64bitConst.sh > diagnostics_ini_io.f
>> mpif90 -W0 -WB -msse2 -convert big_endian -assume byterecl -O2 -align -lmpich -lnetcdff -lnetcdf -c diagnostics_ini_io.f
>> Cannot disable Fortran error message 6404
>> diagnostics_ini_io.f(2005): error #6404: This name does not have a type, and must have an explicit type. [DIAGMDSDIR]
>> IF ( diag_mdsio .AND. (diagMdsDir.NE.' ') .AND.
>> -----------------------------^
>> Cannot disable Fortran error message 6404
>> diagnostics_ini_io.f(2006): error #6404: This name does not have a type, and must have an explicit type. [DIAGMDSDIRCREATE]
>> & diagMdsDirCreate .AND. (mdsioLocalDir.EQ.' ') ) THEN
>> -----------^
>> Cannot disable Fortran error message 6514
>> diagnostics_ini_io.f(2009): error #6514: Substring or array slice notation requires CHARACTER type or array. [DIAGMDSDIR]
>> WRITE(namBuf,'(3A)') ' mkdir -p ', diagMdsDir(1:iL), ' '
>> -------------------------------------------^
>> compilation aborted for diagnostics_ini_io.f (code 1)
>> make[1]: *** [Makefile:1776: diagnostics_ini_io.o] Error 1
>> make[1]: Leaving directory '/glade/derecho/scratch/myoungs/MITgcm/MultiWidthExperiments/Present9.20.16/build'
>> make: *** [Makefile:1688: fwd_exe_target] Error 2
>>
>>
>>
>>
>> Thanks,
>> Madeleine
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support <https://urldefense.us/v3/__http:/mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!PvBDto6Hs4WbVuu7!NnRx5vlbDYZWIRraW2gZnWzzXsE782jeSZ_0N-DP52xAVkHbj-uEwC3rZ_U5PHL8Ay0r9294n_QD_GmOPdGy$>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support <https://urldefense.us/v3/__http:/mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!PvBDto6Hs4WbVuu7!NnRx5vlbDYZWIRraW2gZnWzzXsE782jeSZ_0N-DP52xAVkHbj-uEwC3rZ_U5PHL8Ay0r9294n_QD_GmOPdGy$>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20240814/56ce6bdf/attachment-0001.html>
More information about the MITgcm-support
mailing list