I use something like :
export NETCDFHOME=/usr/local/lib
export NETCDF_VERSION=NETCDF4
export NETCDFINC=$NETCDFHOME/include
export NETCDFLIBDIR=$NETCDFHOME/lib
export NETCDFLIBNAME="-lnetcdff -lnetcdf"
Note the additional netcdff library.
Casper
On 09/02/12 11:00, soheila wrote:
> Hi All
>
> I�m on my way to compile and use GETM and I have started pretty much
> from scratch.
>
> I am using 64 bit system and had no problem compiling fortran,
> hdf5.1.8.6 and Netcdf4.1.3 all in Linux default folders, so I have
> libnetcdf.a and libnetcdff.a in usr/local/lib.
> Here is the way I set the environment variables to compile GOTM 4.0.0
> (some might be redundant):
>
> export FC=/opt/intel/bin/ifort;export F77=/opt/intel/bin/ifort;export
> F90=/opt/intel/bin/ifort
> export FORTRAN_COMPILER=IFORT;export IFORTVARS=/opt/intel/bin/
> ifortvars.sh ia32
> NETCDF_VERSION=NETCDF4;export NETCDFDIR=/usr/local;export NETCDFINC=
> $NETCDFDIR/include;export NETCDFLIBNAME=$NETCDFDIR/lib/libnetcdf.a
> export GOTMDIR=/home/taeila/GOTM/gotm-4.0.0
> source /opt/intel/bin/compilervars.sh ia32 (or source /opt/intel/
> bin/ifortvars.sh ia32)
> make
>
> It does some stuff and gives me this error, looks like netcdf problem:
> ����
> �.and many more error lines�.
> make: *** [gotm_prod_IFORT] Error 1
>
> I recompiled netcdf (+ zlib+ hdf) with ifort and still no
> progress�.any help is very much appreciated.
>
> Thanks
> Soheila
>
--
Casper Boon
Senior Software Engineer
School of Earth & Environment (M004)
University of Western Australia
35 Stirling Highway, Crawley WA 6009
tel: +61 8 6488 8011
it might be the case.
Regrads,
Mahdi
> F90=/opt/intel/bin/ifort;source /opt/intel/bin/compilervars.sh ia32
is selecting the 32 bit compiler. It's easy to tell, at a command
prompt type :
file /usr/local/lib/libnetcdff.so
which will tell you it's a symbolic link to another file so just use the
file command on that file - eg :
file /usr/local/lib/libnetcdff.so.5.0.0
If it tells you it a 64 bit ELF then change your env to do :
F90=/opt/intel/bin/ifort;source /opt/intel/bin/compilervars.sh intel64
and recompile
C
>> I�m on my way to compile and use GETM and I have started pretty much
>> from scratch.
>>
>> I am using 64 bit system and had no problem compiling fortran,
>> hdf5.1.8.6 and Netcdf4.1.3 all in Linux default folders, so I have
>> libnetcdf.a and libnetcdff.a in usr/local/lib.
>> Here is the way I set the environment variables to compile GOTM 4.0.0
>> (some might be redundant):
>>
>> export FC=/opt/intel/bin/ifort;export F77=/opt/intel/bin/ifort;export
>> F90=/opt/intel/bin/ifort
>> export FORTRAN_COMPILER=IFORT;export IFORTVARS=/opt/intel/bin/
>> ifortvars.sh ia32
>> NETCDF_VERSION=NETCDF4;export NETCDFDIR=/usr/local;export NETCDFINC=
>> $NETCDFDIR/include;export NETCDFLIBNAME=$NETCDFDIR/lib/libnetcdf.a
>> export GOTMDIR=/home/taeila/GOTM/gotm-4.0.0
>> source /opt/intel/bin/compilervars.sh ia32 (or source /opt/intel/
>> bin/ifortvars.sh ia32)
>> make
>>
>> It does some stuff and gives me this error, looks like netcdf problem:
>> ����
>> �.and many more error lines�.
>> make: *** [gotm_prod_IFORT] Error 1
>>
>> I recompiled netcdf (+ zlib+ hdf) with ifort and still no
>> progress�.any help is very much appreciated.
>>
>> Thanks
>> Soheila
--
Casper Boon
Senior Software Engineer
School of Earth & Environment (M004)
University of Western Australia
35 Stirling Highway, Crawley WA 6009
tel: +61 8 6488 8011
> Here is the way I set the environment variables to compile GOTM 4.0.0
> (some might be redundant):
>
>
> NETCDF_VERSION=NETCDF4
>
I hope this is a type? Of course it must be "export NETCDF_VERSION=NETCDF4".
Which executable is shown for "which nc-config"?
It must be your compiled one.
In newer netcdf versions you might have nf-config instead of nc-config.
Regards,
Knut
> PROBLEM SOLVED!
>
Thanks for your feedback.
> and it is nc-config when I do which, so I
> don't think it was the problem.
>
Good. GETM (still) calls nc-config. GOTM already nf-config.
Regards,
Knut
> Hi everyone
>
> I managed to compile getm and gotm the other day, but I get this error
> when I run getm_prod_IFORT in the getm folder or in compiled examples:
>
only running from the test cases provides the mandatory getm.inp.
> ./getm_prod_IFORT: error while loading shared libraries: libnetcdff.so.
> 5: cannot open shared object file: No such file or directory
>
> The library exists in /usr/local/lib and it has been set in my
> environmental variables before compiling this way:
>
> export NETCDFHOME=/usr/local
> export NETCDFLIBDIR=$NETCDFHOME/lib
>
Once again, if you export NETCDF_VERSION=NETCDF4 (and thus use nc-config
for GETM and nf-config for GOTM) the setting of NETCDFHOME, NETCDFLIBDIR
is meaningless.
> Will be great to have your advice about this problem.
>
Regarding the shared library have you add your NETCDFLIB to the
LD_LIBRARY_PATH?
> Regards
> Soheila
>
Knut