netcdf installation-gfortran

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
nageswararao

netcdf installation-gfortran

#1 Unread post by nageswararao »

Hi all,
I am trying to install netcdf-3.6.2 version on AMD 64-bit opteron RHEL-3.0 linux with gfortran compiler. When I am trying to configure it I got error. I used the following commands which were said in previous posts.
export FCC=gfortran
export FFLAGS='-O3'
./configure --prefix=/shared/netcdf3/gfortran
I am getting the following error:
configure:5215: error: Fortran could not compile .f90 files
This is the log file generated while configuring:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by netCDF configure 3.6.2, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure --prefix=/shared/netcdf3/gfortran/

## --------- ##
## Platform. ##
## --------- ##

hostname = darpan.npol.org
uname -m = x86_64
uname -r = 2.4.21-20.ELsmp
uname -s = Linux
uname -v = #1 SMP Sat Sep 18 18:28:16 PDT 2004

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/jdk1.5.0_04/bin
PATH: /shared/Matlab2006b/bin
PATH: /shared/nagesh/gfortran/gcc-4.2/bin
PATH: /usr/local/jdk1.5.0_04/bin
PATH: /usr/kerberos/sbin
PATH: /usr/kerberos/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /opt/c3-4/
PATH: /opt/ganglia/bin
PATH: /opt/maui/bin
PATH: /opt/torque/bin
PATH: /opt/torque/sbin
PATH: /opt/rocks/bin
PATH: /opt/rocks/sbin
PATH: /shared/netcdf/bin
PATH: /shared/FortranCompiler/intel_fc_80/bin
PATH: /root/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2046: netCDF 3.6.2
configure:2087: checking build system type
configure:2105: result: x86_64-unknown-linux-gnu
configure:2127: checking host system type
configure:2142: result: x86_64-unknown-linux-gnu
configure:2187: checking for a BSD-compatible install
configure:2243: result: /usr/bin/install -c
configure:2254: checking whether build environment is sane
configure:2297: result: yes
configure:2362: checking for gawk
configure:2378: found /bin/gawk
configure:2389: result: gawk
configure:2400: checking whether make sets $(MAKE)
configure:2421: result: yes
configure:2609: checking user options
configure:2653: checking whether CXX is set to ''
configure:2657: result: no
configure:2661: checking whether FC is set to ''
configure:2665: result: no
configure:2669: checking whether F90 is set to ''
configure:2673: result: no
configure:2699: checking whether documentation is to be installed
configure:2707: result: no
configure:2723: checking whether Fortran compiler(s) should be tested during configure
configure:2731: result: yes
configure:2736: checking whether configure should try to set compiler flags
configure:2744: result: yes
configure:2748: checking whether FFIO will be used
configure:2756: result: no
configure:2771: checking whether to skip C++, F77, or F90 APIs if compiler is broken
configure:2779: result: yes
configure:2783: checking whether only the C library is desired
configure:2791: result: no
configure:2810: checking whether examples should be built
configure:2818: result: yes
configure:2832: checking whether F77 API is desired
configure:2841: result: yes
configure:2846: checking whether F90 API is desired
configure:2856: result: yes
configure:2860: checking whether fortran type sizes should be checked
configure:2868: result: yes
configure:2874: checking whether C API is desired
configure:2882: result: yes
configure:2889: checking where to get netCDF C-only library for separate fortran libraries
configure:2907: result:
configure:2922: checking whether CXX API is desired
configure:2931: result: yes
configure:2935: checking whether v2 netCDF API should be built
configure:2943: result: yes
configure:2964: checking whether the ncgen/ncdump should be built
configure:2972: result: yes
configure:2986: checking whether large file (> 2GB) tests should be run
configure:2994: result: no
configure:3008: checking whether extreme numbers should be used in tests
configure:3023: result: yes
configure:3037: checking where to put large temp files if large file tests are run
configure:3046: result: .
configure:3057: checking whether a win32 DLL is desired
configure:3065: result: no
configure:3091: checking whether separate fortran libs are desired
configure:3100: result: no
configure:3159: finding C compiler
configure:3216: checking for xlc
configure:3246: result: no
configure:3216: checking for cc
configure:3232: found /usr/bin/cc
configure:3243: result: cc
configure:3279: checking for C compiler version
configure:3286: cc --version >&5
cc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3289: $? = 0
configure:3296: cc -v >&5
Reading specs from /usr/lib/gcc-lib/x86_64-unknown-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=x86_64-unknown-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
configure:3299: $? = 0
configure:3306: cc -V >&5
cc: argument to `-V' is missing
configure:3309: $? = 1
configure:3332: checking for C compiler default output file name
configure:3359: cc conftest.c >&5
configure:3362: $? = 0
configure:3400: result: a.out
configure:3417: checking whether the C compiler works
configure:3427: ./a.out
configure:3430: $? = 0
configure:3447: result: yes
configure:3454: checking whether we are cross compiling
configure:3456: result: no
configure:3459: checking for suffix of executables
configure:3466: cc -o conftest conftest.c >&5
configure:3469: $? = 0
configure:3493: result:
configure:3499: checking for suffix of object files
configure:3525: cc -c conftest.c >&5
configure:3528: $? = 0
configure:3551: result: o
configure:3555: checking whether we are using the GNU C compiler
configure:3584: cc -c conftest.c >&5
configure:3590: $? = 0
configure:3607: result: yes
configure:3612: checking whether cc accepts -g
configure:3642: cc -c -g conftest.c >&5
configure:3648: $? = 0
configure:3747: result: yes
configure:3764: checking for cc option to accept ISO C89
configure:3838: cc -c -g -O2 conftest.c >&5
configure:3844: $? = 0
configure:3867: result: none needed
configure:3896: checking for style of include used by make
configure:3924: result: GNU
configure:3952: checking dependency style of cc
configure:4042: result: gcc3
configure:4063: checking whether cc understands -c and -o together
configure:4095: cc -c conftest.c -o conftest2.o >&5
configure:4098: $? = 0
configure:4104: cc -c conftest.c -o conftest2.o >&5
configure:4107: $? = 0
configure:4159: result: yes
configure:4185: checking for an ANSI C-conforming const
configure:4260: cc -c -g -O2 conftest.c >&5
configure:4266: $? = 0
configure:4281: result: yes
configure:4312: finding Fortran compiler (will not be used if Fortran API is not desired)
configure:4702: checking for Fortran compiler version
configure:4709: /shared/nagesh/gfortran/gcc-4.2/bin/gfortran --version >&5
GNU Fortran (GCC) 4.2.4 20080220 (prerelease)
Copyright (C) 2007 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

configure:4712: $? = 0
configure:4719: /shared/nagesh/gfortran/gcc-4.2/bin/gfortran -v >&5
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /projects/tob/gcc-4_2-branch/configure --enable-languages=c,fortran --prefix=/projects/tob/gcc-4.2
Thread model: posix
gcc version 4.2.4 20080220 (prerelease)
configure:4722: $? = 0
configure:4729: /shared/nagesh/gfortran/gcc-4.2/bin/gfortran -V >&5
gfortran: '-V' option must have argument
configure:4732: $? = 1
configure:4740: checking whether we are using the GNU Fortran compiler
configure:4759: /shared/nagesh/gfortran/gcc-4.2/bin/gfortran -c conftest.F >&5
/shared/nagesh/gfortran/gcc-4.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.4/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
configure:4765: $? = 1
configure: failed program was:
| program main
| #ifndef __GNUC__
| choke me
| #endif
|
| end
configure:4782: result: no
configure:4788: checking whether /shared/nagesh/gfortran/gcc-4.2/bin/gfortran accepts -g
configure:4805: /shared/nagesh/gfortran/gcc-4.2/bin/gfortran -c -g conftest.f >&5
/shared/nagesh/gfortran/gcc-4.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.4/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
configure:4811: $? = 1
configure: failed program was:
| program main
|
| end
configure:4827: result: no
configure:4977: checking for Fortran 77 compiler version
configure:4984: gfortran --version >&5
GNU Fortran (GCC) 4.2.4 20080220 (prerelease)
Copyright (C) 2007 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

configure:4987: $? = 0
configure:4994: gfortran -v >&5
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /projects/tob/gcc-4_2-branch/configure --enable-languages=c,fortran --prefix=/projects/tob/gcc-4.2
Thread model: posix
gcc version 4.2.4 20080220 (prerelease)
configure:4997: $? = 0
configure:5004: gfortran -V >&5
gfortran: '-V' option must have argument
configure:5007: $? = 1
configure:5015: checking whether we are using the GNU Fortran 77 compiler
configure:5034: gfortran -c -O3 conftest.F >&5
/shared/nagesh/gfortran/gcc-4.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.4/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
configure:5040: $? = 1
configure: failed program was:
| program main
| #ifndef __GNUC__
| choke me
| #endif
|
| end
configure:5057: result: no
configure:5063: checking whether gfortran accepts -g
configure:5080: gfortran -c -g conftest.f >&5
/shared/nagesh/gfortran/gcc-4.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.4/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
configure:5086: $? = 1
configure: failed program was:
| program main
|
| end
configure:5102: result: no
configure:5146: setting up Fortran 90
configure:5165: checking for Fortran flag to compile .f90 files
configure:5187: /shared/nagesh/gfortran/gcc-4.2/bin/gfortran -c conftest.f90 >&5
/shared/nagesh/gfortran/gcc-4.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.4/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
configure:5193: $? = 1
configure: failed program was:
| program main
|
| end
configure:5187: /shared/nagesh/gfortran/gcc-4.2/bin/gfortran -c -qsuffix=f=f90 conftest.f90 >&5
gfortran: unrecognized option '-qsuffix=f=f90'
/shared/nagesh/gfortran/gcc-4.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.4/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
configure:5193: $? = 1
configure: failed program was:
| program main
|
| end
configure:5187: /shared/nagesh/gfortran/gcc-4.2/bin/gfortran -c -Tf conftest.f90 >&5
/shared/nagesh/gfortran/gcc-4.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.4/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
configure:5193: $? = 1
configure: failed program was:
| program main
|
| end
configure:5212: result: unknown
configure:5215: error: Fortran could not compile .f90 files

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_c_const=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=set
ac_cv_env_F77_value=gfortran
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=set
ac_cv_env_FC_value=/shared/nagesh/gfortran/gcc-4.2/bin/gfortran
ac_cv_env_FFLAGS_set=set
ac_cv_env_FFLAGS_value=-O3
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_f77_compiler_gnu=no
ac_cv_fc_compiler_gnu=no
ac_cv_fc_srcext_f90=unknown
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_objext=o
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=cc
ac_cv_prog_cc_c89=
ac_cv_prog_cc_cc_c_o=yes
ac_cv_prog_cc_g=yes
ac_cv_prog_f77_g=no
ac_cv_prog_fc_g=no
ac_cv_prog_make_make_set=yes
am_cv_CC_dependencies_compiler_type=gcc3

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /shared/nagesh/netcdf/netcdf-3.6.2/missing --run aclocal-1.9'
ALLOCA=''
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /shared/nagesh/netcdf/netcdf-3.6.2/missing --run tar'
AR=''
AS=''
AUTOCONF='${SHELL} /shared/nagesh/netcdf/netcdf-3.6.2/missing --run autoconf'
AUTOHEADER='${SHELL} /shared/nagesh/netcdf/netcdf-3.6.2/missing --run autoheader'
AUTOMAKE='${SHELL} /shared/nagesh/netcdf/netcdf-3.6.2/missing --run automake-1.9'
AWK='gawk'
BUILD_CXX_FALSE=''
BUILD_CXX_TRUE=''
BUILD_C_FALSE=''
BUILD_C_TRUE=''
BUILD_DLL_FALSE=''
BUILD_DLL_TRUE='#'
BUILD_EXAMPLES_FALSE='#'
BUILD_EXAMPLES_TRUE=''
BUILD_F77_FALSE=''
BUILD_F77_TRUE=''
BUILD_F90_FALSE=''
BUILD_F90_TRUE=''
BUILD_SEPARATE_FORTRAN_FALSE=''
BUILD_SEPARATE_FORTRAN_TRUE='#'
BUILD_SHARED_FALSE=''
BUILD_SHARED_TRUE='#'
BUILD_UTILITIES_FALSE='#'
BUILD_UTILITIES_TRUE=''
BUILD_V2_FALSE='#'
BUILD_V2_TRUE=''
CC='cc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DLLTOOL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77='gfortran'
FC='/shared/nagesh/gfortran/gcc-4.2/bin/gfortran'
FCFLAGS=''
FCFLAGS_f90=''
FFLAGS='-O3'
FGREP=''
FTPBINDIR=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_DOCS_FALSE=''
INSTALL_DOCS_TRUE='#'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LARGE_FILE_TESTS_FALSE=''
LARGE_FILE_TESTS_TRUE='#'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /shared/nagesh/netcdf/netcdf-3.6.2/missing --run makeinfo'
MAKEWHATIS_CMD=''
MOD_FLAG=''
NETCDF_C_LIB=''
NM=''
NMFLAGS=''
OBJDUMP=''
OBJEXT='o'
PACKAGE='netcdf'
PACKAGE_BUGREPORT='support@unidata.ucar.edu'
PACKAGE_NAME='netCDF'
PACKAGE_STRING='netCDF 3.6.2'
PACKAGE_TARNAME='netcdf'
PACKAGE_VERSION='3.6.2'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHAREEXT_DYLIB_FALSE=''
SHAREEXT_DYLIB_TRUE='#'
SHAREEXT_SL_FALSE=''
SHAREEXT_SL_TRUE='#'
SHELL='/bin/sh'
STRIP=''
TEST_F77_FALSE=''
TEST_F77_TRUE=''
TEST_PARALLEL_FALSE=''
TEST_PARALLEL_TRUE=''
UPPER_CASE_MOD_FALSE=''
UPPER_CASE_MOD_TRUE=''
USE_FFIO_FALSE=''
USE_FFIO_TRUE='#'
USE_HDF5_DIR_FALSE=''
USE_HDF5_DIR_TRUE='#'
USE_NETCDF4_FALSE=''
USE_NETCDF4_TRUE='#'
USE_NETCDF_C_LIB_DIR_FALSE=''
USE_NETCDF_C_LIB_DIR_TRUE='#'
VERSION='3.6.2'
WHATIS=''
ac_ct_CC='cc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
ac_ct_F77=''
ac_ct_FC=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='/shared/nagesh/netcdf/netcdf-3.6.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='echo'
mandir='${datarootdir}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/shared/netcdf3/gfortran/'
prog=''
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME "netCDF"
#define PACKAGE_TARNAME "netcdf"
#define PACKAGE_VERSION "3.6.2"
#define PACKAGE_STRING "netCDF 3.6.2"
#define PACKAGE_BUGREPORT "support@unidata.ucar.edu"
#define PACKAGE "netcdf"
#define VERSION "3.6.2"
#define USE_EXTREME_NUMBERS 1
#define TEMP_LARGE $TEMP_LARGE

configure: exit 1
Can anybody help me why this was happening.

Thanks in advance.

With best regards,
G.NageswaraRao.

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

#2 Unread post by robertson »

/shared/nagesh/gfortran/gcc-4.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.4/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
It's likely that gfortran you have installed was built with the MPFR library but you do not have that library installed. You need a to install this shared library for gfortran to work. If you do have this library installed it may be as simple as adding it's location to your LD_LIBRARY_PATH environment variable. If not you should search for a gfortran package that is built for RHEL 3 so RPM can resolve the dependencies. However, being that your Linux distribution is so old you may have to manually install it or even compile from source.

Good luck

nageswararao

#3 Unread post by nageswararao »

Thank u Robertson.
Actually I already installed mpfr libraries but I didnt set the path.
Now I set the path and again executed the configure command for netcdf-3.6.2, now it configured well but next step gave me the problem.
when I execute make check I got below error:
Making check in f90
make[1]: Entering directory `/shared/netcdf-3.6.2/f90'
/bin/sh ../libtool --mode=compile /shared/gfortran/gcc-4.2/bin/gfortran -I../libsrc -I. -g -O2 -c -o typeSizes.lo typeSizes.f90
libtool: compile: /shared/gfortran/gcc-4.2/bin/gfortran -I../libsrc -I. -g -O2 -c typeSizes.f90 -o typeSizes.o
/bin/sh ../libtool --mode=compile /shared/gfortran/gcc-4.2/bin/gfortran -I../libsrc -I. -g -O2 -c -o netcdf.lo netcdf.f90
libtool: compile: /shared/gfortran/gcc-4.2/bin/gfortran -I../libsrc -I. -g -O2 -c netcdf.f90 -o netcdf.o
/bin/sh ../libtool --mode=link /shared/gfortran/gcc-4.2/bin/gfortran -I../libsrc -I. -g -O2 -o libnetcdff90.la typeSizes.lo netcdf.lo
libtool: link: ar cru .libs/libnetcdff90.a typeSizes.o netcdf.o
libtool: link: ranlib .libs/libnetcdff90.a
libtool: link: creating libnetcdff90.la
libtool: link: ( cd ".libs" && rm -f "libnetcdff90.la" && ln -s "../libnetcdff90.la" "libnetcdff90.la" )
make[1]: Leaving directory `/shared/netcdf-3.6.2/f90'
Making check in fortran
make[1]: Entering directory `/shared/netcdf-3.6.2/fortran'
depbase=`echo fort-attio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../libsrc -g -O2 -MT fort-attio.lo -MD -MP -MF "$depbase.Tpo" -c -o fort-attio.lo fort-attio.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
libtool: compile: cc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../libsrc -g -O2 -MT fort-attio.lo -MD -MP -MF .deps/fort-attio.Tpo -c fort-attio.c -o fort-attio.o
In file included from fort-attio.c:7:
ncfortran.h:26:42: NF_INT_IS_C_... not defined: No such file or directory
fort-attio.c:13: error: syntax error before "NF_INTEGER"
fort-attio.c:13: error: syntax error before '*' token
fort-attio.c:13: error: syntax error before numeric constant
fort-attio.c:13: warning: data definition has no type or storage class
fort-attio.c:13: error: syntax error before numeric constant
fort-attio.c:13: error: syntax error before '!' token
fort-attio.c:13: error: syntax error before numeric constant
fort-attio.c:20: error: syntax error before numeric constant
fort-attio.c:20: warning: data definition has no type or storage class
fort-attio.c:20: error: syntax error before numeric constant
fort-attio.c:20: error: syntax error before '!' token
fort-attio.c:20: error: syntax error before numeric constant
fort-attio.c:121: error: syntax error before numeric constant
fort-attio.c:121: warning: data definition has no type or storage class
fort-attio.c:121: error: syntax error before numeric constant
fort-attio.c:121: error: syntax error before '!' token
fort-attio.c:121: error: syntax error before numeric constant
fort-attio.c:133: error: syntax error before numeric constant
fort-attio.c:133: warning: data definition has no type or storage class
fort-attio.c:133: error: syntax error before numeric constant
fort-attio.c:133: error: syntax error before '!' token
fort-attio.c:133: error: syntax error before numeric constant
fort-attio.c:141: error: syntax error before numeric constant
fort-attio.c:141: warning: data definition has no type or storage class
fort-attio.c:141: error: syntax error before numeric constant
fort-attio.c:141: error: syntax error before '!' token
fort-attio.c:141: error: syntax error before numeric constant
fort-attio.c:148: error: syntax error before numeric constant
fort-attio.c:148: warning: data definition has no type or storage class
fort-attio.c:148: error: syntax error before numeric constant
fort-attio.c:148: error: syntax error before '!' token
fort-attio.c:148: error: syntax error before numeric constant
make[1]: *** [fort-attio.lo] Error 1
make[1]: Leaving directory `/shared/netcdf-3.6.2/fortran'
make: *** [check-recursive] Error 1
When I tried with ifort compiler then also configure work well and make check given me error stated below:
Making check in f90
make[1]: Entering directory `/shared/nagesh/netcdf/netcdf-3.6.2/f90'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/shared/nagesh/netcdf/netcdf-3.6.2/f90'
Making check in fortran
make[1]: Entering directory `/shared/nagesh/netcdf/netcdf-3.6.2/fortran'
depbase=`echo fort-attio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../libsrc -g -O2 -MT fort-attio.lo -MD -MP -MF "$depbase.Tpo" -c -o fort-attio.lo fort-attio.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
libtool: compile: cc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../libsrc -g -O2 -MT fort-attio.lo -MD -MP -MF .deps/fort-attio.Tpo -c fort-attio.c -o fort-attio.o
In file included from ncfortran.h:12,
from fort-attio.c:7:
cfortran.h:138:3: #error "cfortran.h: Can't find your environment among: - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 - VAX VMS CC 3.1 and FORTRAN 5.4. - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. - CRAY - NEC SX-4 SUPER-UX - CONVEX - Sun - PowerStation Fortran with Visual C++ - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 - LynxOS: cc or gcc with f2c. - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. - f77 with vcc works; but missing link magic for f77 I/O. - NO fort. None of gcc, cc or vcc generate required names. - f2c : Use #define f2cFortran, or cc -Df2cFortran - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran - Absoft Pro Fortran: Use #define AbsoftProFortran - Portland Group Fortran: Use #define pgiFortran - PathScale Fortran: Use #define PATHSCALE_COMPILER"
make[1]: *** [fort-attio.lo] Error 1
make[1]: Leaving directory `/shared/nagesh/netcdf/netcdf-3.6.2/fortran'
make: *** [check-recursive] Error 1
What were the reasons for this error?
Can anyone help in this aspect.

