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

undefined reference to `history_mp_fincllonlat_'

pasha_@ngs_ru

New Member
Hi All.

I'm a novice CAM user and I'm trying to get CAM3 compiled on Itanium. While linking I receive *undefined reference to `history_mp_fincllonlat_'* from intel fortran 8.1. (Package ID: l_fce_pc_8.1.023).

More precisely:

runtime_opts.o(.text+0xa3c9): In function `preset':
~/work/cam1/models/atm/cam/src/control/runtime_opts.F90:1609: undefined reference to `history_mp_fincllonlat_'
make: *** [~/work/cam1/models/atm/cam/bld/camrun_omp_mpi/cam] Error 1


'nm' tells me there is no history_mp_fincllonlat_ in the history.o file.
This is quite a strange situation because in history.F90 I found

character(len=10) :: fincl(pflds,ptapes)
character(len=max_chars) :: fincllonlat(pflds,ptapes)
character(len=8 ) :: fexcl(pflds,ptapes)
character(len=10) :: fhstpr(pflds,ptapes)
character(len=10) :: fwrtpr(pflds,ptapes)

What is more strange I have to arrays

character(len=10) :: fincl(pflds,ptapes)
character(len=max_chars) :: fincllonlat(pflds,ptapes)

defined almost the same way. Both have equivalence statement in the same file
...
character(len=max_chars) fincl1lonlat(pflds)
equivalence (fincl1lonlat,fincllonlat(1,1))
...
character*10 fincl1(pflds)
equivalence (fincl1,fincl(1,1))
...

but one array is! defined and the other is not:
> nm history.o | grep! fincl < br />00000000006afddc C history_mp_fincl_
00000000006f8292 C history_mp_fincl1lonlat_

I don't know, maybe this is a problem with *equivalence* or something. Does anyone know the correct answer? :)
Thanx!
 

jmccaa

New Member
Yes, I think you are correct about equivalence being the problem -- this is not the first time the Intel compiler has has trouble in this regard.

The equivalence statements are a legacy of fortran77 and really should be removed from the code, but it hasn't yet risen high enough on the priority list. Other compilers seems to handle them fine.

Your choices in the mean time are to replace the equivalence statements yourself or search for patched version of the Intel compiler -- they've released patches for the x86 compiler that work with CAM, but I don't know about Itanium compiler.

Jim
 
why did you use a compiler on Itanium which is used for Intel EM64T?
please type "ifort -V" to check correction of compiler version.

l_fce_pc_8.1.023 is for Intel EM64T not Itanium .
 

pasha_@ngs_ru

New Member
That was my mistake in the first message: I'm using an EM64T cluster.

I finally managed to eliminate the problem. I specified all the names used in the equivalence statement (both of the equivalence pair) in the "use, only statement" ("preset" function, runtime_opts.F90)
 
Top