yyr / wrf_install

Download & build process of wrf model with all dependencies
GNU General Public License v3.0
36 stars 23 forks source link

Failed to build WRF #8

Closed wxguy closed 9 years ago

wxguy commented 9 years ago

Hi, First of all thank you for taking your time to write WRF install script. I have been trying to install WRF in the last few weeks manually and using automatic install script. However, your build script is failed to compile WRF as expected. There are lot of error messages, but listing only last few lines from terminal. My system is Ubuntu 14.04 and trying to install WRF using gcc & gfortran. Any lead from the below error message is appriciated.

Error: Invalid character in name at (1) Fatal Error: Error count reached limit of 25. make[1]: [../share/module_soil_pre.o] Error 1 (ignored) rm -f ../dyn_em/module_big_step_utilities_em.o /lib/cpp -C -P -I/home/sundar/wrf/gcc/WRFV3/inc -DEM_CORE=1 -DNMM_CORE=0 -DNMM_MAX_DIM=2600 -DCOAMPS_CORE=0 -DDA_CORE=0 -DEXP_CORE=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_SUBR -DWRF_USE_CLM -DNO_IEEE_MODULE -DNETCDF -DUSE_ALLOCATABLES -DGRIB1 -DINTIO -DLIMIT_ARGS -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=0 -I. -traditional ../dyn_em/module_big_step_utilities_em.F > ../dyn_em/module_big_step_utilities_em.bb /home/sundar/wrf/gcc/WRFV3/tools/standard.exe ../dyn_em/module_big_step_utilities_em.bb | /lib/cpp -C -P > ../dyn_em/module_big_step_utilities_em.f90 rm -f ../dyn_em/module_big_step_utilities_em.b ../dyn_em/module_big_step_utilities_em.bb gfortran -o ../dyn_em/module_big_step_utilities_em.o -c -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -I../dyn_em -I../dyn_nmm -I/home/sundar/wrf/gcc/WRFV3/external/esmf_time_f90 -I/home/sundar/wrf/gcc/WRFV3/main -I/home/sundar/wrf/gcc/WRFV3/external/io_netcdf -I/home/sundar/wrf/gcc/WRFV3/external/io_int -I/home/sundar/wrf/gcc/WRFV3/frame -I/home/sundar/wrf/gcc/WRFV3/share -I/home/sundar/wrf/gcc/WRFV3/phys -I/home/sundar/wrf/gcc/WRFV3/chem -I/home/sundar/wrf/gcc/WRFV3/inc -I/home/sundar/wrf/gcc/include ../dyn_em/module_big_step_utilities_em.f90 Warning: Nonexistent include directory "/home/sundar/wrf/gcc/WRFV3/chem" ../dyn_em/module_big_step_utilities_em.f90:1.1:

/* Copyright (C) 1991-2014 Free Software Foundation, Inc. 1 Error: Invalid character in name at (1) ../dyn_em/module_big_step_utilities_em.f90:2.3:

This file is part of the GNU C Library. 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:4.3:

The GNU C Library is free software; you can redistribute it and/or 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:4.39:

The GNU C Library is free software; you can redistribute it and/or 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:5.3:

modify it under the terms of the GNU Lesser General Public 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:6.3:

License as published by the Free Software Foundation; either 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:6.57:

License as published by the Free Software Foundation; either 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:7.3:

version 2.1 of the License, or (at your option) any later version. 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:9.3:

The GNU C Library is distributed in the hope that it will be useful, 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:10.3:

but WITHOUT ANY WARRANTY; without even the implied warranty of 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:10.29:

but WITHOUT ANY WARRANTY; without even the implied warranty of 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:11.3:

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:12.3:

Lesser General Public License for more details. 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:14.3:

You should have received a copy of the GNU Lesser General Public 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:15.3:

License along with the GNU C Library; if not, see 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:15.41:

License along with the GNU C Library; if not, see 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:16.4:

http://www.gnu.org/licenses/. */ 1 Error: Invalid character in name at (1) ../dyn_em/module_big_step_utilities_em.f90:17.1:

/* This header is separate from features.h so that the compiler can 1 Error: Invalid character in name at (1) ../dyn_em/module_big_step_utilities_em.f90:18.3:

include it implicitly at the start of every compilation. It must 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:19.3:

not itself include or any other header that includes 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:20.4:

because the implicit include comes before any feature 1 Error: Invalid character in name at (1) ../dyn_em/module_big_step_utilities_em.f90:21.3: test macros that may be defined in a source file before it first 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:22.3: explicitly includes a system header. GCC knows the name of this 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:23.3: header in order to preinclude it. */ 1 Error: Unclassifiable statement at (1) ../dyn_em/module_big_step_utilities_em.f90:24.1: /\* glibc's intent is to support the IEC 559 math functionality, real 1 Error: Invalid character in name at (1) Fatal Error: Error count reached limit of 25. make[1]: [../dyn_em/module_big_step_utilities_em.o] Error 1 (ignored) make[1]: **\* No rule to make target `/home/sundar/wrf/gcc/WRFV3/external/esmf_time_f90/module_utility.o', needed by`ndown_em.o'. Stop. make[1]: Leaving directory `/home/sundar/wrf/gcc/WRFV3/main' make: **\* [em_real] Error 2
wxguy commented 9 years ago