Thanks in advance.

With best regards,
G.NageswaraRao.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#4 Unread post by kate »

Please try again, letting it know which of those options to use. I'm not sure for ifort, but gfortran should work with -Df2cFortran. Add this to your CPPFLAGS.

nageswararao

#5 Unread post by nageswararao »

Hi kate,
I tried with other options like giving FFLAGS as -mp -recursive for ifort and I could install the netcdf with ifort as well as gfortran with -frepack-arrays. But some error is showing in config.log in both ifort and gfortran.
Gfortran
1)conftest.cpp:23:28: ac_nonexistent.h: No such file or directory

2)/shared/gfortran/gcc-4.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/libgfortranbegin.a(fmain.o)(.text+0xa): In function `main':
/projects/tob/gcc-4_2-branch/libgfortran/fmain.c:18: undefined reference to `MAIN__'

3)conftest.c:73: error: syntax error before "ac__type_new_"

4)conftest.c:77: error: syntax error before ')' token

5)conftest.c: In function `main':
conftest.c:47: error: `not' undeclared (first use in this function)
conftest.c:47: error: (Each undeclared identifier is reported only once
conftest.c:47: error: for each function it appears in.)
conftest.c:47: error: syntax error before "big"
configure:25167: $? = 1
The same error 2) was reflecting when I run the ROMS-3.0 with gfortran.
ifort
1)ifortcom: Error: conftest.F, line 3: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
choke me
---------------^
fortcom: Error: conftest.F, line 3: This statement is positioned incorrectly and/or has syntax errors.
choke me
---------------^
compilation aborted for conftest.F (code 1)
configure:4765: $? = 1
configure: failed program was:
| program main
| #ifndef __GNUC__
| choke me
| #endif
|
| end
configure:4782: result: no

