[ncl-install] Problem runing ncl on Ubuntu 18.04

Diego Remolina dijuremo at gmail.com
Wed Dec 12 12:12:21 MST 2018


I have figured it out. I ran strace and before the core dump I see
that ncl is looking for a file that does not exist in the Ubuntu
installation: /usr/share/ncarg/database/Earth..2.names

openat(AT_FDCWD, "Earth..2.names", O_RDONLY) = -1 ENOENT (No such file
or directory)
openat(AT_FDCWD, "/usr/share/ncarg/database/Earth..2.names", O_RDONLY)
= -1 ENOENT (No such file or directory)
write(1, " Copyright (C) 1995-2017 - All R"..., 313 Copyright (C)
1995-2017 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.4.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
fatal:MapV41DHInitialize: dynamic memory allocation error:[errno=12]
^M) = 313
write(1, "fatal:MapV41DHInitialize: error "...,
66fatal:MapV41DHInitialize: error initializing map outline records
^M) = 66
write(1, "fatal:MapSetTrans: error initial"..., 75fatal:MapSetTrans:
error initializing map: MAPINT - UNCLEARED PRIOR ERROR
^M) = 75
write(1, "fatal:(null): Error setting tran"..., 44fatal:(null): Error
setting transformation
^M) = 44
write(1, "fatal:MapPlotSetValues: error ma"...,
50fatal:MapPlotSetValues: error managing TickMarks
^M) = 50
write(1, "warning:[\"SetValues.c\":474]:SetV"...,
101warning:["SetValues.c":474]:SetValuesChild never occurred on
map.PlotManager: Error in mapPlotClass
^M) = 101
brk(0x556fb4ce1000)                     = 0x556fb4ce1000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xe} ---
+++ killed by SIGSEGV (core dumped) +++

So I check and in fact, that file is missing from /usr/share/ncarg/database/

The renamed folder here, database.ORIG is what came from the original
Ubuntu 18.04 installation

root at prod:/usr/lib/ncarg# ls -l database.ORIG/
total 14920
-rw-r--r-- 1 root root  239286 Mar  9  2018 Earth..1.areas
-rw-r--r-- 1 root root  743392 Mar  9  2018 Earth..1.lines
-rw-r--r-- 1 root root  342556 Mar  9  2018 Earth..2.areas
-rw-r--r-- 1 root root 1507872 Mar  9  2018 Earth..2.lines
-rw-r--r-- 1 root root  290424 Mar  9  2018 Earth..3.areas
-rw-r--r-- 1 root root 1035728 Mar  9  2018 Earth..3.lines
-rw-r--r-- 1 root root 4901852 Mar  9  2018 Earth..4.areas
-rw-r--r-- 1 root root 4528784 Mar  9  2018 Earth..4.lines
-rw-r--r-- 1 root root   36832 Mar  9  2018 ezmap_area_ids
-rw-r--r-- 1 root root   58979 Mar  9  2018 EzmapAreaInfo.CO
-rw-r--r-- 1 root root  122563 Mar  9  2018 EzmapAreaInfo.PO
-rw-r--r-- 1 root root  111767 Mar  9  2018 EzmapAreaInfo.PS
-rw-r--r-- 1 root root    9201 Mar  9  2018 EzmapAreaInfo.US
-rw-r--r-- 1 root root  587264 Mar  9  2018 ezmapdata
-rw-r--r-- 1 root root   76280 Mar  9  2018 EzmapOutlines.CO
-rw-r--r-- 1 root root  138680 Mar  9  2018 EzmapOutlines.PO
-rw-r--r-- 1 root root  240752 Mar  9  2018 EzmapOutlines.PS
-rw-r--r-- 1 root root  107952 Mar  9  2018 EzmapOutlines.US
-rw-r--r-- 1 root root   23021 Mar  9  2018 NhlMapData
-rw-r--r-- 1 root root   37640 Mar  9  2018 PlotcharData
-rw-r--r-- 1 root root   37680 Mar  9  2018 pwritdata
-rw-r--r-- 1 root root   20250 Mar  9  2018 ranfdata
-rw-r--r-- 1 root root    4096 Mar  9  2018 rgb.dir
-rw-r--r-- 1 root root   16384 Mar  9  2018 rgb.pag
-rw-r--r-- 1 root root   16992 Mar  9  2018 rgb.txt

