Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

problems in compiling netcdf

swarnali
Beginner
981 Views
Hi
I'm new to ubuntu.
I'm tring to instal netcdf as a prerequisite of WRF and while instaling it I'mfacing this problem

configure: netCDF 3.6.3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
configure: checking user options
checking whether CXX is set to ''... no
checking whether FC is set to ''... no
checking whether F90 is set to ''... no
checking whether this is a netCDF-4.x build... no
checking whether netCDF extra tests should be run (developers only)... no
checking whether documentation is to be installed... no
checking whether Fortran compiler(s) should be tested during configure... yes
checking whether configure should try to set compiler flags... yes
checking whether FFIO will be used... no
checking whether to skip C++, F77, or F90 APIs if compiler is broken... yes
checking whether only the C library is desired... no
checking whether examples should be built... yes
checking whether F77 API is desired... yes
checking whether F90 API is desired... yes
checking whether fortran type sizes should be checked... yes
checking whether C API is desired... yes
checking where to get netCDF C-only library for separate fortran libraries...
checking whether CXX API is desired... yes
checking whether v2 netCDF API should be built... yes
checking whether the ncgen/ncdump should be built... yes
checking whether large file (> 2GB) tests should be run... no
checking whether benchmaks should be run (experimental)... no
checking whether extreme numbers should be used in tests... yes
checking where to put large temp files if large file tests are run... .
checking whether a win32 DLL is desired... no
checking whether separate fortran libs are desired... no
configure: finding C compiler
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.


Please do help me
Thanks
Swarnali
0 Kudos
5 Replies
TimP
Honored Contributor III
981 Views
Quoting - swarnali

I'm new to ubuntu.
to instal netcdf as a prerequisite of WRF and while instaling it I'mfacing this problem


configure: finding C compiler
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.


Please do help me

No one can help you if you don't follow the advice and examine config.log to see what happened when it attempted a C compilation. It would probably be best to use both CC=icc and CXX=icpc if you intend to use either. Almost certainly, FC and F90 would need to designate the same Fortran.
Does WRF build on a 32-bit installation? If you're new to Ubuntu but familiar with linux in general, why beat your head against the wall? If you didn't find evidence that this task has been completed with Ubuntu, advice here may not cover the gap.
0 Kudos
Kirill_Mavrodiev__In
981 Views
Hi,

Beside config.log and OS can you give information about compiler version. Btw did you see this article http://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-netcdf-with-the-intel-compilers/?

For the installation WRF you can check http://software.intel.com/en-us/articles/wrf-installation-bkm-for-linux-with-intel-c-and-fortran-compiler-v-111/.

Also just in case check permissions for the directory where you want to install netcdf.

Thanks.
0 Kudos
Kirill_Mavrodiev__In
981 Views
Try this one:
Create script build_netcdf.sh:

"
#!/bin/sh
#INTEL_COMPILER_TOPDIR directory where Intel Compiler has been installed
export INTEL_COMPILER_TOPDIR="/opt/intel/Compiler/11.1/056"
#Setting environment variables for the Intel C++ Compiler Professional Edition for Linux
. $INTEL_COMPILER_TOPDIR/bin/intel64/iccvars_intel64.sh
#Setting environment variables for the Intel Fortran Compiler Professional Edition for Linux
. $INTEL_COMPILER_TOPDIR/bin/intel64/ifortvars_intel64.sh

./configure CC=icc CXX=icc F77=ifort F90=ifort FC=ifort

make check
make install

"
Change attributes for this script.
$chmod 777 ./build_netcdf.sh
And then run it:
$((./build_netcdf.sh) 3>&2 2>&1 1>&3 | tee build_netcdf.err ) 2>&1 | tee build_netcdf.log
or
$./build_netcdf.sh 2>&1 | tee build_netcdf.log
0 Kudos
TimP
Honored Contributor III
981 Views
0 Kudos
Kirill_Mavrodiev__In
981 Views
Yes it covers x86_64 installation. But it works on IA64 as well. Only if to build WRF v.3.1.1 on IA64 in serial mode
Then in the file configure.wrf you will find variable for the linker
LIB_LOCAL = -L/usr/lib -lmpi. -lmpi should be commented if you don't have preinstalled MPI library.

Unfortunately I cannot say anything about 32-bit Linux and Mac.

					
				
			
			
				
			
			
			
			
			
			
			
		
0 Kudos
Reply