Compilation of RAMS4.3

Greetings - I need to compile and execute RAMS4.3 code that I ported over after using on an Athlon cluster. I can actually get it to compile, but the code will not execute (I receive a seg. fault during “Makevfile” [pre-processing part of the run]), so i think I’ve incorrectly set the settings in my configuration. I’m certain it’s the compilation because it’s the precise same code and data I used successfully on the aforementioned Athlon cluster.

Now I use:
pgf90 7.2-5 64-bit target on x86-64 Linux -tp penryn-64.
CentOS release 5.3
My gcc version is: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
My version of mpich is: mpich-ethernet-pgi-1.2.7p1-1

I’ve used a multitude of settings (I’ll paste below) and I’ve even tried compiling with no optimization. I can get it to compile (with or without optimization), but in no case can i get it to execute even the pre-processing part of the simulation.

#----------------- LINUX Portland Group pgf77/gcc ---------------
CMACH=PC_LINUX1
F_COMP=pgf90
#F_OPTS=-fast -Mmpi -byteswapio -tp k7 -Mfree
#F_OPTS=-fast -Mmpi -byteswapio -Mfree -pc 64
#F_OPTS=-O0 -fast -Mmpi -Mfree -byteswapio
F_OPTS=-Mvect=cachesize:524288 -Munroll -Mnoframe -O2 -pc 64
-Mfree -Mx,119,0x200000 -byteswapio
#F_OPTS=-Mvect=cachesize:524288 -Munroll -Mnoframe -O2 -pc 64 \

-Mfree -Mbyteswapio

F_OPTS=-O0 -Mfree
#F_OPTS=
C_COMP=gcc
#C_OPTS=-O3 -DUNDERSCORE -DLITTLE -m32
C_OPTS=-O3 -DUNDERSCORE -DLITTLE
LOADER=pgf90
#LOADER_OPTS=-lc -lgcc_eh -lpthread
#LOADER_OPTS=-v -Wl,-static -tp k7
#LOADER_OPTS=-v -Wl,-zmuldefs
#LOADER_OPTS=-v -Wl,-zmuldefs
C_LOADER=gcc
C_LOADER_OPTS=-v
LIBS=
MOD_EXT=mod

Any assistance would be greatly appreciated.

matei[/quote]

Hi matei,

Unfortunately, I don’t have RAMS here so don’t know for sure. My best guess is that you forgot to use “-byteswapio”. I see that you have it in your optimized flag sets, but not the “-O0 -Mfree” set.

If it still fails, was your Athlon cluster 32-bits? If it was, then try compiling in 32-bits ("-tp penryn-32" for PGI, and “-m32” for gcc), to see if it’s 64-bit porting issue.

Finally, I’d check if it’s a stack overflow but setting your environment’s stack size to “unlimited”.

Hope this helps,
Mat

hi Mat -

Just want to make sure I understand (this is far from my area of expertise :( ). You are saying to change settings to:

F_OPTS=-O0 -Mfree -byteswapio -tp penryn-32

and

C_OPTS=-m32

First try “F_OPTS=-O0 -Mfree -byteswapio”. If that doesn’t work, then try " F_OPTS=-O0 -Mfree -byteswapio -tp penryn-32", “C_OPTS=-O3 -DUNDERSCORE -DLITTLE -m32”.

  • Mat

Thanks Mat.

Well, the compilation concluded successfully when including:
i) “F_OPTS=-O0 -Mfree -byteswapio”, but the model still did not execute.

When I then added
ii) F_OPTS=-O0 -Mfree -byteswapio -tp penryn-32

and

ii) C_OPTS=-O3 -DUNDERSCORE -DLITTLE -m32

the compilation no longer ended successfully, terminating with this error (I will only paste a small portion):

