[Wrf-users] plotgrids and plotfmt

Dmitry N. Mikushin maemarcus at gmail.com
Mon Aug 12 14:04:18 MDT 2013


No lncarg prefix, right, because in Linux linker "-lncarg" means "link
against libncarg.a or libncarg.so library", i.e. "-l" gets replaced by
"lib".

Yes, either first or second triple of the files you've found should
fit, depending on the compiler-compatibility. Try to add
-L/usr/local/ncarg/6.1.2/lib or -L/usr/local/ncl_ncarg-6.0.0/intel/lib
to the failing link commands, e.g.:

gfortran -o plotgrids.exe -g module_map_utils.o module_debug.o cio.o
constants_module.o misc_definitions_module.o plotgrids.o
-L/usr/local/ncarg/6.1.2/lib -L/lib -lncarg -lncarg_gks -lncarg_c
-L/usr/X11R6/lib -lX11

For more robustness, there should be an upper-level setting somewhere
in the WPS' makefile/configure to specify such additional library
search paths.

- D.

2013/8/12 David Smith <dsmith at uvi.edu>:
> There are no files with a lncarg prefix anywhere, but I do find files such
> as
>
> /usr/local/ncarg/6.1.2/lib/libncarg.a
> /usr/local/ncarg/6.1.2/lib/libncarg_c.a
> /usr/local/ncarg/6.1.2/lib/libncarg_gks.a
> /usr/local/ncl_ncarg-6.0.0/intel/lib/libncarg.a
> /usr/local/ncl_ncarg-6.0.0/intel/lib/libncarg_c.a
> /usr/local/ncl_ncarg-6.0.0/intel/lib/libncarg_gks.a
> /usr/local/ncl_ncarg-6.0.0/intel/lib/libncarg_ras.a
>
>  etc.
>
> Are these the same files or different?  Could this be a version issue?
> The NCAR graphics was downloaded with the 3.4 version of wrf.  Thanks!
>
> Dave
>
>
> Dr. David J Smith
> College of Science and Mathematics
> University of the Virgin Islands
> St. Thomas,  VI  00802
> 340 693-1257
> dsmith at uvi.edu
>
>
>
>
> On 8/12/13 12:59 PM, "Dmitry N. Mikushin" <maemarcus at gmail.com> wrote:
>
>>> gfortran -o plotgrids.exe -g module_map_utils.o module_debug.o cio.o
>>> constants_module.
>>> o misc_definitions_module.o \
>>> plotgrids.o -L/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX1
>>> 1
>>> /usr/bin/ld: cannot find -lncarg
>>
>>Cannot link plotgrids.exe because the libncarg library is missing or
>>not built successfully. It's being searched in:
>>
>>/lib
>>/usr/X11R6/lib
>>
>>2013/8/12 David Smith <dsmith at uvi.edu>:
>>> Hi,
>>>
>>>     Neither plotgrids.exe nor plotfmt.exe are being created in the
>>>WPS/utils
>>> directory. (All else is there.)  All NCAR graphics files seem to be in
>>> place.  The relevant part from the compile log is pasted below.  Any
>>>ideas
>>> what the "cannot find ­lncarg" error means?  (I can send the entire log
>>>if
>>> anyone needs it.)   Thanks!
>>>
>>> make[1]: Entering directory `/home/dsmith/WPS/util/src'
>>> /bin/rm -f module_map_utils.o module_map_utils.mod
>>> /usr/bin/cpp -C -P -traditional -D_UNDERSCORE -DBYTESWAP -DLINUXG95
>>> -DIO_NETCDF -DBIT3
>>> 2 -D_MPI -D_UTIL -DUSE_JPEG2000 -DUSE_PNG
>>> -I/home/dsmith/WPS/../WRFV3/external/io_netc
>>> df -I/home/dsmith/WPS/../WRFV3/external/io_grib_share
>>> -I/home/dsmith/WPS/../WRFV3/exte
>>> rnal/io_grib1 -I/home/dsmith/WPS/../WRFV3/external/io_int
>>> -I/home/dsmith/WPS/../WRFV3/
>>> inc module_map_utils.F > module_map_utils.f90
>>> mpif90  -ffree-form -g -fno-second-underscore -c module_map_utils.f90
>>> -I/home/dsmith/W
>>> PS/../WRFV3/external/io_netcdf
>>> -I/home/dsmith/WPS/../WRFV3/external/io_grib_share -I/h
>>> ome/dsmith/WPS/../WRFV3/external/io_grib1
>>> -I/home/dsmith/WPS/../WRFV3/external/io_int
>>> -I/home/dsmith/WPS/../WRFV3/inc
>>> /bin/cp plotgrids.F plotgrids.f90
>>> gfortran -ffree-form -g -fno-second-underscore -c plotgrids.f90
>>> gfortran -o plotgrids.exe -g module_map_utils.o module_debug.o cio.o
>>> constants_module.
>>> o misc_definitions_module.o \
>>> plotgrids.o -L/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX1
>>> 1
>>> /usr/bin/ld: cannot find -lncarg
>>> collect2: ld returned 1 exit status
>>> make[1]: [plotgrids.exe] Error 1 (ignored)
>>> make[1]: Leaving directory `/home/dsmith/WPS/util/src'
>>> if [ -h plotgrids.exe ] ; then \
>>> /bin/rm -f plotgrids.exe ; \
>>> fi ; \
>>> if [ -h ../plotgrids.exe ] ; then \
>>> /bin/rm -f ../plotgrids.exe ; \
>>> fi ; \
>>> if [ -e src/plotgrids.exe ] ; then \
>>> ln -sf src/plotgrids.exe . ; \
>>> fi
>>> ( cd src ; \
>>>         if [ "" = yes ] ; then \
>>>           WRF_DIR2=../WRFV3 ; \
>>>         else \
>>>           WRF_DIR2=/home/dsmith/WPS/../WRFV3 ; \
>>>         fi ; \
>>>
>>> Dr. David J Smith
>>> College of Science and Mathematics
>>> University of the Virgin Islands
>>> St. Thomas,  VI  00802
>>> 340 693-1257
>>> dsmith at uvi.edu
>>>
>>> _______________________________________________
>>> Wrf-users mailing list
>>> Wrf-users at ucar.edu
>>> http://mailman.ucar.edu/mailman/listinfo/wrf-users
>>>
>>
>
>


More information about the Wrf-users mailing list