Ask Your Question
0

AGRIF compile error. LIB conv compilation fails?

asked 2022-10-25 13:52:34 +0100

Hi Croco users,

I am using the latest released croco 1.2.1. My configuration without AGRIF compiles and runs fine. Then I follow the documentation steps to create the nested grid and forcing, bulk, initial, croco.in.1 and AGRIF_FixedGrids.in with the nestgui.m utility without any errors and all the files are created.

When running jobcomp with AGRIF defined I get a lot of warning such as:

===================================================

Compile conv...

make -C LIB conv make[1]: Entering directory '/home/konstantinos/Programs/Croco/CONFIGS/ROTATED/Compile/AGRIF/LIB' cc -Wno-implicit-function-declaration -c main.c -o main.o convert.y: In function ‘main’: convert.y:310:33: warning: ‘%s’ directive writing 16 bytes into a region of size between 0 and 999 [-Wformat-overflow=] convert.y:310:13: note: ‘sprintf’ output between 18 and 1017 bytes into a destination of size 1000 cc main.o WriteInFile.o toamr.o fortran.o dependfile.o SubLoopCreation.o WorkWithlistvarindoloop.o WorkWithvarofsubroutineliste.o WorkWithParameterlist.o Writedeclarations.o WorkWithglobliste.o UtilFortran.o UtilNotGridDep.o WorkWithlistdatavariable.o DiversListe.o UtilAgrif.o WorkWithAllocatelist.o UtilCharacter.o UtilListe.o UtilFile.o WorkWithlistofmodulebysubroutine.o WorkWithlistmoduleinfile.o WorkWithlistofcoupled.o -o ./conv /usr/bin/ld: WriteInFile.o:(.bss+0x0): multiple definition of curvar'; main.o:(.bss+0x0): first defined here /usr/bin/ld: WriteInFile.o:(.bss+0x8): multiple definition ofList_ModuleUsedInModuleUsed_Var'; main.o:(.bss+0x8): first defined here

And finally I get an error: collect2: error: ld returned 1 exit status make[1]: * [Makefile:34: conv] Error 1 make[1]: Leaving directory '/home/konstantinos/Programs/Croco/CONFIGS/ROTATED/Compile/AGRIF/LIB' make: * [Makefile:32: conv] Error 2 make: Leaving directory '/home/konstantinos/Programs/Croco/CONFIGS/ROTATED/Compile/AGRIF' mv: cannot stat 'AGRIF/conv': No such file or directory

I tried with both gfortran, mpif90, gmake amd also with ifort, mpiifort and make and always the error is the same.

The ifort compiler has the following flags: FFLAGS1="-O3 -fno-alias -i4 -r8 -fp-model precise" And I have added the workaround “-fallow-argument-mismatch” in the new gfortran compiler: FFLAGS1="-O3 -fdefault-real-8 -fdefault-double-8 -fallow-argument-mismatch"

The compiler versions are: ifort --version ifort (IFORT) 2021.7.0 20220726 Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

gfortran --version GNU Fortran (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc.

Thank you for your advice Konstantinos

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2022-10-26 07:01:31 +0100

I discovered that the same configuration compiles successfully on older Desktop PC with the compiler: gfortran --version GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

So apparently the new: GNU Fortran (Ubuntu 11.2.0-19ubuntu1) 11.2.0 doesn't like AGRIF...? But also the Intel new compiler ifort (IFORT) 2021.7.0 20220726 doesn't work neither...

So... avoid new compilers!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2022-10-25 13:52:34 +0100

Seen: 20 times

Last updated: Oct 26