compiling BLAS/BUFR/LAPACK

Setting up the 3DVAR package within WRF.

compiling BLAS/BUFR/LAPACK

Postby themis » Tue Dec 09, 2008 10:01 am

Sorry guys, does anyone know how to compile the three libraries which are mentioned in the 3DVAR tutorial, in order to install 3DVAR? I am running pgi (i think v 7. something)
Thanks in advance
Themis
themis
 
Posts: 14
Joined: Tue Apr 22, 2008 3:39 pm

Re: compiling BLAS/BUFR/LAPACK

Postby sureshrka » Thu Dec 25, 2008 11:54 pm

check WRF-3DVAR tutorial or 3DVAR section in user guide
sureshrka
 
Posts: 17
Joined: Fri May 09, 2008 12:29 am

Re: compiling BLAS/BUFR/LAPACK

Postby Waniha Pascal » Tue Dec 30, 2008 7:26 pm

Assuming we are working in ~/external and all of the library
distributions have been untarred, we build the following libraries.

1.a) BLAS (http://netlib.org/blas)

setenv AR "ar -ru"
setenv FC pgf90
setenv FCFLAGS "-O2 -r8"
rm -f *.o *.a
$FC -c $FCFLAGS *.f
$AR libblas.a *.o
rm *.o

setenv BLAS ~/external/BLAS

1.b) LAPACK (http://netlib.org/lapack/)

cp INSTALL/make.inc.LINUX make.inc
[ Edit make.inc ]
[ Change FORTRAN and LOADER to 'pgf90' ]
[ Change OPTS to '-O3 -r8' ]
make clean
make lib
rm SRC/*.o
ranlib lapack_LINUX.a
ranlib tmglib_LINUX.a
ln -fs lapack_LINUX.a liblapack.a
ln -fs tmglib_LINUX.a libtmg.a

setenv LAPACK ~/external/LAPACK

1.c) BUFR (http://www.nco.ncep.noaa.gov/sib/decoders/BUFRLIB/)

setenv AR "ar -ru"
setenv FC pgf90
setenv CC pgcc
setenv FCFLAGS "-O2 -r8"
setenv CCFLAGS "-O2 -DUNDERSCORE"
rm -f *.o *.a
$FC -c $FCFLAGS *.f
$CC -c $CCFLAGS *.c
$AR libbufr.a *.o
rm *.o

setenv BUFR ~/external/BUFR

If PGI was installed well these settings will work ...,. Good luck feedback will be appreciated
Waniha Pascal
 
Posts: 12
Joined: Tue May 27, 2008 7:02 pm

Re: compiling BLAS/BUFR/LAPACK

Postby themis » Fri Jan 09, 2009 5:18 am

Many thanks.
everything works as you described it.
Thanks again
Themis
themis
 
Posts: 14
Joined: Tue Apr 22, 2008 3:39 pm

Re: compiling BLAS/BUFR/LAPACK

Postby wrfda » Fri Jan 30, 2009 3:03 pm

Please note:
Because there are 2 *.F files, so when you compile BUFR lib downloaded from web, the compilation should be:

1.c) BUFR (http://www.nco.ncep.noaa.gov/sib/decoders/BUFRLIB/)

setenv AR "ar -ru"
setenv FC pgf90
setenv CC pgcc
setenv FCFLAGS "-O2 -r8"
setenv CCFLAGS "-O2 -DUNDERSCORE"
rm -f *.o *.a
$FC -c $FCFLAGS *.f
$FC -c $FCFLAGS *.F
$CC -c $CCFLAGS *.c
$AR libbufr.a *.o
rm *.o
wrfda
 
Posts: 8
Joined: Fri Jan 30, 2009 2:53 pm

Re: compiling BLAS/BUFR/LAPACK

Postby leonard » Thu Feb 19, 2009 9:45 pm

According to README_BUFRLIB, one should run preproc.sh to convert the two *.F (which are platform dependent) to *.f.
leonard
 
Posts: 25
Joined: Thu Feb 19, 2009 9:40 pm

Re: compiling BLAS/BUFR/LAPACK

Postby somkuan tonjan » Wed Mar 04, 2009 10:52 pm

Dear All
I have some problem for run wrfvar 3.0.1.1. I use PGI version -7.1-6 compiler. MPICH2 and netcdf 4.0. The error are :

mpif90 -f90=pgf90 -c -fastsse -Mvect=noaltcode -Msmartalloc -Mprefetch=distance:8 -Mfprelaxed -w -Mfree -byteswapio -r8 -i4 -I/src -I/src da_wrfvar_main.f
mpif90 -f90=pgf90 -o da_wrfvar.exe -fastsse -Mvect=noaltcode -Msmartalloc -Mprefetch=distance:8 -Mfprelaxed -w -Mfree -byteswapio -I/home/model/WRFDA/external/esmf_time_f90 da_wrfvar_main.o \
-L. -lwrfvar -L/usr/local/bufr -lbufr \
-L/usr/local/lapack -llapack -L/usr/local/blas -lblas -L/home/model/WRFDA/external/fftpack/fftpack5 -lfftpack -L/home/model/WRFDA/external/io_grib1 -lio_grib1 -L/home/model/WRFDA/external/io_grib_share -lio_grib_share -L/home/model/WRFDA/external/io_int -lwrfio_int /home/model/WRFDA/external/esmf_time_f90/libesmf_time.a /home/model/WRFDA/external/esmf_time_f90/libesmf_time.a /home/model/WRFDA/external/RSL_LITE/librsl_lite.a /home/model/WRFDA/frame/module_internal_header_util.o /home/model/WRFDA/frame/pack_utils.o /home/model/WRFDA/external/io_netcdf/libwrfio_nf.a -L/usr/local/netcdf/lib -lnetcdf
/usr/local/bufr/libbufr.a(datelen.o): In function `datelen_':
datelen.f:(.text+0x1d): undefined reference to `wrdlen_'
/usr/local/bufr/libbufr.a(openbf.o): In function `openbf_':
openbf.f:(.text+0x2cd): undefined reference to `wrdlen_'
/usr/local/bufr/libbufr.a(ovrbs1.o): In function `ovrbs1_':
ovrbs1.f:(.text+0x1d1): undefined reference to `wrdlen_'
/usr/local/bufr/libbufr.a(pkb.o): In function `pkb_':
pkb.f:(.text+0xac): undefined reference to `irev_'
pkb.f:(.text+0xc2): undefined reference to `irev_'
pkb.f:(.text+0x113): undefined reference to `irev_'
pkb.f:(.text+0x129): undefined reference to `irev_'
/usr/local/bufr/libbufr.a(pkc.o): In function `pkc_':
pkc.f:(.text+0x148): undefined reference to `irev_'
/usr/local/bufr/libbufr.a(pkc.o):pkc.f:(.text+0x15e): more undefined references to `irev_' follow
/usr/local/bufr/libbufr.a(iupbs01.o): In function `iupbs01_':
iupbs01.f:(.text+0x22): undefined reference to `wrdlen_'
/usr/local/bufr/libbufr.a(iupm.o): In function `iupm_':
iupm.f:(.text+0x4b): undefined reference to `irev_'
/usr/local/bufr/libbufr.a(upbb.o): In function `upbb_':
upbb.f:(.text+0x50): undefined reference to `irev_'
upbb.f:(.text+0x95): undefined reference to `irev_'
make[1]: [da_wrfvar.exe] Error 2 (ignored)
rm -f da_advance_time.o
I would like to know. How to solve a problem.
Somkuan Tonjan
Thai Met.
somkuan tonjan
 
Posts: 1
Joined: Wed Mar 04, 2009 4:57 am

Re: compiling BLAS/BUFR/LAPACK

Postby estatio » Fri Mar 06, 2009 3:37 pm

Hi.

I'm having the same problem.

It seems that there is an issue with the file wrdlen.f when I compile BUFR

I get this error message when I compile BUFR:

fortcom: Warning: nvnwin.f, line 84: The INTEGER(KIND=4) value is out-of-range. [10E10]
INVN(I) = BMISS
----------------^
fortcom: Error: wrdlen.f, line 112: Illegal character in statement label field [I]
10 IF(I.GE.65) GOTO 900
---^
fortcom: Error: wrdlen.f, line 112: Illegal character in statement label field [F]
10 IF(I.GE.65) GOTO 900
----^
fortcom: Error: wrdlen.f, line 112: A continuation character is illegal on a line with a statement label
10 IF(I.GE.65) GOTO 900
-----^
fortcom: Error: wrdlen.f, line 112: Unbalanced parentheses
10 IF(I.GE.65) GOTO 900
-------------^
fortcom: Error: wrdlen.f, line 112: Syntax error, found INTEGER_CONSTANT '65' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
10 IF(I.GE.65) GOTO 900
-----------^
fortcom: Error: wrdlen.f, line 136: Illegal character in statement label field [I]
20 IF(J.GT.NBYTW) GOTO 902
---^
fortcom: Error: wrdlen.f, line 136: Illegal character in statement label field [F]
20 IF(J.GT.NBYTW) GOTO 902
----^
fortcom: Error: wrdlen.f, line 136: A continuation character is illegal on a line with a statement label
20 IF(J.GT.NBYTW) GOTO 902
-----^
fortcom: Error: wrdlen.f, line 136: Unbalanced parentheses
20 IF(J.GT.NBYTW) GOTO 902
----------------^
fortcom: Error: wrdlen.f, line 136: Syntax error, found ')' when expecting one of: => = . %
20 IF(J.GT.NBYTW) GOTO 902
----------------^
fortcom: Error: wrdlen.f, line 457: Illegal character in statement label field [F]
100 FORMAT(/15('='),' WELCOME TO BUFR ARCHIVE LIBRARY ',15('=')/
----^
fortcom: Error: wrdlen.f, line 457: A continuation character is illegal on a line with a statement label
100 FORMAT(/15('='),' WELCOME TO BUFR ARCHIVE LIBRARY ',15('=')/
-----^
fortcom: Error: wrdlen.f, line 457: Syntax error, found '(/' when expecting one of: => = . ( : %
100 FORMAT(/15('='),' WELCOME TO BUFR ARCHIVE LIBRARY ',15('=')/
fortcom: Error: wrdlen.f, line 469: Illegal character in statement label field [W]
900 WRITE(BORT_STR,'("BUFRLIB: WRDLEN - MACHINE WORD LENGTH IS '
----^
fortcom: Error: wrdlen.f, line 469: A continuation character is illegal on a line with a statement label
900 WRITE(BORT_STR,'("BUFRLIB: WRDLEN - MACHINE WORD LENGTH IS '
-----^
fortcom: Error: wrdlen.f, line 470: Syntax error, found CHARACTER_CONSTANT 'LIMITED TO 64 BITS (THIS MACHINE APPARENTLY HAS",I4," BIT ' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
. 'LIMITED TO 64 BITS (THIS MACHINE APPARENTLY HAS",I4," BIT '
-------^
fortcom: Error: wrdlen.f, line 473: Illegal character in statement label field [W]
901 WRITE(BORT_STR,'("BUFRLIB: WRDLEN - MACHINE WORD LENGTH (",I4,"'
----^
fortcom: Error: wrdlen.f, line 473: A continuation character is illegal on a line with a statement label
901 WRITE(BORT_STR,'("BUFRLIB: WRDLEN - MACHINE WORD LENGTH (",I4,"'
-----^
fortcom: Error: wrdlen.f, line 474: Syntax error, found CHARACTER_CONSTANT ') IS NOT A MULTIPLE OF 8 (THIS MACHINE HAS WORDS NOT ON WHOLE' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
. ') IS NOT A MULTIPLE OF 8 (THIS MACHINE HAS WORDS NOT ON WHOLE'
-------^
fortcom: Error: wrdlen.f, line 477: Illegal character in statement label field [W]
902 WRITE(BORT_STR,'("BUFRLIB: WRDLEN - BYTE ORDER CHECKING MISTAKE'
----^
fortcom: Error: wrdlen.f, line 477: A continuation character is illegal on a line with a statement label
902 WRITE(BORT_STR,'("BUFRLIB: WRDLEN - BYTE ORDER CHECKING MISTAKE'
-----^
fortcom: Error: wrdlen.f, line 478: Syntax error, found CHARACTER_CONSTANT ', LOOP INDEX J (HERE =",I3,") IS .GT. NO. OF BYTES PER WORD ' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
. ', LOOP INDEX J (HERE =",I3,") IS .GT. NO. OF BYTES PER WORD '
-------^
fortcom: Error: wrdlen.f, line 481: Illegal character in statement label field [W]
903 WRITE(BORT_STR,'("BUFRLIB: WRDLEN - CAN''T DETERMINE MACHINE '
----^
fortcom: Error: wrdlen.f, line 481: A continuation character is illegal on a line with a statement label
903 WRITE(BORT_STR,'("BUFRLIB: WRDLEN - CAN''T DETERMINE MACHINE '
-----^
fortcom: Error: wrdlen.f, line 482: Syntax error, found CHARACTER_CONSTANT 'NATIVE LANGUAGE (CHAR. A UNPACKS TO INT.",I4," NEITHER ASCII ' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
. 'NATIVE LANGUAGE (CHAR. A UNPACKS TO INT.",I4," NEITHER ASCII '
-------^
fortcom: Error: wrdlen.f, line 136: This variable or component must be of a derived or structure type [J]
20 IF(J.GT.NBYTW) GOTO 902
------^
fortcom: Error: wrdlen.f, line 136: This is not a field name that is defined in the encompassing structure. [GT]
20 IF(J.GT.NBYTW) GOTO 902
--------^
fortcom: Error: wrdlen.f, line 456: This label has not been defined as a FORMAT label. [100]
PRINT 100, NBYTW,NBITW,CNDIAN,NREV,IORD,CLANG
---------------^
fortcom: Error: wrdlen.f, line 109: This label is undefined. [10]
IF(INT.EQ.0) GOTO 10
------------------------^
fortcom: Error: wrdlen.f, line 456: This label is undefined. [100]
PRINT 100, NBYTW,NBITW,CNDIAN,NREV,IORD,CLANG
---------------^
fortcom: Severe: Too many errors, exiting
compilation aborted for wrdlen.f (code 1)
estatio
 
Posts: 14
Joined: Sat Apr 19, 2008 6:37 pm

Re: compiling BLAS/BUFR/LAPACK

Postby Waniha Pascal » Sat Mar 07, 2009 4:30 am

estatio , What compilers are you using?,
Its seems you have problems in installing BUFR, what about BLAS and LAPACK ?.., If they were well installed then try to download again BURF source code from http://www.nco.ncep.noaa.gov/sib/decoders/BUFRLIB/, Cause it seemed you have corrupted files.
If you havent installed them then you should follow the instruction above on how to install the starting with LAPACK then BLASK and fish up with BUFR,
It should be noted that the instruction is for those using PGI compilers.
Waniha
Waniha Pascal
 
Posts: 12
Joined: Tue May 27, 2008 7:02 pm

Re: compiling BLAS/BUFR/LAPACK

Postby estatio » Sat Mar 07, 2009 3:10 pm

Thanks Waniha.

I'm using ifort and icc.

I didn't have trouble compiling BLAS and LAPACK, so that's why I don't understand what's happening with BUFR.

I will download BURF again as you said. Lets see what's gonna happen.

Thank you.
estatio
 
Posts: 14
Joined: Sat Apr 19, 2008 6:37 pm

Next

Return to Installation

Who is online

Users browsing this forum: Bing [Bot] and 1 guest