[MITgcm-support] problem with PGI compilers

Martin Losch Martin.Losch at awi.de
Fri Feb 20 05:40:39 EST 2009


Abbas,

1. you don't need to worry about this, if worst comes to worst, you  
won't be able to get timings at the end of the integrations, but you  
will still be able to do integrations without restrictions
2. if you do care: have a look at genmake_warnings for more error  
messages. Most likely it's an issue with the "namemangling" (so does  
the compiler expect trailing "_" or not). To find out about name  
mangling, type "nm mitgcmuv" and look for the names of subroutines, e.g.
build> nm mitgcmuv | head
          U _G77_fdate_0
          U _G77_getenv_0
          U _G77_system_0
0016b028 T _MAIN__
means that my compiler expects double trailing underscores. If your C- 
libraries don't have that, the compiler can't link them. There's a CPP- 
flag to set in your build options file, e.g.
FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
changes the behavior of the compiler (and I never know how, and do  
trail and error, there are three options: "_","__" and " " after the  
hash).

On the other hand, you can call C-routines (Can we use stat() through  
C calls...  yes), so that probably there is no cloc() in your pgf  
libraries?

Martin


On Feb 20, 2009, at 2:13 AM, Abbas Dorostkar wrote:

> Dear all,
>
> I compiled the MITgcm code on a Linux Opteron cluster that uses PGI  
> compilers. According to the following message, it can't call simple  
> C routine. It would be nice if I could have your ideas. I have  
> attached the Opt file I used.
>
> ===  Checking system libraries  ===
>   Do we have the system() command using /opt/hpmpi/bin/mpif77...  yes
>   Do we have the fdate() command using /opt/hpmpi/bin/mpif77...  yes
>   Do we have the etime() command using /opt/hpmpi/bin/mpif77...  yes
>   Can we call simple C routines (here, "cloc()") using /opt/hpmpi/ 
> bin/mpif77...  no
>   Can we unlimit the stack size using /opt/hpmpi/bin/mpif77...  yes
>   Can we register a signal handler using /opt/hpmpi/bin/mpif77...  yes
>   Can we use stat() through C calls...  yes
>   Can we create NetCDF-enabled binaries...  yes
>
> ---------------Opt file----------------
> FC='/opt/hpmpi/bin/mpif77'
> CC='/opt/hpmpi/bin/mpicc'
> LINK=mpif77
> DEFINES='-DWORDLENGTH=4 -DALLOW_USE_MPI -DALWAYS_USE_MPI'
> CPP='/usr/bin/cpp  -traditional -P'
> NOOPTFLAGS='-O0'
> MAKEDEPEND=/usr/X11R6/bin/makedepend
> INCLUDES='-I/opt/hpmpi/include/64 -I/usr/apps/include'
> LIBS='-L/usr/apps/lib'
> if test "x$IEEE" = x ; then
>     #  No need for IEEE-754
>     FFLAGS='-byteswapio -r8 -Mnodclchk -Mextend -Ktrap=fp'
>     FOPTIM='-tp k8-64 -pc=64 -fastsse -O3 -Msmart -Mvect=cachesize: 
> 1048576,transform'
> else
>     #  Try to follow IEEE-754
>     FFLAGS='-byteswapio -r8 -Mnodclchk -Mextend -Ktrap=fp'
>     FOPTIM='-tp k8-64 -pc=64 -fastsse -O3 -Msmart -Kieee - 
> Mvect=cachesize:1048576,transform'
> fi
>
> Thanks,
> Abbas
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list