Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

error in compiled with MM5

stone300
Beginner
970 Views
I'm a student in Third Institute of Oceanography,SOA,China.At work, I'm using Fedora 10 + NCL 5.1.1 (NCL 5.1.1 OPeNDAP-endabled binaries : NCL 5.1.1 64-bit binary for x86_64 chips for LINUX (compiled with gcc 4.3.2)) + intel fortran compiler 11.1 to compile MM5 model,when I compile MM5's TERRAIN program with NONCARG,it works successfully,but compiled with NCARG,I'm getting the following errors:

/usr/local/lib/libncarg_gks.a(gzreop.o):gzreop.f:(.text+0x1c1): more undefined references to `_gfortran_transfer_integer' follow
/usr/local/lib/libncarg_gks.a(gzreop.o): In function `gzreop_':
gzreop.f:(.text+0x1ec): undefined reference to `_gfortran_st_read_done'
gzreop.f:(.text+0x6b4): undefined reference to `_gfortran_st_read'
gzreop.f:(.text+0x6d1): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0x6ee): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0x70b): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0x719): undefined reference to `_gfortran_st_read_done'
gzreop.f:(.text+0x84d): undefined reference to `_gfortran_st_read'
gzreop.f:(.text+0x86a): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0x887): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0x8a4): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0x8b2): undefined reference to `_gfortran_st_read_done'
gzreop.f:(.text+0x978): undefined reference to `_gfortran_st_read'
gzreop.f:(.text+0x9b1): undefined reference to `_gfortran_transfer_integer'
gzreop.f:(.text+0x9d1): undefined reference to `_gfortran_st_read_done'
gzreop.f:(.text+0xa41): undefined reference to `_gfortran_st_read'
gzreop.f:(.text+0xa7a): undefined reference to `_gfortran_transfer_integer'
gzreop.f:(.text+0xa9a): undefined reference to `_gfortran_st_read_done'
gzreop.f:(.text+0xb0a): undefined reference to `_gfortran_st_read'
gzreop.f:(.text+0xb43): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0xb63): undefined reference to `_gfortran_st_read_done'
gzreop.f:(.text+0xbd3): undefined reference to `_gfortran_st_read'
gzreop.f:(.text+0xc0c): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0xc2c): undefined reference to `_gfortran_st_read_done'
gzreop.f:(.text+0xc9c): undefined reference to `_gfortran_st_read'
gzreop.f:(.text+0xcd5): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0xcf5): undefined reference to `_gfortran_st_read_done'
gzreop.f:(.text+0xd65): undefined reference to `_gfortran_st_read'
gzreop.f:(.text+0xd9e): undefined reference to `_gfortran_transfer_real'
gzreop.f:(.text+0xdbe): undefined reference to `_gfortran_st_read_done'
/usr/local/lib/libncarg_gks.a(g01wdr.o): In function `.L30':
g01wdr.f:(.text+0xe13): undefined reference to `_gfortran_compare_string'
/usr/local/lib/libncarg_gks.a(gwiwdr.o): In function `.L14':
gwiwdr.f:(.text+0x65f): undefined reference to `_gfortran_compare_string'
/usr/local/lib/libncarg_gks.a(g01seg.o): In function `g01seg_':
g01seg.f:(.text+0x62): undefined reference to `_gfortran_st_write'
g01seg.f:(.text+0x82): undefined reference to `_gfortran_transfer_character'
g01seg.f:(.text+0x90): undefined reference to `_gfortran_st_write_done'
g01seg.f:(.text+0x9c): undefined reference to `_gfortran_stop_numeric'
/usr/local/lib/libncarg_gks.a(pixwrite_png.o): In function `write_png':
pixwrite_png.c:(.text+0x46e): undefined reference to `png_create_write_struct'
pixwrite_png.c:(.text+0x49d): undefined reference to `png_create_info_struct'
pixwrite_png.c:(.text+0x4ba): undefined reference to `png_destroy_write_struct'
pixwrite_png.c:(.text+0x4f5): undefined reference to `png_destroy_write_struct'
pixwrite_png.c:(.text+0x52c): undefined reference to `png_init_io'
pixwrite_png.c:(.text+0x56a): undefined reference to `png_malloc'
pixwrite_png.c:(.text+0x5ba): undefined reference to `png_set_rows'
pixwrite_png.c:(.text+0x5fd): undefined reference to `png_set_IHDR'
pixwrite_png.c:(.text+0x638): undefined reference to `png_write_png'
pixwrite_png.c:(.text+0x64a): undefined reference to `png_destroy_write_struct'
/usr/local/lib/libncarg_c.a(i1mach.o): In function `i1mach_':
i1mach.f:(.text+0x15e): undefined reference to `_gfortran_st_write'
i1mach.f:(.text+0x16c): undefined reference to `_gfortran_st_write_done'
i1mach.f:(.text+0x178): undefined reference to `_gfortran_stop_numeric'
i1mach.f:(.text+0x4e6): undefined reference to `_gfortran_st_write'
i1mach.f:(.text+0x4f4): undefined reference to `_gfortran_st_write_done'
i1mach.f:(.text+0x500): undefined reference to `_gfortran_stop_numeric'
i1mach.f:(.text+0x698): undefined reference to `_gfortran_st_write'
i1mach.f:(.text+0x6b8): undefined reference to `_gfortran_transfer_character'
i1mach.f:(.text+0x6d5): undefined reference to `_gfortran_transfer_integer'
i1mach.f:(.text+0x6f5): undefined reference to `_gfortran_transfer_character'
i1mach.f:(.text+0x703): undefined reference to `_gfortran_st_write_done'
i1mach.f:(.text+0x70f): undefined reference to `_gfortran_stop_numeric'

PS.: Below, gfortran, gcc, libgfortran and NCL installed on Fedora 10:

$ gfortran -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla--enable-bootstrap
--enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-cpu=generic --build=i386-redhat-linux
Thread model: posix
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)

$ yum list installed |grep libgfortran
libgfortran.i386 4.3.2-7 installed

$ gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux
Thread model: posix
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)

when I type ncl /home/stone/gsun01n.ncl,it works
$ ncl /home/stone/gsun01n.ncl
Copyright (C) 1995-2009 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 5.1.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.


Best regards,

Jianqiong Zhan
0 Kudos
1 Reply
TimP
Honored Contributor III
970 Views
You must compile all the Fortran subroutines with the same Fortran compiler. You will not be able to link a mixture of gfortran compiled objects and ifort compiled objects. Nor will you be able to mix 32- and 64-bit compilations. If you in fact have the 32-bit Fedora installed, but wish to continue to use pre-built 64-bit binaries, you will need to switch to 64-bit linux x86_64 and the Intel64 version of ifort.
0 Kudos
Reply