ARWpost compilation error

Topics related to the ARWpost post-processor
Post Reply
Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

ARWpost compilation error

Post by Jayanti pal » Fri Nov 08, 2019 7:44 am

I have attached compile.log
Here below the details of configure file.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!configure.arwp!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# configure.arwp
#
# This file was automatically generated by the configure script in the
# top level directory. You may make changes to the settings in this
# file but be aware they will be overwritten each time you run configure.
# Ordinarily, it is necessary to run configure once, when the code is
# first installed.
#
# To permanently change options, change the settings for your platform
# in the file arch/configure.defaults, the preamble, and the postamble -
# then rerun configure.
#

.SUFFIXES: .F90 .f90 .F .f .c .o

SHELL = /bin/sh

# Listing of options that are usually independent of machine type.
# When necessary, these are over-ridden by each architecture.

ARFLAGS =

PERL = perl

RANLIB = echo

#### Architecture specific settings ####

# Settings for PC Linux i486 i586 i686 x86_64, gfortran compiler
#
FC = gfortran
FFLAGS = -ffree-form -O -fno-second-underscore -fconvert=big-endian -frecord-marker=4
F77FLAGS = -ffixed-form -O -fno-second-underscore -fconvert=big-endian
FNGFLAGS = $(FFLAGS)
LDFLAGS =
CC = gcc
CFLAGS = -m64
CPP = /lib/cpp -C -P -traditional
CPPFLAGS = -DIO_NETCDF -DIO_GRIB1 -DIO_BINARY -DRECL4 -Dbytesw

###########################################################
#
# Macros, these should be generic for all machines

LN = ln -sf
MAKE = make -i -r
RM = /bin/rm -f
CP = /bin/cp
AR = ar ru


.IGNORE:
.SUFFIXES: .c .f90 .F90 .f .F .o

# There is probably no reason to modify these rules

.c.o:
$(RM) $@
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<

.f90.o:
$(RM) $@ $*.mod
$(CP) $< $*.f
$(FC) $(FFLAGS) -I${NETCDF}/include -c $*.f
$(RM) $*.f

.F90.o:
$(RM) $@ $*.mod
$(CPP) $(CPPFLAGS) $(FDEFS) $< > $*.f
$(FC) $(FFLAGS) -I${NETCDF}/include -c $*.f
$(RM) $*.f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I cannot attach configure.arwp. its show invalid extention.
I have compiled WRF version 4 and ARWpost version 3.
I am unable to compile ARWpost.
Attachments
log.compile
(20 KiB) Downloaded 56 times

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ARWpost compilation error

Post by kwerner » Fri Nov 08, 2019 7:43 pm

Hi,

1) Did you make any modifications to the ARWpost files, or is it "out of the box" code?
2) Which version of ARWpost are you using?
3) Which compiler, and which version of that compiler are you using?

Thanks for letting me know about the *.arwp extension. I added that extension to the list that should be allowed, so you should be able to attach that file now. In the future, if you ever get that error, please let us know again so that we can add the new extension, but in the meantime, and alternative is to just add ".txt" to the end of your file name, and the forum should allow you to attach that.
NCAR/MMM

jayantipal
Posts: 9
Joined: Thu Jan 03, 2019 11:39 am

Re: ARWpost compilation error

Post by jayantipal » Sat Nov 09, 2019 3:58 am

I have usee ARWpost version 3. after untar the file

$cd ARWpost
$./configure

then i got this configure.arwp file.
My compiler is gfortran

while compilation I got error that I have attached before.
(log.compile)

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ARWpost compilation error

Post by kwerner » Wed Nov 13, 2019 6:31 pm

Hi,

1) Are you using ARWpost Version 3.0 or Version 3.1?
2) Can you please tell me which version of gfortran you are using. If you type

Code: Select all

gfortran --version
that should tell you.
NCAR/MMM

Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

Re: ARWpost compilation error

Post by Jayanti pal » Thu Nov 14, 2019 7:21 am

Gfortran version

GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.

And ARWpost is 3.1 version

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ARWpost compilation error

Post by kwerner » Fri Nov 15, 2019 8:54 pm

Thanks!
Can you try the following:
1) Clean your code (./clean -a)
2) Reconfigure
3) Look for the following line in your configure.arwp file:

Code: Select all

CPP = /lib/cpp -C -P -traditional
Change it to:

Code: Select all

CPP = /lib/cpp -P -traditional
Then save the file
4) Recompile

If that doesn't work, then follow the same above steps, but try changing the line to:

Code: Select all

CPP = /lib/cpp -C -P -nostdinc
Let me know if either of those fixes help. Thanks.
NCAR/MMM

Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

Re: ARWpost compilation error

Post by Jayanti pal » Mon Nov 25, 2019 5:38 am

Thank you for replay.
I have tried both option but none works. I have attched the 3 log file
1. log.compile1-without any change
2. log.compile2- CPP = /lib/cpp -C -P -traditional to CPP = /lib/cpp -P -traditional
3. log.compile3- CPP = /lib/cpp -C -P -traditional to CPP = /lib/cpp -C -P -nostdinc

also attached the configure file in .txt file

Thank you