Can you update your emain address. I am unable to PM to you...

yyr commented 9 years ago

Hi, Thanks for trying out. Its been a while I built wrf. I like you to build components one by one instead all at once.

I updated my mail id in my profile. please send me your build log. Though I will only able to get back to you tomorrow evening(JST)

wxguy commented 9 years ago

Log file is attached..

On Mon, Oct 13, 2014 at 11:19 PM, Yagnesh Raghava Yakkala. < notifications@github.com> wrote:

Hi, Thanks for trying out. Its been a while I built wrf. I like you to build components one by one instead all at once.

I updated my mail id in my profile. please send your me build log. Though I will only able to get back to you tomorrow evening(JST)

— Reply to this email directly or view it on GitHub https://github.com/yyr/wrf_install/issues/8#issuecomment-58929114.

yyr commented 9 years ago

Hmm. I don't see it. :(, You can send it to my mail.

wxguy commented 9 years ago

This link may give you some way ahead.. http://forum.wrfforum.com/viewtopic.php?f=5&t=7099

wxguy commented 9 years ago

Another link to take note on installing WRF. http://www.ben-rush.net/blog/?p=12

yyr commented 9 years ago

I tested current master with gcc on debian (64 bit) which built WRF 3.6.1 without a hiccup. Infact, I thought earlier version was not bad at all.

Any way, Now user interface been improved (prettified) mostly with error checking. I suggest you to try new version.

I had sucessfully built WRF with single command ./build_dep.sh all

If you have still a problem with build, create a new issue with proper build log.

wxguy commented 9 years ago

Hi, Sorry to open the issue again. I have tried in both manual and with "all" option. But in both the cases WPS not installed properly as ungrib.exe is not generated. While looking at the other issue posted here, there seems to be the problem of instaaling "libpng". So I tried to installed the libpng using "buildapp" script. But here is what I get the result:-

