Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(RESOLVED) No ungrib.exe compiled: cannot open source file "jasper/jasper.h"

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

h_goldfish

New member
Hi, everyone!
I am installing WRFV4.0.1. And I compiled successfully.
But when I compiled WPSV4.0.1, I only got geogrid.exe and metgird.exe except ungirb.exe.
I have checked the compile.log and the error were as follows:
Thanks all of you for considering my problem.

Regards,
Claire



/bin/rm -f jpcunpack.f90
icc -c -w -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -DBIT32 -D_MPI -I/usr/include -DUSE_JPEG2000 -DUSE_PNG -D__64BIT__ enc_jpeg2000.c
enc_jpeg2000.c(5): catastrophic error: cannot open source file "jasper/jasper.h"
#include "jasper/jasper.h"
^

make[2]: [enc_jpeg2000.o] Error 4 (ignored)
icc -c -w -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -DBIT32 -D_MPI -I/usr/include -DUSE_JPEG2000 -DUSE_PNG -D__64BIT__ dec_jpeg2000.c
dec_jpeg2000.c(5): catastrophic error: cannot open source file "jasper/jasper.h"
#include "jasper/jasper.h"
^

make[2]: [dec_jpeg2000.o] Error 4 (ignored)
 
Hi

I am having a similar problem. The problem, I think (looking at my compile.log and yours) is with locating NETCDF dependencies(JASPER(in your) or libpng(in my case)). Hoping this is the problem(may not be!), I would really appreciate if someone can point us where this can be changed in the configure.WRF or configure.WPS file. It is a problem that many people are facing.

thanks
Netsanet
 
@h_goldfish Can you attach your 'configure.wps' file? When you ran the WPS's configure script, did you have the environment variables JASPERLIB and JASPERINC set to the library and include paths, respectively, where you've installed the JasPer, PNG, and zlib libraries?
 
Hi

Trying and error gives me solution. I can now generate ungrib.exe.
This is what I did.
Go to WPS
./clean -a
./configure
In the configure.wps file, there is a line with:
COMPRESSION_LIBS = -L/usr/common/software/jasper/1.900.1/hsw/intel/lib -ljasper -lpng -lz

I gave explicitly the paths for libpng and zlib. So the corrected one is

COMPRESSION_LIBS = -L/usr/common/software/jasper/1.900.1/hsw/intel/lib -ljasper -L/usr/common/software/png/1.6.18/hsw/intel/lib -lpng -L/global/common/sw/cray/cnl6/haswell/zlib/1.2.11/intel/18.0.1.163/hs4uyxq/lib -lz

./compile

It could be a solution.
good luck
Netsanet
 
hello everyone,
i want to ask a question, is this necessary to built (libpng,jasper,and zlib ) in a same directory according to the tutorial,
if no then how to set the environment of of libpng and zlib .

please respond
 
Dear Netkasal

Thank you for your valuable suggestions, its works

netkasal said:
COMPRESSION_LIBS = -L/usr/common/software/jasper/1.900.1/hsw/intel/lib -ljasper -L/usr/common/software/png/1.6.18/hsw/intel/lib -lpng -L/global/common/sw/cray/cnl6/haswell/zlib/1.2.11/intel/18.0.1.163/hs4uyxq/lib -lz

Netsanet
 
Hi deva_wrf,

Perhaps you could update the other 2 locations in this forum where you posted a question regarding this problem (either deleting those, or letting people know that you solved it, and linking them here). It would be helpful to any other users who may stumble across those posts, but not this one. Thanks!
 
Top