So now after renaming that folder, I copied the database folder from
my attempt to build 6.5.0 from source:

 root at prod:/usr/lib/ncarg# ls -l database
total 15276
-rw-r--r-- 1 root root  239286 Dec 12 19:04 Earth..1.areas
-rw-r--r-- 1 root root  743392 Dec 12 19:04 Earth..1.lines
-rw-r--r-- 1 root root   30565 Dec 12 19:04 Earth..1.names
-rw-r--r-- 1 root root  342556 Dec 12 19:04 Earth..2.areas
-rw-r--r-- 1 root root 1507872 Dec 12 19:04 Earth..2.lines
-rw-r--r-- 1 root root  103535 Dec 12 19:04 Earth..2.names
-rw-r--r-- 1 root root  290424 Dec 12 19:04 Earth..3.areas
-rw-r--r-- 1 root root 1035728 Dec 12 19:04 Earth..3.lines
-rw-r--r-- 1 root root   38552 Dec 12 19:04 Earth..3.names
-rw-r--r-- 1 root root 4901852 Dec 12 19:04 Earth..4.areas
-rw-r--r-- 1 root root 4528784 Dec 12 19:04 Earth..4.lines
-rw-r--r-- 1 root root  176790 Dec 12 19:04 Earth..4.names
-rw-r--r-- 1 root root   36832 Dec 12 19:04 ezmap_area_ids
-rw-r--r-- 1 root root   58979 Dec 12 19:04 EzmapAreaInfo.CO
-rw-r--r-- 1 root root  122563 Dec 12 19:04 EzmapAreaInfo.PO
-rw-r--r-- 1 root root  111767 Dec 12 19:04 EzmapAreaInfo.PS
-rw-r--r-- 1 root root    9201 Dec 12 19:04 EzmapAreaInfo.US
-rw-r--r-- 1 root root  587264 Dec 12 19:04 ezmapdata
-rw-r--r-- 1 root root   76280 Dec 12 19:04 EzmapOutlines.CO
-rw-r--r-- 1 root root  138680 Dec 12 19:04 EzmapOutlines.PO
-rw-r--r-- 1 root root  240752 Dec 12 19:04 EzmapOutlines.PS
-rw-r--r-- 1 root root  107952 Dec 12 19:04 EzmapOutlines.US
drwxr-xr-x 2 root root    4096 Dec 12 19:04 ftfonts
-rw-r--r-- 1 root root   23021 Dec 12 19:04 NhlMapData
-rw-r--r-- 1 root root   37640 Dec 12 19:04 PlotcharData
-rw-r--r-- 1 root root   37680 Dec 12 19:04 pwritdata
-rw-r--r-- 1 root root   20250 Dec 12 19:04 ranfdata
-rw-r--r-- 1 root root    4096 Dec 12 19:04 rgb.dir
-rw-r--r-- 1 root root   16384 Dec 12 19:04 rgb.pag
-rw-r--r-- 1 root root   16992 Dec 12 19:04 rgb.txt

Now with the new database folder in place everything works properly:

