rd_grib2 compile fails for WPS 3.1 MAC OS X 10.5 ifort icc

Installing the WRF Preprocessing System

rd_grib2 compile fails for WPS 3.1 MAC OS X 10.5 ifort icc

Postby kpvolz » Mon May 18, 2009 7:49 pm

Subject pretty much says it all.

I am compiling WRFV3.1 and WPS3.1 on a Mac Pro using the intel compilers icc and ifort version 11 on a case sensitive file system.

Almost all of WPS builds except ungrib.exe because there is no object code for rd_grib2.f90. See errors below.

Here is the important part of configure.defaults

########################################
#ARCH Darwin serial, INTEL, ifort compiler, serial
#
COMPRESSION_LIBS = -L/usr/local/lib -ljasper \
-L/usr/X11/lib -lpng12 -lpng -lz
COMPRESSION_INC = -I/usr/local/include -I/usr/X11/include
FC = ifort
SFC = ifort
#FFLAGS = -ffree-form -g -fendian=big
FFLAGS = -O3 -xT -ip -no-prec-div -m64
#F77FLAGS = -ffixed-form -g -fendian=big
F77FLAGS = -O3 -xT -ip -no-prec-div -m64
FNGFLAGS = $(FFLAGS)
#LDFLAGS = -g
LDFLAGS = -ip -Wl,-stack_addr,0xF10000000 -Wl,-stack_size,0x64000000
CC = icc
SCC = icc
#CFLAGS = -g
CFLAGS = -O3 -xT -ip -no-prec-div -m64
CPP = /usr/bin/cpp -C -P -traditional
CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS
RANLIB = ranlib
#####################################

Errors that cause compilation of ungrib.exe to fail.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

rd_grib2.f90(39): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: * <IDENTIFIER>
SUBROUTINE rd_grib2(junit, gribflnm, hdate,
--------------------------------------------------^
rd_grib2.f90(40): error #5082: Syntax error, found '&' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
& grib_edition, ireaderr, debug_level)
--------^
rd_grib2.f90(40): error #5277: Unbalanced parentheses
& grib_edition, ireaderr, debug_level)
-------------------------------------------^
kpvolz
 
Posts: 8
Joined: Mon May 18, 2009 7:21 pm

Re: rd_grib2 compile fails for WPS 3.1 MAC OS X 10.5 ifort icc

Postby kpvolz » Wed May 20, 2009 3:04 pm

Solution from Intel:

The file that failed to compile was rd_grib2.f90. The code is in fixed-format. The compiler expects free format.
Note also that CPP expects "-D_UNDERSCORE" _NOT_ "-D_DOUBLEUNDERSCORE"

I edited the g95 options in WPS/arch/configure.defaults. (Those edits are include below and in attached file) I then followed the steps below.

koyukuk:WPS ruser$ ./clean -a
koyukuk:WPS ruser$ ./configure
koyukuk:WPS ruser$ cd ungrib/src
koyukuk:src ruser$ ifort -c -O3 -ip -no-prec-div -m64 -FI rd_grib2.f90 -I. -I./ngl/g2
koyukuk:WPS ruser$ cd ../../
koyukuk:WPS ruser$ ./compile


###########################################################
#ARCH Darwin serial, INTEL, ifort compiler, serial, NO GRIB2
#
COMPRESSION_LIBS =
COMPRESSION_INC =
FDEFS =
FC = ifort
SFC = ifort
FFLAGS = -O3 -xT -ip -no-prec-div -m64
F77FLAGS = -O3 -xT -ip -no-prec-div -m64
FNGFLAGS = $(FFLAGS)
LDFLAGS = -ip -Wl,-stack_addr,0xF10000000 -Wl,-stack_size,0x64000000
CC = icc
SCC = icc
CFLAGS = -O3 -xT -ip -no-prec-div -m64
CPP = /usr/bin/cpp -C -P -traditional
CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS
RANLIB = ranlib
###########################################################
#ARCH Darwin serial, INTEL, ifort compiler, serial
#
COMPRESSION_LIBS = -L/usr/local/lib -ljasper \
-L/usr/X11/lib -lpng12 -lpng -lz
COMPRESSION_INC = -I/usr/local/include -I/usr/X11/include
FC = ifort
SFC = ifort
FFLAGS = -O3 -xT -ip -no-prec-div -m64
F77FLAGS = -O3 -xT -ip -no-prec-div -m64
FNGFLAGS = $(FFLAGS)
LDFLAGS = -ip -Wl,-stack_addr,0xF10000000 -Wl,-stack_size,0x64000000
CC = icc
SCC = icc
CFLAGS = -O3 -xT -ip -no-prec-div -m64
CPP = /usr/bin/cpp -C -P -traditional
CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS
RANLIB = ranlib

##########################################################
kpvolz
 
Posts: 8
Joined: Mon May 18, 2009 7:21 pm

Re: rd_grib2 compile fails for WPS 3.1 MAC OS X 10.5 ifort i

Postby dingwell » Tue Jan 13, 2015 9:39 am

I ran into this same problem on a Linux system with Xeon processors and Intel compilers+MPI

When compiling with dmpar the same file fails to compile with the same error (additional other errors follow). Modifying the corresponding settings under:
Code: Select all
########################################################################################################################
#ARCH   Linux x86_64, IA64 and Opteron   # serial serial_NO_GRIB2 dmpar dmpar_NO_GRIB2
#
...

then running:
./clean
./configure
./compile
solves the issue.
Thank you kpvolz for posting the fix, it's still relevant.
dingwell
 
Posts: 7
Joined: Mon Jan 30, 2012 6:10 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest