[Met_help] [rt.rap.ucar.edu #83362] History for Compiling MET v6.1

John Halley Gotway via RT met_help at ucar.edu
Wed Jul 10 16:59:45 MDT 2019


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Greetings,

I am a new user and am trying to install MET v6.1 on:

CentOS 7.xx
Linux clusterhn.cluster.com 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4
15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I am using the Intel compilers: parallel_studio_xe_2018

I have installed the prerequesites using the Intel compilers (Netcdf, hdf5):

GNU Scientific Library (GSL) v2.4

BUFRLIB v10.2.3
icc -c -DUNDERSCORE *.c
ifort -c -DUNDERSCORE *.f *.F
mkdir /opt/software/libbufr/
ar crv libbufr.a *.o
cp libbufr.a /opt/software/libbufr/

MET v6.1:
export MET_NETCDF=/opt/software/netcdf/netcdf_v4.5.0
export MET_HDF5=/opt/software/hdf5/hdf5_v1.10.1
export MET_BUFRLIB=/opt/software/libbufr
export MET_GSL=/opt/software/gsl/gsl_v2.4
export
LD_LIBRARY_PATH=/opt/software/netcdf/netcdf_v4.5.0/lib:/opt/software/gsl/gsl_v2.4/lib:/opt/software/libbufr:${LD_LIBRARY_PATH}

This compiles fine:
./configure --prefix=/opt/software/met/met-6.1/ --disable-pb2nc

But, the make test fails:

DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
observation fields.
DEBUG 1: Creating Fcst-Obs Object Statistics file:
../out/mode/mode_120000L_20050807_120000V_120000A_obj.txt
DEBUG 1: Creating Contingency Table Statistics file:
../out/mode/mode_120000L_20050807_120000V_120000A_cts.txt
DEBUG 1: Creating Object NetCDF file:
../out/mode/mode_120000L_20050807_120000V_120000A_obj.nc
terminate called after throwing an instance of
'netCDF::exceptions::NcException'
  what():  NetCDF: Attempt to define fill value when data already exists.
file: ncVar.cpp  line:308
make[1]: *** [mode] Aborted (core dumped)
make[1]: Leaving directory `/home/scapps/install/met-6.1/scripts'
make: *** [test] Error 2


If I try this:
./configure --prefix=/opt/software/met/met-6.1/
It does not compile: see make_install.log (attached)


Any help is appreciated.

-- 
*Scott Capps*
Principal
Atmospheric Data Solutions <http://www.atmosphericdatasolutions.com>
scapps at atmosdatasolutions.com
cell: (949) 910-4385


----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: Compiling MET v6.1
From: Howard Soh
Time: Wed Dec 20 12:13:28 2017

Hi Scott.
Unfortunately, most of our met_help staff is out this week and next, 
so
our response time will be delayed.

1. Error with make test

We did not test MET 6.1 with NetCDF 4.5. The handling _FillValue
attribute on NetcDF4.5 seems to be changed. I recommend to compile MET
6.1 with NetCDF 4.4.x & NetCDF C++ 4.3. If you are comfortable on
changing MET source code, I can give you instructions.

2. pb2nc (BUFR library.)
The problem seems to be the compiler. The BUFR library was compiled
with
Intel and MET is compiled with GNU (gfortran). They have to be
compiled
with the same compiler.

Cheers,
Howard


On 12/19/2017 6:22 PM, Scott Capps via RT wrote:
> Tue Dec 19 18:22:04 2017: Request 83362 was acted upon.
> Transaction: Ticket created by scapps at atmosdatasolutions.com
>         Queue: met_help
>       Subject: Compiling MET v6.1
>         Owner: Nobody
>    Requestors: scapps at atmosdatasolutions.com
>        Status: new
>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83362 >
>
>
> Greetings,
>
> I am a new user and am trying to install MET v6.1 on:
>
> CentOS 7.xx
> Linux clusterhn.cluster.com 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue
Jul 4
> 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>
> I am using the Intel compilers: parallel_studio_xe_2018
>
> I have installed the prerequesites using the Intel compilers
(Netcdf, hdf5):
>
> GNU Scientific Library (GSL) v2.4
>
> BUFRLIB v10.2.3
> icc -c -DUNDERSCORE *.c
> ifort -c -DUNDERSCORE *.f *.F
> mkdir /opt/software/libbufr/
> ar crv libbufr.a *.o
> cp libbufr.a /opt/software/libbufr/
>
> MET v6.1:
> export MET_NETCDF=/opt/software/netcdf/netcdf_v4.5.0
> export MET_HDF5=/opt/software/hdf5/hdf5_v1.10.1
> export MET_BUFRLIB=/opt/software/libbufr
> export MET_GSL=/opt/software/gsl/gsl_v2.4
> export
>
LD_LIBRARY_PATH=/opt/software/netcdf/netcdf_v4.5.0/lib:/opt/software/gsl/gsl_v2.4/lib:/opt/software/libbufr:${LD_LIBRARY_PATH}
>
> This compiles fine:
> ./configure --prefix=/opt/software/met/met-6.1/ --disable-pb2nc
>
> But, the make test fails:
>
> DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
> DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
> observation fields.
> DEBUG 1: Creating Fcst-Obs Object Statistics file:
> ../out/mode/mode_120000L_20050807_120000V_120000A_obj.txt
> DEBUG 1: Creating Contingency Table Statistics file:
> ../out/mode/mode_120000L_20050807_120000V_120000A_cts.txt
> DEBUG 1: Creating Object NetCDF file:
> ../out/mode/mode_120000L_20050807_120000V_120000A_obj.nc
> terminate called after throwing an instance of
> 'netCDF::exceptions::NcException'
>    what():  NetCDF: Attempt to define fill value when data already
exists.
> file: ncVar.cpp  line:308
> make[1]: *** [mode] Aborted (core dumped)
> make[1]: Leaving directory `/home/scapps/install/met-6.1/scripts'
> make: *** [test] Error 2
>
>
> If I try this:
> ./configure --prefix=/opt/software/met/met-6.1/
> It does not compile: see make_install.log (attached)
>
>
> Any help is appreciated.
>


------------------------------------------------
Subject: Compiling MET v6.1
From: Scott Capps
Time: Wed Dec 20 12:18:56 2017

Thank you.  My responses below in blue:

On Wed, Dec 20, 2017 at 11:13 AM, Howard Soh via RT
<met_help at ucar.edu>
wrote:

> Hi Scott.
> Unfortunately, most of our met_help staff is out this week and next,
so
> our response time will be delayed.
>
> 1. Error with make test
>
> We did not test MET 6.1 with NetCDF 4.5. The handling _FillValue
> attribute on NetcDF4.5 seems to be changed. I recommend to compile
MET
> 6.1 with NetCDF 4.4.x & NetCDF C++ 4.3. If you are comfortable on
> changing MET source code, I can give you instructions.
>
I can change MET source code if the change as rather straightforward.

>
> 2. pb2nc (BUFR library.)
> The problem seems to be the compiler. The BUFR library was compiled
with
> Intel and MET is compiled with GNU (gfortran). They have to be
compiled
> with the same compiler.
>
Yes.  I am wondering why MET is being compiled using the GNU compilers
as
my environment variables specify the Intel compilers:
export CC=icc
export FC=ifort
export F90=ifort
export CXX=icpc
export FC77=ifort
How do I force MET to be compiled using the Intel compilers?

>
> Cheers,
> Howard
>
>
> On 12/19/2017 6:22 PM, Scott Capps via RT wrote:
> > Tue Dec 19 18:22:04 2017: Request 83362 was acted upon.
> > Transaction: Ticket created by scapps at atmosdatasolutions.com
> >         Queue: met_help
> >       Subject: Compiling MET v6.1
> >         Owner: Nobody
> >    Requestors: scapps at atmosdatasolutions.com
> >        Status: new
> >   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83362 >
> >
> >
> > Greetings,
> >
> > I am a new user and am trying to install MET v6.1 on:
> >
> > CentOS 7.xx
> > Linux clusterhn.cluster.com 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue
Jul 4
> > 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> >
> > I am using the Intel compilers: parallel_studio_xe_2018
> >
> > I have installed the prerequesites using the Intel compilers
(Netcdf,
> hdf5):
> >
> > GNU Scientific Library (GSL) v2.4
> >
> > BUFRLIB v10.2.3
> > icc -c -DUNDERSCORE *.c
> > ifort -c -DUNDERSCORE *.f *.F
> > mkdir /opt/software/libbufr/
> > ar crv libbufr.a *.o
> > cp libbufr.a /opt/software/libbufr/
> >
> > MET v6.1:
> > export MET_NETCDF=/opt/software/netcdf/netcdf_v4.5.0
> > export MET_HDF5=/opt/software/hdf5/hdf5_v1.10.1
> > export MET_BUFRLIB=/opt/software/libbufr
> > export MET_GSL=/opt/software/gsl/gsl_v2.4
> > export
> > LD_LIBRARY_PATH=/opt/software/netcdf/netcdf_v4.5.0/lib:/opt/
> software/gsl/gsl_v2.4/lib:/opt/software/libbufr:${LD_LIBRARY_PATH}
> >
> > This compiles fine:
> > ./configure --prefix=/opt/software/met/met-6.1/ --disable-pb2nc
> >
> > But, the make test fails:
> >
> > DEBUG 2: Remaining: 7 forecast objects and 4 observation objects.
> > DEBUG 2: Performing matching (MERGE_BOTH) between the forecast and
> > observation fields.
> > DEBUG 1: Creating Fcst-Obs Object Statistics file:
> > ../out/mode/mode_120000L_20050807_120000V_120000A_obj.txt
> > DEBUG 1: Creating Contingency Table Statistics file:
> > ../out/mode/mode_120000L_20050807_120000V_120000A_cts.txt
> > DEBUG 1: Creating Object NetCDF file:
> > ../out/mode/mode_120000L_20050807_120000V_120000A_obj.nc
> > terminate called after throwing an instance of
> > 'netCDF::exceptions::NcException'
> >    what():  NetCDF: Attempt to define fill value when data already
> exists.
> > file: ncVar.cpp  line:308
> > make[1]: *** [mode] Aborted (core dumped)
> > make[1]: Leaving directory `/home/scapps/install/met-6.1/scripts'
> > make: *** [test] Error 2
> >
> >
> > If I try this:
> > ./configure --prefix=/opt/software/met/met-6.1/
> > It does not compile: see make_install.log (attached)
> >
> >
> > Any help is appreciated.
> >
>
>
>


--
*Scott Capps*
Principal
Atmospheric Data Solutions <http://www.atmosphericdatasolutions.com>
scapps at atmosdatasolutions.com
cell: (949) 910-4385

------------------------------------------------
Subject: Compiling MET v6.1
From: Howard Soh
Time: Wed Dec 20 12:54:29 2017

The filename:  src/tools/core/mode/mode_exec.cc

Please replace two blocks (the cause was _FillValue attribute can not
be
added once the data value is assigned):

Block 1: Line 901 to 909 (current code):

   if ( info.do_raw )         fcst_raw_var     = add_var(f_out,
"fcst_raw",     ncFloat, lat_dim, lon_dim, deflate_level);
   if ( info.do_object_raw )  fcst_obj_raw_var = add_var(f_out,
"fcst_obj_raw", ncFloat, lat_dim, lon_dim, deflate_level);
   if ( info.do_object_id )   fcst_obj_var     = add_var(f_out,
"fcst_obj_id",  ncInt,   lat_dim, lon_dim, deflate_level);
   if ( info.do_cluster_id )  fcst_clus_var    = add_var(f_out,
"fcst_clus_id", ncInt,   lat_dim, lon_dim, deflate_level);

   if ( info.do_raw )         obs_raw_var      = add_var(f_out,
"obs_raw",
   ncFloat, lat_dim, lon_dim, deflate_level);
   if ( info.do_object_raw )  obs_obj_raw_var  = add_var(f_out,
"obs_obj_raw", ncFloat, lat_dim, lon_dim, deflate_level);
   if ( info.do_object_id )   obs_obj_var      = add_var(f_out,
"obs_obj_id",  ncInt,   lat_dim, lon_dim, deflate_level);
   if ( info.do_cluster_id )  obs_clus_var     = add_var(f_out,
"obs_clus_id", ncInt,   lat_dim, lon_dim, deflate_level);


Block 2: Line 960 to 1024 (current code is not copied here)

The fix is moving "add_att" calls from block 2 to block 1.

The new content for block 1:

   if ( info.do_raw ) {
      fcst_raw_var     = add_var(f_out, "fcst_raw",     ncFloat,
lat_dim,
lon_dim, deflate_level);
      add_att(&fcst_raw_var, "long_name", "Forecast Raw Values");
      add_att(&fcst_raw_var, "_FillValue", bad_data_float);
   }
   if ( info.do_object_raw ) {
      fcst_obj_raw_var = add_var(f_out, "fcst_obj_raw", ncFloat,
lat_dim,
lon_dim, deflate_level);
      add_att(&fcst_obj_raw_var, "long_name", "Forecast Object Raw
Values");
      add_att(&fcst_obj_raw_var, "_FillValue", bad_data_float);
   }
   if ( info.do_object_id ) {
      fcst_obj_var     = add_var(f_out, "fcst_obj_id",  ncInt,
lat_dim,
lon_dim, deflate_level);
      add_att(&fcst_obj_var, "long_name", "Forecast Object ID");
      add_att(&fcst_obj_var, "_FillValue", bad_data_int);
   }
   if ( info.do_cluster_id ) {
      fcst_clus_var    = add_var(f_out, "fcst_clus_id", ncInt,
lat_dim,
lon_dim, deflate_level);
      add_att(&fcst_clus_var, "long_name", "Forecast Cluster Object
ID");
      add_att(&fcst_clus_var, "_FillValue", bad_data_int);
   }

   if ( info.do_raw ) {
      obs_raw_var      = add_var(f_out, "obs_raw",     ncFloat,
lat_dim,
lon_dim, deflate_level);
      add_att(&obs_raw_var, "long_name", "Observation Raw Values");
      add_att(&obs_raw_var, "_FillValue", bad_data_float);
   }
   if ( info.do_object_raw ) {
      obs_obj_raw_var  = add_var(f_out, "obs_obj_raw", ncFloat,
lat_dim,
lon_dim, deflate_level);
      add_att(&obs_obj_raw_var, "long_name", "Observation Object Raw
Values");
      add_att(&obs_obj_raw_var, "_FillValue", bad_data_float);
   }
   if ( info.do_object_id ) {
      obs_obj_var      = add_var(f_out, "obs_obj_id",  ncInt,
lat_dim,
lon_dim, deflate_level);
      add_att(&obs_obj_var, "long_name", "Observation Object ID");
      add_att(&obs_obj_var, "_FillValue", bad_data_int);
   }
   if ( info.do_cluster_id ) {
      obs_clus_var     = add_var(f_out, "obs_clus_id", ncInt,
lat_dim,
lon_dim, deflate_level);
      add_att(&obs_clus_var, "long_name", "Observation Cluster Object
ID");
      add_att(&obs_clus_var, "_FillValue", bad_data_int);
   }


The new content for block 2:

   if ( info.do_raw )  {
      write_netcdf_var_times(&fcst_raw_var, engine.fcst_raw->data);
   }

   if ( info.do_object_raw )  {
      write_netcdf_var_times(&fcst_obj_raw_var, engine.fcst_raw-
>data);
   }

   if ( info.do_object_id )  {
      write_netcdf_var_times(&fcst_obj_var, engine.fcst_raw->data);
   }

   if ( info.do_cluster_id )  {
      write_netcdf_var_times(&fcst_clus_var, engine.fcst_raw->data);
   }

   // Add observation variable attributes

   if ( info.do_raw )  {
      write_netcdf_var_times(&obs_raw_var, engine.obs_raw->data);
   }

   if ( info.do_object_raw )  {
      write_netcdf_var_times(&obs_obj_raw_var, engine.obs_raw->data);
   }

   if ( info.do_object_id )  {
      write_netcdf_var_times(&obs_obj_var, engine.obs_raw->data);
   }

   if ( info.do_cluster_id )  {
      write_netcdf_var_times(&obs_clus_var, engine.obs_raw->data);
   }

pb2nc (Compiler issue):

I'm sorry there was typo at the online tutorial, F77, not FC77.
Would you change "export FC77=ifort" to "export F77=ifort"?

- re-run ./configure command
- check Makefile
        grep "^CC =" Makefile
        grep "^CXX =" Makefile
        grep "^F77 =" Makefile

Cheers,
Howard


On Wed, Dec 20, 2017 at 12:18 PM, Scott Capps via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83362 >
>
> Thank you.  My responses below in blue:
>
> On Wed, Dec 20, 2017 at 11:13 AM, Howard Soh via RT
<met_help at ucar.edu>
> wrote:
>
> > Hi Scott.
> > Unfortunately, most of our met_help staff is out this week and
next,  so
> > our response time will be delayed.
> >
> > 1. Error with make test
> >
> > We did not test MET 6.1 with NetCDF 4.5. The handling _FillValue
> > attribute on NetcDF4.5 seems to be changed. I recommend to compile
MET
> > 6.1 with NetCDF 4.4.x & NetCDF C++ 4.3. If you are comfortable on
> > changing MET source code, I can give you instructions.
> >
> I can change MET source code if the change as rather
straightforward.
>
> >
> > 2. pb2nc (BUFR library.)
> > The problem seems to be the compiler. The BUFR library was
compiled with
> > Intel and MET is compiled with GNU (gfortran). They have to be
compiled
> > with the same compiler.
> >
> Yes.  I am wondering why MET is being compiled using the GNU
compilers as
> my environment variables specify the Intel compilers:
> export CC=icc
> export FC=ifort
> export F90=ifort
> export CXX=icpc
> export FC77=ifort
> How do I force MET to be compiled using the Intel compilers?
>
> >
> > Cheers,
> > Howard
> >
> >
> > On 12/19/2017 6:22 PM, Scott Capps via RT wrote:
> > > Tue Dec 19 18:22:04 2017: Request 83362 was acted upon.
> > > Transaction: Ticket created by scapps at atmosdatasolutions.com
> > >         Queue: met_help
> > >       Subject: Compiling MET v6.1
> > >         Owner: Nobody
> > >    Requestors: scapps at atmosdatasolutions.com
> > >        Status: new
> > >   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83362
> >
> > >
> > >
> > > Greetings,
> > >
> > > I am a new user and am trying to install MET v6.1 on:
> > >
> > > CentOS 7.xx
> > > Linux clusterhn.cluster.com 3.10.0-514.26.2.el7.x86_64 #1 SMP
Tue Jul
> 4
> > > 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> > >
> > > I am using the Intel compilers: parallel_studio_xe_2018
> > >
> > > I have installed the prerequesites using the Intel compilers
(Netcdf,
> > hdf5):
> > >
> > > GNU Scientific Library (GSL) v2.4
> > >
> > > BUFRLIB v10.2.3
> > > icc -c -DUNDERSCORE *.c
> > > ifort -c -DUNDERSCORE *.f *.F
> > > mkdir /opt/software/libbufr/
> > > ar crv libbufr.a *.o
> > > cp libbufr.a /opt/software/libbufr/
> > >
> > > MET v6.1:
> > > export MET_NETCDF=/opt/software/netcdf/netcdf_v4.5.0
> > > export MET_HDF5=/opt/software/hdf5/hdf5_v1.10.1
> > > export MET_BUFRLIB=/opt/software/libbufr
> > > export MET_GSL=/opt/software/gsl/gsl_v2.4
> > > export
> > > LD_LIBRARY_PATH=/opt/software/netcdf/netcdf_v4.5.0/lib:/opt/
> > software/gsl/gsl_v2.4/lib:/opt/software/libbufr:${LD_LIBRARY_PATH}
> > >
> > > This compiles fine:
> > > ./configure --prefix=/opt/software/met/met-6.1/ --disable-pb2nc
> > >
> > > But, the make test fails:
> > >
> > > DEBUG 2: Remaining: 7 forecast objects and 4 observation
objects.
> > > DEBUG 2: Performing matching (MERGE_BOTH) between the forecast
and
> > > observation fields.
> > > DEBUG 1: Creating Fcst-Obs Object Statistics file:
> > > ../out/mode/mode_120000L_20050807_120000V_120000A_obj.txt
> > > DEBUG 1: Creating Contingency Table Statistics file:
> > > ../out/mode/mode_120000L_20050807_120000V_120000A_cts.txt
> > > DEBUG 1: Creating Object NetCDF file:
> > > ../out/mode/mode_120000L_20050807_120000V_120000A_obj.nc
> > > terminate called after throwing an instance of
> > > 'netCDF::exceptions::NcException'
> > >    what():  NetCDF: Attempt to define fill value when data
already
> > exists.
> > > file: ncVar.cpp  line:308
> > > make[1]: *** [mode] Aborted (core dumped)
> > > make[1]: Leaving directory `/home/scapps/install/met-
6.1/scripts'
> > > make: *** [test] Error 2
> > >
> > >
> > > If I try this:
> > > ./configure --prefix=/opt/software/met/met-6.1/
> > > It does not compile: see make_install.log (attached)
> > >
> > >
> > > Any help is appreciated.
> > >
> >
> >
> >
>
>
> --
> *Scott Capps*
> Principal
> Atmospheric Data Solutions <http://www.atmosphericdatasolutions.com>
> scapps at atmosdatasolutions.com
> cell: (949) 910-4385
>
>

------------------------------------------------


More information about the Met_help mailing list