cfanprod at prod:~/ncl-test$ ls -l
total 148
-rw------- 1 cfanprod cfanprod   3143 Jul 24  2009 gsun03n.ncl
-rw------- 1 cfanprod cfanprod   3400 Nov 28 17:33 maponly_10.ncl
-rw------- 1 cfanprod cfanprod   1059 Nov 28 17:33 maponly_3.ncl
-rw------- 1 cfanprod cfanprod   1930 Nov 28 17:33 maponly_9.ncl
-rw------- 1 cfanprod cfanprod 117266 Dec 12 19:10 maponly.png
cfanprod at prod:~/ncl-test$ rm maponly.png
cfanprod at prod:~/ncl-test$ date
Wed Dec 12 19:10:52 UTC 2018
cfanprod at prod:~/ncl-test$ ncl maponly_9.ncl
Copyright (C) 1995-2017 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.4.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
cfanprod at prod:~/ncl-test$ ls -l
total 148
-rw------- 1 cfanprod cfanprod   3143 Jul 24  2009 gsun03n.ncl
-rw------- 1 cfanprod cfanprod   3400 Nov 28 17:33 maponly_10.ncl
-rw------- 1 cfanprod cfanprod   1059 Nov 28 17:33 maponly_3.ncl
-rw------- 1 cfanprod cfanprod   1930 Nov 28 17:33 maponly_9.ncl
-rw------- 1 cfanprod cfanprod 117266 Dec 12 19:11 maponly.png
cfanprod at prod:~/ncl-test$ rm maponly.png
cfanprod at prod:~/ncl-test$ date
Wed Dec 12 19:11:13 UTC 2018
cfanprod at prod:~/ncl-test$ ncl maponly_10.ncl
Copyright (C) 1995-2017 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.4.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
cfanprod at prod:~/ncl-test$ ls -l
total 376
-rw------- 1 cfanprod cfanprod   3143 Jul 24  2009 gsun03n.ncl
-rw------- 1 cfanprod cfanprod 198176 Dec 12 19:11 maponly.000001.png
-rw------- 1 cfanprod cfanprod  77992 Dec 12 19:11 maponly.000002.png
-rw------- 1 cfanprod cfanprod  67940 Dec 12 19:11 maponly.000003.png
-rw------- 1 cfanprod cfanprod   3400 Nov 28 17:33 maponly_10.ncl
-rw------- 1 cfanprod cfanprod   1059 Nov 28 17:33 maponly_3.ncl
-rw------- 1 cfanprod cfanprod   1930 Nov 28 17:33 maponly_9.ncl
cfanprod at prod:~/ncl-test$

