cjcoats/ioapi-3.2

Issues with the size of bstate3_

coderodyhpc opened this issue · 1 comments

Hello,
I'm getting the dreaded warning message:
/usr/bin/ld: Warning: size of symbol bstate3_ changed from 14730272 in pshut3.o to 14835744 in /home/centos/CMAQ/lib/aarch64/gcc/ioapi/lib/libioapi.a(initblk3.o)
Some posts mention that this might be caused by using different flags to compile I/O API & CMAQ but, after checking, that doesn't seem to be the case. I have tried to dig a bit deeper, which is when some things haven't clicked for me. For example, decreasing the optimization level (from -O3 -march=native to -O2) doesn't make a difference for either I/O API or CMAQ, the said sizes don't change. Looking at the I/O API subroutines, it seems that bsate3_ is defined at iobin3.c and state3.h with #define BSTATE3 bstate3_. I'm more of a Fortran coder than a C one so I'm not sure why of this construction, but it feels like bstate3_ is being passed from (CMAQ?) to I/O API rather than being defined in the latter (maybe I'm misinterpreting this).
My 2 questions are:
(1) Which compilation flags are supposed to affect the size of bstate3_? As I mentioned, optimization flags do not seem to have any impact.
(2) It seems like the variable FLDMN controls name mangling. Not entirely sure what the other 2 systems are (__hpux and ABSFT) but my question is simple: Would it be necessary to make any change if the system were AArch64 rather than x86_64?
Thanks.

It's unsurprising that this is causing so much trouble as STATE3.EXT is defining VGTYP3, VGTOP3, VGLVS3 but CMAQ does not define them in either pshut3 or pwrite3.
P.S. It seems that the problem originated from assembling CMAQ and how it was grabbing the variables from STATE3.EXT (and hence the size difference error).