-------- Original Message --------
Subject: GRIB_API INSTALLATION ISSUSE(Modified again)
Date: Thu, 3 May 2012 15:33:28 +0800 (CST)
From: 邓剑波 <uranus.d@163.com>
To: Software.Services@ecmwf.int
Hi, Dears,
I have send two emails to you before to ask some information about how
to install grib_api correctlly. In this email, I will describe the
detailed issues and another try for it buy change CC=pgcc and FC=pgf90 .
Now, I write down the full issuse and my qustions. Look forward to your
answers.
I have download the grib_api from
http://www.ecmwf.int/products/data/software/download/grib_api.html, and
the vertion is grib_api-1.9.9.tar.gz
<http://www.ecmwf.int/products/data/software/download/software_files/grib_api-1.9.9.tar.gz>.
Then I installed it in my linux Cluste instead of my PC, .
I unpacked the grib_cpi in the directory of /home/jdeng/compile as follw:
1、tar -xvf grib_api-1.9.9.tar.gz
then the grib_api-1.9.9 dir exist
2、cd grib_api-1.9.9
3、FC=pgf90 CC=pgcc F77=pgf90 ./configure
prefix=/home/jdeng/usr/local/grib_api_dir --disable-jpeg (where
/home/jdeng/usr/local/grib_api_dir is the installation directory)
4、make
5、make check
6、make install
There is no error message in steps above, and I finished the
installation, I used my test.f90 to test whether the grib_api work.
My test.f90 file which I copied a example from the GRIB API Version
1.8.0 Refernece Manual like this:
! !
! Author: Anne Fouilloux
!
!
program test
use grib_api
implicit none
integer :: err,i,iret
integer :: nx, ny
integer :: infile,outfile
integer :: igrib_in
integer :: igrib_out
character(len=2) :: step
double precision, dimension(:,, allocatable :: field2D
infile=5
call grib_open_file(infile,’../../data/constant_field.grib1’,’r’)
end
Issuses:
then I compiled the test.f90, the issue come out like this:
[jdeng@n000 test]$ pgf90 test.f90
-I/home/jdeng/usr/local/grib_api_dir/include/grib_api.mod -L
/home/jdeng/usr/local/grib_api_dir/lib -lgrib_api -lgrib_api_f77
-lgrib_api_f90
PGF90-F-0004-Unable to open MODULE file grib_api.mod (test.f90: 4)
PGF90/x86 Linux 9.0-1: compilation aborted
[jdeng@n000 test]$
The libgrib_api, libgrib_api_f77, libgrib_api_f90 and the grib_api.mod
really existed in /usr/local/grib_api_dir/lib and
/usr/local/grib_api_dir/include respectively
I really don't know why it can not open the MODULE file grib_api,mod.
I saw two enviroment variables($GRIB_API_INCLUDE $GRIB_API_LIB) in the
GRIB API Version 1.8.0 Refernece Manual , I did not set this two
variables for I did not know how and where set it, is it be set in
.bashrc? and how?
Your example is:pgf90 -o foo foo.f90 $GRIB_API_INCLUDE $GRIB_API_LIB
but I could not find the GRIB_API_INCLUDE and GRIB_API_LIB neither in
the mannul nor web.
Is it the problem I did not set this two enviroment variables or other
problems in my installation?
Could you give me some advices how to intall the grib_cpi?
Thanks you very much!
From: Deng
[Created via e-mail received from: "Software Services (DP)" <Software.Services@ecmwf.int>]