2)configure:23746: /shared/nagesh/IntelFort/bin/ifort conftest.f90 >&5
/shared/nagesh/IntelFort/lib/for_main.o(.text+0x26): In function `main':
: undefined reference to `MAIN__'
configure:23749: $? = 1
configure:23756: result: no

3)configure:24071: checking for strlcat
configure:24127: cc -o conftest -g -O2 -DpgiFortran conftest.c >&5
/tmp/cciAeExg.o(.text+0x7): In function `main':
/shared/nagesh/netcdf/netcdf-3.6.2/conftest.c:67: undefined reference to `strlcat'
collect2: ld returned 1 exit status
configure:24133: $? = 1
configure: failed program was:

4)conftest.c:73: syntax error before "ac__type_new_"
conftest.c:73: warning: data definition has no type or storage class
conftest.c: In function `main':
conftest.c:77: syntax error before ')' token
configure:24999: $? = 1

5)conftest.c: In function `main':
conftest.c:47: `not' undeclared (first use in this function)
conftest.c:47: (Each undeclared identifier is reported only once
conftest.c:47: for each function it appears in.)
conftest.c:47: syntax error before "big"
configure:25163: $? = 1
When I run the ROMS-3.0 code with ifort using ifort compiled netcdf I got the same error 2). Suprisingly, the same ifort compiled netcdf with same ifort compiler compiled well with ROMS-2.2. I am not getting whats the problem is.
The version of ifort I am using is 10.1.015.
Again one more problem is ROMS-2.2 is hanging doing nothing when I run the code with executable file created by ifort (./OceanS ocean_upw.in)
Process Information:

Thread # 0 (pid= 26567) is active.

Model Input Parameters: ROMS/TOMS version 2.2
Friday - April 25, 2008 - 4:53:05 PM
-----------------------------------------------------------------------------

Can anybody help in this aspect.

With best regards,
G.NageswaraRao.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#6 Unread post by kate »

Well, I understand one of your problems:
Again one more problem is ROMS-2.2 is hanging doing nothing when I run the code with executable file created by ifort (./OceanS ocean_upw.in)
When using MPI, the correct invocation (plus or minus a runmpi sort of thing) is:

Code: Select all

./OceanM ocean_upw.in
However, the correct invocation for serial or OpenMP is:

Code: Select all

./OceanS < ocean_upw.in
assuming that ocean_upw.in is in the current directory. OceanS wants to read from standard input and the < is redirecting the contents of ocean_upw.in to that standard input.

nageswararao

#7 Unread post by nageswararao »

Thanks Kate for ur reply.
After that I could run my model ROMS-2.2
But that problem of ROMS-3.0 was not solved yet. I am getting held up with that problem.
My problem is with both gfortran and ifort:
/shared/nagesh/IntelFort/bin/ifort -ip -O3 -xW -Vaxlib /shared/ROMS-3.0/trunk/Build/ocean_control.o /shared/ROMS-3.0/trunk/Build/ocean_coupler.o /shared/ROMS-3.0/trunk/Build/propagator.o -o /shared/ROMS-3.0/trunk/Projects/Upwelling/oceanS /shared/ROMS-3.0/trunk/Build/libNLM.a /shared/ROMS-3.0/trunk/Build/libANA.a /shared/ROMS-3.0/trunk/Build/libICE.a /shared/ROMS-3.0/trunk/Build/libUTIL.a /shared/ROMS-3.0/trunk/Build/libMODS.a -L/shared/netcdf3/ifort/lib -lnetcdf
/shared/nagesh/IntelFort/lib/for_main.o(.text+0x26): In function `main':
: undefined reference to `MAIN__'

make: *** [/shared/ROMS-3.0/trunk/Projects/Upwelling/oceanS] Error 1
/
shared/gfortran/gcc-4.2/bin/gfortran -frepack-arrays -O3 -ffast-math /shared/ROMS-3.0/trunk/Build/ocean_control.o /shared/ROMS-3.0/trunk/Build/ocean_coupler.o /shared/ROMS-3.0/trunk/Build/propagator.o -o /shared/ROMS-3.0/trunk/Projects/Upwelling/oceanS /shared/ROMS-3.0/trunk/Build/libNLM.a /shared/ROMS-3.0/trunk/Build/libANA.a /shared/ROMS-3.0/trunk/Build/libICE.a /shared/ROMS-3.0/trunk/Build/libUTIL.a /shared/ROMS-3.0/trunk/Build/libMODS.a -L/shared/netcdf/gfortran/lib -lnetcdf
/shared/gfortran/gcc-4.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/libgfortranbegin.a(fmain.o)(.text+0xa): In function `main':
/projects/tob/gcc-4_2-branch/libgfortran/fmain.c:18: undefined reference to `MAIN__'
collect2: ld returned 1 exit status
gmake: *** [/shared/ROMS-3.0/trunk/Projects/Upwelling/oceanS] Error 1
Please help in this aspect.
Thanks in advance.

Wtih regards,
G.NageswaraRao.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#8 Unread post by kate »

You did do a "make clean" and try again, didn't you? You need to find out where that undefined reference to MAIN__ is coming from. You can use the nm command to look for it in your .o and .a files.

thanh44nq
Posts: 6
Joined: Tue Mar 01, 2016 1:38 am
Location: Kumamoto University

Re: netcdf installation-gfortran

#9 Unread post by thanh44nq »

Dear all,

I could compile the model successfully before.
But the situation has been changed since I reinstalled Cygwin on my PC.
I really do not know why and I guess it is due to:

1) Version of gnumake now is 4.2, it is not suitable for making file
2) Netcdf version I am using is 3.6.3 and 4.4.3.

Who else has netcdf version 3.6.2 which is working well.
Please send me.
Thank you very much.

Thanh.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: netcdf installation-gfortran

#10 Unread post by kate »

What is wrong with netcdf 4.4.3? It is better to use that and to set USE_NETCDF4 in your build.

The latest ROMS makefile will work with gmake 4.2.

thanh44nq
Posts: 6
Joined: Tue Mar 01, 2016 1:38 am
Location: Kumamoto University

Re: netcdf installation-gfortran

#11 Unread post by thanh44nq »

Thanks Kate,

I solved the problem based on your suggestion.
I think such problem came from gnumake.
After I update new version of ROMS, it is working without any additional setting.

Regards,
Thanh.

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: netcdf installation-gfortran

#12 Unread post by m.hadfield »

With Cygwin these days you should install the pre-built Cygwin netCDF libraries rather than building from source.

There are a few Cygwin netCDF packages. I think the one you really need is netcdf-devel, but the others may come in useful too.

Post Reply