[Met_help] [rt.rap.ucar.edu #62302] History for Error compiling MET on a Linux cluster

John Halley Gotway via RT met_help at ucar.edu
Thu Jul 18 13:49:18 MDT 2013


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

Dear MET Help

Hi. I was compiling MET on a Linux cluster computer using gcc and gfortran
compilers when I got an error (please see at the bottom).

Error occurred with a message: " /usr/bin/ld: cannot find -lm "
I think I followed every direction on the users guide, I did see any part
for the library m. I don't know where the lm (probably libm.so) should be
located on the cluster system.

here is a part of my environment variable setting:

export BUFRLIB=/home/rmawalagedara/local/BUFRLIB
export GSL=/home/rmawalagedara/local/gsl-1.15
export WRFIO_NCD_LARGE_FILE_SUPPORT=1
export
PATH=$PATH:$NETCDF:$NETCDF/bin:$NETCDF/include:$NETCDF/lib:$GSL:$GSL/bin:$GSL/include:$GSL/lib
export WRF_DIR=/home/rmawalagedara/WRFV3.5/WRFV3
export
LD_LIBRARY_PATH=/home/jyoo/local/netcdf-4.1.1/lib:/opt/openmpi/lib:$GSL/lib


The paths to BUFRLIB, GSL, and NETCDF in my environment variable setting
are the same as in the user_defs.mk.

Any comment will be very helpful.
Thank you.

Best,


Jinwoong Yoo






*** Finished Making the vx_tc_util Library ***



/usr/bin/g++ ensemble_stat_conf_info.cc -Wall -Wshadow -static  -DBLOCK4 -c
-I/home/rmawalagedara/WRFV3.5/METv4.1/include
-I/home/rmawalagedara/local/gsl-1.15/include
-I/home/jyoo/local/netcdf-4.1.1/include
/usr/bin/g++ -o ensemble_stat ensemble_stat.cc ensemble_stat_conf_info.o \
-Wall -Wshadow -static  -DBLOCK4
-DMET_BASE=\"/home/rmawalagedara/WRFV3.5/METv4.1\" \
-I/home/rmawalagedara/WRFV3.5/METv4.1/include
-I/home/jyoo/local/netcdf-4.1.1/include
-I/home/rmawalagedara/local/gsl-1.15/include  \
-L/home/rmawalagedara/WRFV3.5/METv4.1/lib
-L/home/jyoo/local/netcdf-4.1.1/lib
-L/home/rmawalagedara/local/gsl-1.15/lib  \
-lvx_stat_out \
-lvx_statistics \
-lvx_shapedata \
-lvx_gsl_prob \
-lvx_analysis_util \
-lvx_data2d_factory \
-lvx_data2d_nc_met \
-lvx_data2d_grib  \
-lvx_data2d_nc_pinterp \
-lvx_data2d_nccf \
-lvx_data2d \
-lvx_nc_util \
-lvx_grid \
-lvx_config \
-lvx_cal \
-lvx_util \
-lvx_math \
-lvx_color \
-lvx_log \
-lm -lnetcdf_c++ -lnetcdf -lgsl -lgslcblas \
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
make[4]: *** [ensemble_stat] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2


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

Subject: Re: [rt.rap.ucar.edu #62302] Error compiling MET on a Linux cluster
From: John Halley Gotway
Time: Thu Jul 18 12:56:55 2013

Jinwoong,

We've had this issue come up with some other users in the past.  By
default, MET does static linking - meaning that it links in the
library files on which it depends at compile time.  The other type
of linking is call dynamic linking - for which the library files on
which it depends are linked in at runtime.

Other users have had success compiling MET with dynamic linking
instead.  Open up and edit the top-level user_defs.mk file, by
commenting out or removing references to "-static".  They show up on
the
CXX_FLAGS and FC_FLAGS lines.

Then try recompiling MET, being sure to execute a "make clean" first.

Please give that a shot and let me know how it goes.

Thanks,
John

On 07/18/2013 12:24 PM, Jinwoong Yoo via RT wrote:
>
> Thu Jul 18 12:24:58 2013: Request 62302 was acted upon.
> Transaction: Ticket created by jinwoong.yoo at gmail.com
>         Queue: met_help
>       Subject: Error compiling MET on a Linux cluster
>         Owner: Nobody
>    Requestors: jinwoong.yoo at gmail.com
>        Status: new
>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=62302 >
>
>
> Dear MET Help
>
> Hi. I was compiling MET on a Linux cluster computer using gcc and
gfortran
> compilers when I got an error (please see at the bottom).
>
> Error occurred with a message: " /usr/bin/ld: cannot find -lm "
> I think I followed every direction on the users guide, I did see any
part
> for the library m. I don't know where the lm (probably libm.so)
should be
> located on the cluster system.
>
> here is a part of my environment variable setting:
>
> export BUFRLIB=/home/rmawalagedara/local/BUFRLIB
> export GSL=/home/rmawalagedara/local/gsl-1.15
> export WRFIO_NCD_LARGE_FILE_SUPPORT=1
> export
>
PATH=$PATH:$NETCDF:$NETCDF/bin:$NETCDF/include:$NETCDF/lib:$GSL:$GSL/bin:$GSL/include:$GSL/lib
> export WRF_DIR=/home/rmawalagedara/WRFV3.5/WRFV3
> export
> LD_LIBRARY_PATH=/home/jyoo/local/netcdf-
4.1.1/lib:/opt/openmpi/lib:$GSL/lib
>
>
> The paths to BUFRLIB, GSL, and NETCDF in my environment variable
setting
> are the same as in the user_defs.mk.
>
> Any comment will be very helpful.
> Thank you.
>
> Best,
>
>
> Jinwoong Yoo
>
>
>
>
>
>
> *** Finished Making the vx_tc_util Library ***
>
>
>
> /usr/bin/g++ ensemble_stat_conf_info.cc -Wall -Wshadow -static
-DBLOCK4 -c
> -I/home/rmawalagedara/WRFV3.5/METv4.1/include
> -I/home/rmawalagedara/local/gsl-1.15/include
> -I/home/jyoo/local/netcdf-4.1.1/include
> /usr/bin/g++ -o ensemble_stat ensemble_stat.cc
ensemble_stat_conf_info.o \
> -Wall -Wshadow -static  -DBLOCK4
> -DMET_BASE=\"/home/rmawalagedara/WRFV3.5/METv4.1\" \
> -I/home/rmawalagedara/WRFV3.5/METv4.1/include
> -I/home/jyoo/local/netcdf-4.1.1/include
> -I/home/rmawalagedara/local/gsl-1.15/include  \
> -L/home/rmawalagedara/WRFV3.5/METv4.1/lib
> -L/home/jyoo/local/netcdf-4.1.1/lib
> -L/home/rmawalagedara/local/gsl-1.15/lib  \
> -lvx_stat_out \
> -lvx_statistics \
> -lvx_shapedata \
> -lvx_gsl_prob \
> -lvx_analysis_util \
> -lvx_data2d_factory \
> -lvx_data2d_nc_met \
> -lvx_data2d_grib  \
> -lvx_data2d_nc_pinterp \
> -lvx_data2d_nccf \
> -lvx_data2d \
> -lvx_nc_util \
> -lvx_grid \
> -lvx_config \
> -lvx_cal \
> -lvx_util \
> -lvx_math \
> -lvx_color \
> -lvx_log \
> -lm -lnetcdf_c++ -lnetcdf -lgsl -lgslcblas \
> /usr/bin/ld: cannot find -lm
> collect2: ld returned 1 exit status
> make[4]: *** [ensemble_stat] Error 1
> make[3]: *** [all] Error 2
> make[2]: *** [all] Error 2
> make[1]: *** [all] Error 2
> make: *** [all] Error 2
>

------------------------------------------------
Subject: Error compiling MET on a Linux cluster
From: Jinwoong Yoo
Time: Thu Jul 18 13:17:13 2013

Dear John,

Thank you very much for your quick reply.
And it works now!
I did what you suggested.
I already run the test and got the "*** Finished Testing the Model
Evaluation Tools Project ***"!

Thank you very much for your support.


Best,


Jinwoong


On Thu, Jul 18, 2013 at 2:56 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Jinwoong,
>
> We've had this issue come up with some other users in the past.  By
> default, MET does static linking - meaning that it links in the
library
> files on which it depends at compile time.  The other type
> of linking is call dynamic linking - for which the library files on
which
> it depends are linked in at runtime.
>
> Other users have had success compiling MET with dynamic linking
instead.
>  Open up and edit the top-level user_defs.mk file, by commenting out
or
> removing references to "-static".  They show up on the
> CXX_FLAGS and FC_FLAGS lines.
>
> Then try recompiling MET, being sure to execute a "make clean"
first.
>
> Please give that a shot and let me know how it goes.
>
> Thanks,
> John
>
> On 07/18/2013 12:24 PM, Jinwoong Yoo via RT wrote:
> >
> > Thu Jul 18 12:24:58 2013: Request 62302 was acted upon.
> > Transaction: Ticket created by jinwoong.yoo at gmail.com
> >         Queue: met_help
> >       Subject: Error compiling MET on a Linux cluster
> >         Owner: Nobody
> >    Requestors: jinwoong.yoo at gmail.com
> >        Status: new
> >   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=62302 >
> >
> >
> > Dear MET Help
> >
> > Hi. I was compiling MET on a Linux cluster computer using gcc and
> gfortran
> > compilers when I got an error (please see at the bottom).
> >
> > Error occurred with a message: " /usr/bin/ld: cannot find -lm "
> > I think I followed every direction on the users guide, I did see
any part
> > for the library m. I don't know where the lm (probably libm.so)
should be
> > located on the cluster system.
> >
> > here is a part of my environment variable setting:
> >
> > export BUFRLIB=/home/rmawalagedara/local/BUFRLIB
> > export GSL=/home/rmawalagedara/local/gsl-1.15
> > export WRFIO_NCD_LARGE_FILE_SUPPORT=1
> > export
> >
>
PATH=$PATH:$NETCDF:$NETCDF/bin:$NETCDF/include:$NETCDF/lib:$GSL:$GSL/bin:$GSL/include:$GSL/lib
> > export WRF_DIR=/home/rmawalagedara/WRFV3.5/WRFV3
> > export
> >
> LD_LIBRARY_PATH=/home/jyoo/local/netcdf-
4.1.1/lib:/opt/openmpi/lib:$GSL/lib
> >
> >
> > The paths to BUFRLIB, GSL, and NETCDF in my environment variable
setting
> > are the same as in the user_defs.mk.
> >
> > Any comment will be very helpful.
> > Thank you.
> >
> > Best,
> >
> >
> > Jinwoong Yoo
> >
> >
> >
> >
> >
> >
> > *** Finished Making the vx_tc_util Library ***
> >
> >
> >
> > /usr/bin/g++ ensemble_stat_conf_info.cc -Wall -Wshadow -static
-DBLOCK4
> -c
> > -I/home/rmawalagedara/WRFV3.5/METv4.1/include
> > -I/home/rmawalagedara/local/gsl-1.15/include
> > -I/home/jyoo/local/netcdf-4.1.1/include
> > /usr/bin/g++ -o ensemble_stat ensemble_stat.cc
ensemble_stat_conf_info.o
> \
> > -Wall -Wshadow -static  -DBLOCK4
> > -DMET_BASE=\"/home/rmawalagedara/WRFV3.5/METv4.1\" \
> > -I/home/rmawalagedara/WRFV3.5/METv4.1/include
> > -I/home/jyoo/local/netcdf-4.1.1/include
> > -I/home/rmawalagedara/local/gsl-1.15/include  \
> > -L/home/rmawalagedara/WRFV3.5/METv4.1/lib
> > -L/home/jyoo/local/netcdf-4.1.1/lib
> > -L/home/rmawalagedara/local/gsl-1.15/lib  \
> > -lvx_stat_out \
> > -lvx_statistics \
> > -lvx_shapedata \
> > -lvx_gsl_prob \
> > -lvx_analysis_util \
> > -lvx_data2d_factory \
> > -lvx_data2d_nc_met \
> > -lvx_data2d_grib  \
> > -lvx_data2d_nc_pinterp \
> > -lvx_data2d_nccf \
> > -lvx_data2d \
> > -lvx_nc_util \
> > -lvx_grid \
> > -lvx_config \
> > -lvx_cal \
> > -lvx_util \
> > -lvx_math \
> > -lvx_color \
> > -lvx_log \
> > -lm -lnetcdf_c++ -lnetcdf -lgsl -lgslcblas \
> > /usr/bin/ld: cannot find -lm
> > collect2: ld returned 1 exit status
> > make[4]: *** [ensemble_stat] Error 1
> > make[3]: *** [all] Error 2
> > make[2]: *** [all] Error 2
> > make[1]: *** [all] Error 2
> > make: *** [all] Error 2
> >
>
>

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


More information about the Met_help mailing list