checking for /home/sundar/wrf/gcczlibVersion in -lz... no configure: error: zlib not installed make: * No rule to make target `clean'. Stop. make: ** No targets specified and no makefile found. Stop. make: No rule to make targetcheck'. Stop. make: **\* No rule to make targetinstall'. Stop.

But the above error is completely wrong as Installed the "zlib" before "libpng" and it was installed correctly. You can see it below:-

inflate with dictionary: hello, hello! * zlib 64-bit test OK * cp libz.a /home/sundar/wrf/gcc/lib chmod 644 /home/sundar/wrf/gcc/lib/libz.a cp libz.so.1.2.8 /home/sundar/wrf/gcc/lib chmod 755 /home/sundar/wrf/gcc/lib/libz.so.1.2.8 cp zlib.3 /home/sundar/wrf/gcc/share/man/man3 chmod 644 /home/sundar/wrf/gcc/share/man/man3/zlib.3 cp zlib.pc /home/sundar/wrf/gcc/lib/pkgconfig chmod 644 /home/sundar/wrf/gcc/lib/pkgconfig/zlib.pc cp zlib.h zconf.h /home/sundar/wrf/gcc/include chmod 644 /home/sundar/wrf/gcc/include/zlib.h /home/sundar/wrf/gcc/include/zconf.h

Another addition note on the usage of "buildapp" script, it does not show the list to build "LIBPNG". See it from the output of terminal. However, typing "./build_app.sh LIBPNG" works fine.

There seems to be issue with installing "libpng" or it is searching for "zlib" in wrong place. Output of "ldconfig -v | grep libpng" is below:-

sundar@sundar-Laptop:~/wrf_install$ sudo ldconfig -v | grep libpng [sudo] password for sundar: /sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory /sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory /sbin/ldconfig.real: Path /lib/x86_64-linux-gnu' given more than once /sbin/ldconfig.real: Path/usr/lib/x86_64-linux-gnu' given more than once /sbin/ldconfig.real: /lib/i386-linux-gnu/ld-2.19.so is the dynamic linker, ignoring

libpng12.so.0 -> libpng12.so.0.50.0

/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.19.so is the dynamic linker, ignoring

libpng12.so.0 -> libpng12.so.0.50.0

/sbin/ldconfig.real: /lib32/ld-2.19.so is the dynamic linker, ignoring

/sbin/ldconfig.real: /lib/ld-lsb.so.3 is the dynamic linker, ignoring

sundar@sundar-Laptop:~/wrf_install$

yyr commented 9 years ago

how about WRF, did that go well?

LIBPNG is optional dependency. WPS doesn't even need LIBPNG. Also please post your log file in WPS directory. (or send it by email.)

sundar@sundar-Laptop:~/wrf_install$ sudo ldconfig -v | grep libpng

The all dependencies will be installed in "~/wrf/gcc". see lib, share, include folders in that direcory. This script doesn't look at libraries installed by system package mangager. That is because, we don't want to deal with problems caused inconsistancies system module.

Anyway, If WRF is successfully built, build WPS should be a breeze.

wxguy commented 9 years ago

I have sent the log file to your PM. WRF seems to built correctly. I could see the all required *.exe files

sundar@sundar-Laptop:~/wrf/gcc/WRFV3$ ls -ls test/em_real/*.exe
0 lrwxrwxrwx 1 sundar sundar 20 Oct 16 17:43 test/em_real/ndown.exe -> ../../main/ndown.exe
0 lrwxrwxrwx 1 sundar sundar 18 Oct 16 17:43 test/em_real/nup.exe -> ../../main/nup.exe
0 lrwxrwxrwx 1 sundar sundar 19 Oct 16 17:43 test/em_real/real.exe -> ../../main/real.exe
0 lrwxrwxrwx 1 sundar sundar 17 Oct 16 17:43 test/em_real/tc.exe -> ../../main/tc.exe
0 lrwxrwxrwx 1 sundar sundar 18 Oct 16 17:43 test/em_real/wrf.exe -> ../../main/wrf.exe

Here are the *.exe available under WPS directory after compile/install:-

sundar@sundar-Laptop:~/wrf/gcc/WPS$ ls -lR | grep ".exe"
lrwxrwxrwx 1 sundar sundar   15 Oct 16 17:44 g1print.exe -> src/g1print.exe
-rwxrwxr-x 1 sundar sundar 108030 Oct 16 17:44 g1print.exe
lrwxrwxrwx 1 sundar sundar   16 Oct 16 17:44 avg_tsfc.exe -> src/avg_tsfc.exe
lrwxrwxrwx 1 sundar sundar   20 Oct 16 17:44 calc_ecmwf_p.exe -> src/calc_ecmwf_p.exe
lrwxrwxrwx 1 sundar sundar   25 Oct 16 17:44 g1print.exe -> ../ungrib/src/g1print.exe
lrwxrwxrwx 1 sundar sundar   19 Oct 16 17:44 height_ukmo.exe -> src/height_ukmo.exe
lrwxrwxrwx 1 sundar sundar   14 Oct 16 17:44 int2nc.exe -> src/int2nc.exe
lrwxrwxrwx 1 sundar sundar   16 Oct 16 17:44 mod_levs.exe -> src/mod_levs.exe
lrwxrwxrwx 1 sundar sundar   23 Oct 16 17:44 rd_intermediate.exe -> src/rd_intermediate.exe
-rwxrwxr-x 1 sundar sundar 100857 Oct 16 17:44 avg_tsfc.exe
-rwxrwxr-x 1 sundar sundar 122244 Oct 16 17:44 calc_ecmwf_p.exe
-rwxrwxr-x 1 sundar sundar 104956 Oct 16 17:44 height_ukmo.exe
-rwxrwxr-x 1 sundar sundar  49948 Oct 16 17:44 int2nc.exe
-rwxrwxr-x 1 sundar sundar  58242 Oct 16 17:44 mod_levs.exe
-rwxrwxr-x 1 sundar sundar  53336 Oct 16 17:44 rd_intermediate.exe
sundar@sundar-Laptop:~/wrf/gcc/WPS$ 

The main ".exe" files geogrid.exe and metgrid.exe are missing. Here is the text from ARW official guide:-

If geogrid.exe and metgrid.exe executables are missing, the path to the built WRFV3 directory structure is probably incorrect (found inside the configure.wps file) If the ungrib.exe is missing, the Grib2 libraries are probably not linked or built correctly If the plotfmt.exe or the plotgrids.exe programs is missing, the NCAR Graphics path is probably set incorrectly

Any idea?

yyr commented 9 years ago

Hello Sundar,

From your wps log file there are some errors,

gfortran: error: /home/sundar/wrf/gcc/WPS/../WRFV3/frame/module_driver_constants.o: No such file or directory gfortran: error: /home/sundar/wrf/gcc/WPS/../WRFV3/frame/module_machine.o: No such file or directory make[1]: [geogrid.exe] Error 1 (ignored)

and,

gfortran: error: /home/sundar/wrf/gcc/WPS/../WRFV3/frame/module_driver_constants.o: No such file or directory gfortran: error: /home/sundar/wrf/gcc/WPS/../WRFV3/frame/module_machine.o: No such file or directory make[1]: [metgrid.exe] Error 1 (ignored)

and also some errors with LIBPNG, Seems your wrf hasn't built properly. please send me you configure.wrf and log file of the wrf built.

I also suggest you to change the following manually before wrf built. (wrf_install waits for you to edit configure.wrf)

LIBINCLUDE      =       .

to

LIBINCLUDE      =       .:/home/sunder/wrf/gcc/include

and continue building wrf.

Finally always search for "error" or "fatal" keywords in the log file to see problems that are occured in building..

VENKAT873 commented 6 years ago

Hello All,

I am fairly new to the use of WRF. When I am trying to compile WPS, I am also getting the same error, as you have discussed above. Could you please help me to resolve the issue. mail id: grao9493@gmail.com