rams-4.3.0.a(askewt.o): In function ptlcljb1_': askewt.f:(.text+0x864b): undefined reference to __mth_i_expx’
rams-4.3.0.a(askewt.o): In function fyjb_': askewt.f:(.text+0x86ae): undefined reference to __mth_i_alog10x’
rams-4.3.0.a(askewt.o): In function esjb1_': askewt.f:(.text+0x87f5): undefined reference to __mth_i_expx’
rams-4.3.0.a(askewt.o): In function tlcljb1_': askewt.f:(.text+0x8998): undefined reference to __mth_i_alogx’
rams-4.3.0.a(askewt.o): In function pconjb1_': askewt.f:(.text+0x8a21): undefined reference to __mth_i_rpowrx’
rams-4.3.0.a(askewt.o): In function powtjb1_': askewt.f:(.text+0x8b84): undefined reference to __mth_i_rpowrx’
rams-4.3.0.a(askewt.o): In function dptjb1_': askewt.f:(.text+0x8c67): undefined reference to __mth_i_alogx’
rams-4.3.0.a(askewt.o): In function dewptjb1_': askewt.f:(.text+0x8d6e): undefined reference to __mth_i_alogx’
rams-4.3.0.a(askewt.o): In function satlftjb1_': askewt.f:(.text+0x8df8): undefined reference to __mth_i_rpowrx’
rams-4.3.0.a(askewt.o): In function esatjb1_': askewt.f:(.text+0x8fed): undefined reference to __mth_i_expx’
rams-4.3.0.a(askewt.o): In function osjb1_': askewt.f:(.text+0x9034): undefined reference to _mth_i_rpowrx’
askewt.f:(.text+0x9073): undefined reference to __mth_i_expx' rams-4.3.0.a(askewt.o): In function tmrjb1
’:
askewt.f:(.text+0x90c4): undefined reference to __mth_i_alog10x' askewt.f:(.text+0x90e9): undefined reference to __mth_i_rpowrx’
askewt.f:(.text+0x910b): undefined reference to __mth_i_rpowrx' askewt.f:(.text+0x9135): undefined reference to __mth_i_rpowrx’
rams-4.3.0.a(askewt.o): In function tsajb1_': askewt.f:(.text+0x9219): undefined reference to __mth_i_expx’
askewt.f:(.text+0x923d): undefined reference to `__mth_i_rpowrx’
pgf90-Fatal-linker completed with exit code 1

make: *** [rams-4.3.0] Error 2

Hi matei,

These symbols are all found in the PGI sse1 runtime library which should be linked by default. Are there any other errors such as incompatible object files before this? Can you post the link line (no including the objects) that generates this error?

  • Mat

hi Mat - the error scrolls by rapidly. I’ve tried redirecting it to an out file, but it doesn’t seem to grab it (is this strange behavior?) - how else, besides redirection can i grab it?

I believe the link lines (what you are asking for) should be part of the error output, or is it the actual line used for linking (below):
MPI_PATH=/opt/pgi/linux86-64/7.2/mpi/mpich
PAR_INCS=-I$(MPI_PATH)/include
PAR_LIBS=-L$(MPI_PATH)/lib -lmpich -lpmpich

Hi matei,

Redirection is your best bet. Something like “command >& log ; less log”.

All your libraries also need to be 32-bits, so your MPI path needs to be changed as well:

MPI_PATH=/opt/pgi/linux86/7.2/mpi/mpich

Do you remember if your Athlon cluster was 32 or 64-bits?

Also, do you know if RAMS is available and if so, where I can download it? This would be far easier if I could walk you through the steps versus just guessing.

  • Mat

Hi Mat, I didn’t recall exactly, so I had to ask. The Athlon cluster was actually 64-bits. But, the version of RAMS I was using had to be compiled in 32-bits (something about pointers being used inappropriately such that despite having 64-bit architecture, we could not take advantage).

The RAMS 4.4 version I need to port over is freely available here: http://atmet.com/

As an aside, if I understand correctly, the fact that this code may not compile (although i was able to) on 64-bit architecture, may be the underlying reason why i cannot get it to actually execute?

Would I be able to send you a tarball of my code, since it is vastly different from what is available online?

Hi matei,

As an aside, if I understand correctly, the fact that this code may not compile (although i was able to) on 64-bit architecture, may be the underlying reason why i cannot get it to actually execute?

No, your code seems like it should compile fine, but from what I gather, it hasn’t been ported to 64-bits. I think your 32-bit build problem is simply that not all the objects and libraries are being built in 32-bits. Send your log file to trs@pgroup.com and I’ll take a look to see if I can spot anything obvious.

Would I be able to send you a tarball of my code, since it is vastly different from what is available online?

Since it’s a porting problem I would recommend that you contact the authors. However, it appears that RAMS 4.4 is from 2003 and is no longer supported.

  • Mat