Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Basically you're mixing GNU C and Intel Fortran compilers: most likely this is not safe and could be the reason of the obtained error. If you have a valid license for the Intel fortran compiler you might ask a similar one for the Intel C compiler (icc).

Then you can set your environemnt according to intel's instructions, here. This page is still related to NetCDF3 but they can be applied to NetCDF4, as well.

The only difference is related to the -x option of the intel compilers, which makes optimization for a specific CPU architecture. For Intel compiler version 11.1 the syntax is slightly different (please check the manual page). Here is a working environment for my Centos 5.5 box, equipped with an old but still performing Pentium 4:

HI,here is a new problem,after installing Intel Fortran and c compilers,and the environemnt has been setted according to intel's instructions
[root@localhost netcdf-4.1.1]# ./configure --prefix=/usr/local/netCDF
configure: netCDF 4.1.1
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... gawk
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 a NCIO_MINBLOCKSIZE was specified... 256
checking whether udunits is to be built... no
checking if fsync support is enabled... yes
checking whether extra valgrind tests should be run... no
checking whether libcf is to be built... no
checking whether reading of HDF4 SD files is to be enabled... no
checking whether to fetch some sample HDF4 files from Unidata ftp site to test HDF4 reading (requires wget)... no
checking whether parallel I/O for classic and 64-bit offset files using parallel-netcdf is to be enabled... no
checking whether a location for the parallel-netcdf library was specified... no
checking whether new netCDF-4 C++ API is to be built... no
checking whether extra example tests should be run... no
checking whether parallel IO tests should be run... no
checking whether a location for the HDF5 library was specified...
checking whether a location for the ZLIB library was specified...
checking whether a location for the SZLIB library was specified...
checking whether a location for the HDF4 library was specified...
checking whether a default chunk size in bytes was specified... 4194304
checking whether a maximum per-variable cache size for HDF5 was specified... 67108864
checking whether a number of chunks for the default per-variable cache was specified... 10
checking whether a default file cache size for HDF5 was specified... 4194304
checking whether a default file cache maximum number of elements for HDF5 was specified... 1009
checking whether a default cache preemption for HDF5 was specified... 0.75
checking whether netCDF-4 logging is enabled... no
checking whether a path for curl-config was specified... no
checking whether a location for curl installation was specified... no
configure: checking whether a location for curl-config is in PATH... no
checking whether DAP client is to be built... no
checking whether dap remote testing should be enabled (default on)... no
checking whether the time-consuming dap tests should be enabled (default off)... no
checking whether a location for liboc was specified... no
checking whether netCDF extra tests should be run (developers only)... no
checking whether Fortran compiler(s) should be tested during configure... 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 any Fortran 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 whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/hu/netcdf-4.1.1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
[root@localhost netcdf-4.1.1]#

and the config.log is here:
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 4.1.1, which was
generated by GNU Autoconf 2.65. Invocation command line was

Fatal Error: This program was not built to run on the processor in your system.
The allowed processors are: Intel(R) Core(TM) Duo processors and compatible Intel processors with supplemental Streaming SIMD Extensions 3 (SSSE3) instruction support.

configure:5275: $? = 1
configure:5282: error: in `/home/hu/netcdf-4.1.1':
configure:5286: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

so i can't use intel's compiler because of my computer equipped with AMD CPU?

Yes, you can. The problem is related to the processor optimization -xT which requires the SSSE3 instruction set capability. This option is not compatible with this specific AMD CPU.

As I previously mentioned, please check the ifort or icc man page to see the new syntax rules of the -x option. Looking at the flags associated with your processor, you can see it supports at most the SSE2 instruction set:

Code:

flags : <omitted> sse sse2 <omitted>

so that you can try with -xSSE2 in place of -xT (see the CFLAGS, CXXFLAGS, FFLAGS environment variables).

If it still doesn't work you can try to remove the -x option completely. This means that no additional optimization related to the kind of processor will be performed, but you can live without it.