Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

linker error encountered in model build

AndrewY

New Member
Hello all,

The machine I'm using to run CESM experienced changes in the complier installed (intel to gnu). After making changes in the xml files, the model now cannot be built successfully. Below are the details of my case,

Version: cesm2.1.3-rc.01-0-g0596a97
Compset: FHIST
Res: f09_f09_mg17
Compiler: GNU (GCC/11.3.0)
Machine: spartan

The error seems to be reported in the last few lines in the log file:

Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
gfortran: warning: minimal: linker input file unused because linking not done
gfortran: error: minimal: linker input file not found: No such file or directory
gmake: ***

xml files and the bld log file are attached as well, I would like to know if anyone knows how to resolve the problem, thanks!
 

Attachments

  • config_batch.xml.txt
    3 KB · Views: 0
  • config_compilers.xml.txt
    3.5 KB · Views: 1
  • config_machines.xml.txt
    5.5 KB · Views: 0
  • gptl.bldlog.240727-002718.txt
    4.5 KB · Views: 0

jedwards

CSEG and Liaisons
Staff member
In config_compilers.xml add these flags needed for gnu versions 11+:
-fallow-argument-mismatch -fallow-invalid-boz
 

AndrewY

New Member
In config_compilers.xml add these flags needed for gnu versions 11+:
-fallow-argument-mismatch -fallow-invalid-boz
Thank you for our reply!

Those flags have been added but the same error was reported again. Below is how it looks now in config_compilers.xml:


<compiler MACH="spartan" COMPILER="gnu">
<CFLAGS>
<append DEBUG="FALSE"> -march=skylake-avx512 </append>
</CFLAGS>
<FFLAGS>
<append DEBUG="FALSE"> -march=skylake-avx512 -fallow-argument-mismatch -fallow-invalid-boz -debug minimal </append>
</FFLAGS>
<SLIBS>
<append> -L$ENV{NETCDF_C_PATH}/lib64 -lnetcdf </append>
<append> -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff </append>
<append> -lopenblas </append>
</SLIBS>
</compiler>

I found that the model could be built if I remove the flag '-debug minimal'. But in that case, the model would encounter another error in its running like this:

corrupted size vs. prev_size

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0 0x14a1af23e6ef in ???
#1 0x14a1af28b94c in ???
#2 0x14a1af23e645 in ???
#3 0x14a1af2287f2 in ???
#4 0x14a1af22912f in ???
#5 0x14a1af2959f6 in ???
#6 0x14a1af296565 in ???
#7 0x14a1af2966ef in ???
#8 0x14a1af2982f7 in ???
#9 0x14a1af299808 in ???
#10 0x179038c in ???
#11 0x17c012b in ???
#12 0x1790630 in ???
#13 0x172bdbe in ???
#14 0xf4a104 in ???
#15 0xf53a97 in ???
#16 0xf9b6f9 in ???
#17 0xebcee0 in ???
#18 0xeae1e8 in ???
#19 0x4279b9 in ???
#20 0x41725c in ???
#21 0x42512b in ???
#22 0x14a1af22958f in ???
#23 0x14a1af22963f in ???
#24 0x4096d4 in ???
#25 0xffffffffffffffff in ???
--------------------------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 0 on node spartan-bm022 exited on signal 6 (Aborted).
--------------------------------------------------------------------------

A full log file (from run folder) reporting this error is attached.

I wonder if the flag '-debug minimal' is necessary? If not, how can I fix the error above? Thanks!
 

Attachments

  • cesm.log.62476617.240719-150951.txt
    53.1 KB · Views: 3

jedwards

CSEG and Liaisons
Staff member
-debug minimal is an intel compiler flag - I'm not sure how you got that in the mix. You are not getting sufficient debug information
to determine where the problem is - sometimes one of the component logs will have an error listed at the end, sometimes using
Code:
addr2line -e bld/cesm.exe 0x179038c
(where the hex code is from the backtrace listing) might give you more information. If nether of these work try rebuilding with the -g option. (Possibly works with
Code:
./xmlchange DEBUG=TRUE
)
 

tangshuaiqi

Shuaiqi Tang
New Member
In config_compilers.xml add these flags needed for gnu versions 11+:
-fallow-argument-mismatch -fallow-invalid-boz
I also had similar problem and when I added these flags, it fails with another error:

Fatal Error: Cannot read module file ‘mpi.mod’ opened at (1), because it was created by a different version of GNU Fortran

I guess there may be somewhere that the compiler version setup is different, but don't know where the setups are...
 

jedwards

CSEG and Liaisons
Staff member
The gnu compiler is particularly picky about the fortran version used to create modules - you need to either determine which compiler
version was used to build your mpi library and use that or build a new mpi library with the version you want to use to build cesm.
 
Top