On Wed, Dec 12, 2018 at 11:18 AM Diego Remolina <dijuremo at gmail.com> wrote:
>
> Hi Mary,
>
> That line is just because I used "TAB" to autocomplete and showed the
> two options. Here are the contents of each directory:
>
> root at prod:~# ls /usr/lib/ncarg/data
> asc  bin  cdf  grb  hdf  nug  shp
> root at prod:~# ls /usr/lib/ncarg/database/
> Earth..1.areas  Earth..2.lines  Earth..4.areas  EzmapAreaInfo.CO
> EzmapAreaInfo.US  EzmapOutlines.PO  NhlMapData    ranfdata  rgb.txt
> Earth..1.lines  Earth..3.areas  Earth..4.lines  EzmapAreaInfo.PO
> ezmapdata         EzmapOutlines.PS  PlotcharData  rgb.dir
> Earth..2.areas  Earth..3.lines  ezmap_area_ids  EzmapAreaInfo.PS
> EzmapOutlines.CO  EzmapOutlines.US  pwritdata     rgb.pag
>
> cfanprod at prod:~$ echo $NCARG_ROOT
> /usr
> cfanprod at prod:~$ which ncl
> /usr/bin/ncl
> cfanprod at prod:~$ ncl -V
> 6.4.0
> cfanprod at prod:~$ env | grep NCARG
> NCARG_ROOT=/usr
>
> I am running this on another machine since I removed the Ubuntu
> ncl-ncarg from prod2 to try and build 6.5.0 from source code.
>
> The problem is present on both machines, prod and prod2. I am able to
> run maponly_3.ncl on both, but not other files.
>
> cfanprod at prod:~/ncl-test$ ls
> gsun03n.ncl  maponly_10.ncl  maponly_3.ncl  maponly_9.ncl  maponly.png
> cfanprod at prod:~/ncl-test$ ncl maponly_3.ncl
> Copyright (C) 1995-2017 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.4.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
>
> The above worked and generated: maponly.png
>
> cfanprod at prod:~/ncl-test$ ncl maponly_9.ncl
> Copyright (C) 1995-2017 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.4.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> fatal:MapV41DHInitialize: dynamic memory allocation error:[errno=12]
> fatal:MapV41DHInitialize: error initializing map outline records
> ERROR    2 IN MPLNRI/MDLNRI - Can't open the ".names" file
> ERROR    1 IN MPSETR - UNCLEARED PRIOR ERROR
> ERROR    1 IN MAPPOS - UNCLEARED PRIOR ERROR
> ERROR    1 IN MAPSTI - UNCLEARED PRIOR ERROR
> ERROR    1 IN MAPROJ - UNCLEARED PRIOR ERROR
> ERROR    2 IN MAPSET/MDPSET - UNCLEARED PRIOR ERROR
> fatal:MapSetTrans: error initializing map: MAPINT - UNCLEARED PRIOR ERROR
> fatal:(null): Error setting transformation
> fatal:MapPlotSetValues: error managing TickMarks
> warning:["SetValues.c":474]:SetValuesChild never occurred on
> map.PlotManager: Error in mapPlotClass
> Segmentation fault (core dumped)
> cfanprod at prod:~/ncl-test$ ncl maponly_10.ncl
> Copyright (C) 1995-2017 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.4.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> fatal:MapV41DHInitialize: dynamic memory allocation error:[errno=12]
> fatal:MapV41DHInitialize: error initializing map outline records
> ERROR    2 IN MPLNRI/MDLNRI - Can't open the ".names" file
> ERROR    1 IN MPSETR - UNCLEARED PRIOR ERROR
> ERROR    1 IN MAPPOS - UNCLEARED PRIOR ERROR
> ERROR    1 IN MAPSTI - UNCLEARED PRIOR ERROR
> ERROR    1 IN MAPROJ - UNCLEARED PRIOR ERROR
> ERROR    2 IN MAPSET/MDPSET - UNCLEARED PRIOR ERROR
> fatal:MapSetTrans: error initializing map: MAPINT - UNCLEARED PRIOR ERROR
> fatal:(null): Error setting transformation
> fatal:MapPlotSetValues: error managing TickMarks
> warning:["SetValues.c":474]:SetValuesChild never occurred on
> map.PlotManager: Error in mapPlotClass
> warning:tiMainString is not a valid resource in map at this time
> Segmentation fault (core dumped)
>
> Anything else I can try?
>
> Diego
> On Wed, Dec 12, 2018 at 10:46 AM Mary Haley <haley at ucar.edu> wrote:
> >
> > Hi Diego,
> >
> > I'm guessing there's something wrong with your environment . The information you provided looks mostly correct, but this part confuses me:
> >
> > cfanprod at prod2:~$ ls /usr/lib/ncarg/data
> > data/     database/
> > cfanprod at prod2:~$ ls /$NCARG_ROOT/lib/ncarg/database/
> >
> > The /usr/lib/ncarg/data directory should NOT have "data" and "database" in it. It should have these directories:
> >
> > asc/ bin/ cdf/ grb/ hdf/ nug/ shp/
> >
> > The listing of $NCARG_ROOT/lib/ncarg/database looks correct but I'm wondering if you have multiple NCARG_XXXX environment variables set that are incorrect?
> >
> > Can you type the following and email all of the output back to ncl-install at ucar.edu:
> >
> > which ncl
> > ncl -V
> > env | grep NCARG
> >
> > If the "env" command shows any environment variables called NCARG_NCARG or NCARG_LIB, then this is probably the source of your problem.  The only environment that really should be required is NCARG_ROOT.
> >
> > --Mary
> >
> >
> > On Tue, Dec 11, 2018 at 8:46 PM Diego Remolina via ncl-install <ncl-install at ucar.edu> wrote:
> >>
> >> Hi,
> >>
> >> Trying to setup and run ncl-ncarg which comes directly from the ubuntu
> >> repo, but it fails.
> >>
> >> cfanprod at prod2:~$ which ncl
> >> /usr/bin/ncl
> >> cfanprod at prod2:~$ ncl -V
> >> 6.4.0
> >> cfanprod at prod2:~$ ncl
> >>  Copyright (C) 1995-2017 - All Rights Reserved
> >>  University Corporation for Atmospheric Research
> >>  NCAR Command Language Version 6.4.0
> >>  The use of this software is governed by a License Agreement.
> >>  See http://www.ncl.ucar.edu/ for more details.
> >> ncl 0>
> >>
> >> cfanprod at prod2:~$ echo $NCARG_ROOT
> >> /usr
> >> cfanprod at prod2:~$ ls /usr/lib/ncarg/data
> >> data/     database/
> >> cfanprod at prod2:~$ ls /$NCARG_ROOT/lib/ncarg/database/
> >> Earth..1.areas  Earth..3.areas  ezmap_area_ids    EzmapAreaInfo.US
> >> EzmapOutlines.PS  pwritdata  rgb.txt
> >> Earth..1.lines  Earth..3.lines  EzmapAreaInfo.CO  ezmapdata
> >> EzmapOutlines.US  ranfdata
> >> Earth..2.areas  Earth..4.areas  EzmapAreaInfo.PO  EzmapOutlines.CO
> >> NhlMapData        rgb.dir
> >> Earth..2.lines  Earth..4.lines  EzmapAreaInfo.PS  EzmapOutlines.PO
> >> PlotcharData      rgb.pag
> >>
> >> So far, everything looks fine, I can run one of the example files:
> >>
> >> cfanprod at prod2:~$ wget
> >> https://www.ncl.ucar.edu/Applications/Scripts/maponly_3.ncl
> >> cfanprod at prod2:~$ ncl maponly_3.ncl
> >>  Copyright (C) 1995-2017 - All Rights Reserved
> >>  University Corporation for Atmospheric Research
> >>  NCAR Command Language Version 6.4.0
> >>  The use of this software is governed by a License Agreement.
> >>  See http://www.ncl.ucar.edu/ for more details.
> >> cfanprod at prod2:~$ ls
> >> CHX     cronback.txt  DY             LOGS            map.000002.png
> >> maponly.png  MDZ  SE
> >> COMMON  Documents     java.log.3981  map.000001.png  maponly_3.ncl
> >> maptest.ncl  MN
> >>
> >> However, when trying to run another, the program crashes:
> >> cfanprod at prod2:~$ wget
> >> https://www.ncl.ucar.edu/Applications/Scripts/maponly_9.ncl
> >>
> >> cfanprod at prod2:~$ ncl maponly_9.ncl
> >>  Copyright (C) 1995-2017 - All Rights Reserved
> >>  University Corporation for Atmospheric Research
> >>  NCAR Command Language Version 6.4.0
> >>  The use of this software is governed by a License Agreement.
> >>  See http://www.ncl.ucar.edu/ for more details.
> >> fatal:MapV41DHInitialize: dynamic memory allocation error:[errno=12]
> >> fatal:MapV41DHInitialize: error initializing map outline records
> >>  ERROR    2 IN MPLNRI/MDLNRI - Can't open the ".names" file
> >>  ERROR    1 IN MPSETR - UNCLEARED PRIOR ERROR
> >>  ERROR    1 IN MAPPOS - UNCLEARED PRIOR ERROR
> >>  ERROR    1 IN MAPSTI - UNCLEARED PRIOR ERROR
> >>  ERROR    1 IN MAPROJ - UNCLEARED PRIOR ERROR
> >>  ERROR    2 IN MAPSET/MDPSET - UNCLEARED PRIOR ERROR
> >> fatal:MapSetTrans: error initializing map: MAPINT - UNCLEARED PRIOR ERROR
> >> fatal:(null): Error setting transformation
> >> fatal:MapPlotSetValues: error managing TickMarks
> >> warning:["SetValues.c":474]:SetValuesChild never occurred on
> >> map.PlotManager: Error in mapPlotClass
> >> Segmentation fault (core dumped)
> >>
> >> I have seen some similar issues in the mailing list, but there was no
> >> resolution. Any ideas how to fix the problem?
> >>
> >> Diego
> >> _______________________________________________
> >> ncl-install mailing list
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-install


More information about the ncl-install mailing list