Jayanti pal
Attachments
compile3.log
(18.01 KiB) Downloaded 38 times
compile2.log
(16.67 KiB) Downloaded 33 times
compile1.log
(26.61 KiB) Downloaded 47 times
configure.txt
(1.71 KiB) Downloaded 40 times

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ARWpost compilation error

Post by kwerner » Mon Nov 25, 2019 6:16 pm

Jayanti,
It looks like the fix I suggested actually did work to get your past the initial problem. The "copyright" error is no longer evident. The problem now seems to be with your NetCDF.

1) If you issue the command:

Code: Select all

echo $NETCDF
do you get a path?

2) If so, is the path to that particular version of NetCDF, the same NetCDF that was used to install your current version of gfortran that you are using to build ARWpost?
NCAR/MMM

Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

Re: ARWpost compilation error

Post by Jayanti pal » Tue Nov 26, 2019 5:02 am

jayanti@jayanti-HP-ProDesk-600-G3-MT:~$ echo $NETCDF
/home/jayanti/WRF/Build_WRF/LIBRARIES/netcdf
jayanti@jayanti-HP-ProDesk-600-G3-MT:~$ nc-config --version
netCDF 4.1.3
jayanti@jayanti-HP-ProDesk-600-G3-MT:~$ gfortran --version
GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

jayanti@jayanti-HP-ProDesk-600-G3-MT:~$ which gfortran
/usr/bin/gfortran

Path and version of netcdf and gfortran is given above. the path of netcdf is set in bash file.
how to know whether this netcdf is the same NetCDF that was used to install your current version of gfortran that you are using to build ARWpost?

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ARWpost compilation error

Post by kwerner » Mon Dec 02, 2019 9:16 pm

Hi,
I asked that question backwards. What I meant was:
Was NetCDF built with the same version of GNU that you are now using to build ARWpost?

There really isn't a simple way to determine this, but if you happened to just build NetCDF right before trying to build ARWpost, it's highly likely they are the same version. If not, and if you are using a system at your institution, it could be that the version of GNU has been updated since NetCDF was built. If you aren't sure, I would recommend trying to rebuild NetCDF with the current GNU, and then try to build ARWpost right after, to ensure they are both using the same version of GNU.
NCAR/MMM

Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

Re: ARWpost compilation error

Post by Jayanti pal » Fri Dec 06, 2019 9:44 am

I have done this but it is still not working

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ARWpost compilation error

Post by kwerner » Fri Dec 06, 2019 4:51 pm

When you did that, did you get the same type of errors? Can you send the latest compile log (when you ensured your netCDF and ARWpost were built with the same version of GNU)? Please also send the latest configure.wrf again. I just want to make sure I'm looking at the correct ones, since I have several copies of these now. Thanks!
NCAR/MMM

Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

Re: ARWpost compilation error

Post by Jayanti pal » Mon Dec 09, 2019 6:40 am

I get the same error
Attachments
configure.txt
(1.71 KiB) Downloaded 35 times
compile.log
(27.23 KiB) Downloaded 38 times

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ARWpost compilation error

Post by kwerner » Mon Dec 09, 2019 5:53 pm

Hi,

I am again seeing the "Copyright" error that you initially had. You were able to get rid of that error by modifying your configure.wrf file to use the line:

Code: Select all

CPP   =   /lib/cpp -C -P -nostdinc
Can you use that again, so that you can get pas this error, and then ensure that you are using the correct NetCDF, and attach that new configure.wrf file, and compile log? Thanks.
NCAR/MMM

jayantipal
Posts: 9
Joined: Thu Jan 03, 2019 11:39 am

Re: ARWpost compilation error

Post by jayantipal » Tue Dec 10, 2019 3:17 am

Thank you for your reply. I have sorted out this problem. Now Arw is compiled.

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ARWpost compilation error

Post by kwerner » Wed Dec 11, 2019 5:56 pm

That's great news! Can you let me know what the fix was? It may help users in the future with a similar problem. Thanks!
NCAR/MMM

panduka
Posts: 1
Joined: Sat Jan 11, 2020 12:05 am

Re: ARWpost compilation error

Post by panduka » Sat Jan 11, 2020 12:07 am

Jayanpati, howcould you solve this ? I have exact problem

youstorm
Posts: 1
Joined: Fri May 22, 2020 4:10 am

Re: ARWpost compilation error

Post by youstorm » Fri May 22, 2020 4:18 am

I had a similar, or the same problem on Ubuntu. This is what worked for me.
./clean -a
./configure
3 for gfortran option
Now I needed to edit this Makefile
cd src
edit the Makefile to make the line below exactly as written (netcdff before netcdf)
-L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdff -lnetcdf

Now edit configure.arwp and remove the -C so that the line below is as such
CPP = /lib/cpp -P -traditional

Now compile
worked for me.

Jayanti pal
Posts: 64
Joined: Mon Nov 04, 2019 8:29 am

Re: ARWpost compilation error

Post by Jayanti pal » Sat Jan 30, 2021 6:23 am

Sorry for the late reply. In my system, I follow the same as mentio


edit the Makefile to make the line below exactly as written (netcdff before netcdf)
-L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdff -lnetcdf

Now edit configure.arwp and remove the -C so that the line below is as such
CPP = /lib/cpp -P -traditionaln

it has worked for me also
Thanks

Post Reply

Return to “ARWpost”