Discussion:
[MacPorts] #53031: macports ncl fails, mac install of ncarg works
MacPorts
2016-12-08 19:34:25 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
--------------------+-------------------
Reporter: basmac | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Keywords: ncl | Port: ncarg
--------------------+-------------------
Running the same script the macports /opt/local crashes with an error,
whereas a separate default install of ncarg/ncl works from /usr/local.

Attached is the log, running /opt/local ncl first then /usr/local ncl
second using ( ncarg @6.3.0_8+gcc6 (active))

macports fails on ElCap or new install on Sierra. The attached log is
Sierra, but has the same error, on ElCap (ncarg @6.3.0_9+gcc5 (active))

The library script ESMF_regridding.ncl are the same size in
/usr/local/ncl/ as under /opt/local.

--
Ticket URL: <https://trac.macports.org/ticket/53031>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-08 19:35:53 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+-------------------
Reporter: basmac | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords: ncl
Port: ncarg |
---------------------+-------------------
Changes (by basmac):

* Attachment "ncl.mac27.log" added.


--
Ticket URL: <https://trac.macports.org/ticket/53031>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-08 21:22:46 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------
Changes (by mf2k):

* cc: takeshi@… (removed)
* status: new => assigned
* owner: => tenomoto
* keywords: ncl =>


--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-10 04:34:53 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------

Comment (by tenomoto):

Thanks for reporting. I was able to reproduce the problem, but I don't
have a solution at the moment.

It appears that {{{setfileoption}}} break the symbol table and {{{Opt}}}
becomes undefined,
I attach the simple script to cause the error.

BTW, I'd like to draw your attention the warning message on line 47.

{{{
warning:["Palette.c":1850]:NhlLoadColormapFiles: Invalid colormap
directory: /opt/local/ncl/lib/ncarg/colormaps
}}}


The default {{{NCARG_COLORMAPS}}} should be
{{{/opt/local/lib/ncarg/colormaps}}}.

--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-10 04:35:45 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------
Changes (by tenomoto):

* Attachment "bar.ncl" added.


--
Ticket URL: <https://trac.macports.org/ticket/53031>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-12 14:37:40 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------

Comment (by basmac):

Hi,
thanks for finding the issue, when I run your bar.ncl I get the following.
Is this what we are supposed to get ?

[mac27:~] bmcinnes% ncl bar.ncl
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.


Variable: nc_file_type
Type: string
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) netcdf3
fatal:Variable (nc_file_type) is undefined
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 10 in
file bar.ncl

fatal:["Execute.c":8575]:Execute: Error occurred at or near line 16 in
file bar.ncl

[mac27:~] bmcinnes%

I am not sure if this is related, but the user also has this issue, for
your information

I made a script that tests both the regridding and the ability to plot
.png files. Here is the output when I try to run it using the /usr/local
NCL version:

[mac72:~/NCL/NCLtalk/NCLmacports] mgehne% setenv NCARG_ROOT /usr/local

[mac72:~/NCL/NCLtalk/NCLmacports] mgehne% setenv PATH /usr/local/$PATH

[mac72:~/NCL/NCLtalk/NCLmacports] mgehne% source ~/.tcshrc

[mac72:~/NCL/NCLtalk/NCLmacports] mgehne% ncl test_regrid_plot.ncl

Copyright (C) 1995-2015 - All Rights Reserved

University Corporation for Atmospheric Research

NCAR Command Language Version 6.3.0

The use of this software is governed by a License Agreement.

See http://www.ncl.ucar.edu/ for more details.

(0) Regrid option is on.

(0) Plot option is on.

(0) defining data array


Variable: data

Type: float

Total Size: 259200 bytes

64800 values

Number of Dimensions: 2

Dimensions and sizes: [lat | 180] x [lon | 360]

Coordinates:

lat: [-89.5..89.5]

lon: [ 0..359]

(0) Regridding!

(0) defining new lat and lon arrays

(0) defining options for regridding

(0) Regridding using method = neareststod

dyld: Library not loaded: /usr/local/lib/libgfortran.3.dylib

Referenced from: /usr/local/ncl/bin/ESMF_RegridWeightGen

Reason: image not found

fatal:The result of the conditional expression yields a missing value. NCL
can not determine branch, see ismissing function

fatal:["Execute.c":8575]:Execute: Error occurred at or near line 2938 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl


fatal:["Execute.c":8575]:Execute: Error occurred at or near line 4027 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl


fatal:["Execute.c":8575]:Execute: Error occurred at or near line 69 in
file test_regrid_plot.ncl


[mac72:~/NCL/NCLtalk/NCLmacports] mgehne% which ncl

/usr/local/bin/ncl

[mac72:~/NCL/NCLtalk/NCLmacports] mgehne% env | grep NCARG

NCARG_ROOT=/usr/local

NCARG_COLORMAPS=/Users/mgehne/NCL/Colormaps:/usr/local/lib/ncarg/colormaps


This is a slightly different error message than I have been getting
previously.


I also attached the test script if you feel like running that on your
machine. Setting the options at the beginning to False turns off the
regridding or plotting.

--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-12 14:51:30 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------
Changes (by basmac):

* Attachment "test_regrid_plot.ncl" added.


--
Ticket URL: <https://trac.macports.org/ticket/53031>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-12 20:39:34 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------

Comment (by basmac):

On clean mac Sierra and ncl 6.3.0 in /usr/local/, your test fails for
/opt/local version of ncl and works on /usr/local version which is 10.10.

[mac27:~] bmcinnes% cd
[mac27:~] bmcinnes% setenv NCARG_ROOT /opt/local
[mac27:~] bmcinnes% ncl bar.ncl
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.


Variable: nc_file_type
Type: string
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) netcdf3
fatal:Variable (nc_file_type) is undefined
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 10 in
file bar.ncl

fatal:["Execute.c":8575]:Execute: Error occurred at or near line 16 in
file bar.ncl

[mac27:~] bmcinnes% /usr/local/bin/ncl bar.ncl
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.


Variable: nc_file_type
Type: string
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) netcdf3


Variable: nc_file_type
Type: string
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) netcdf4


Variable: nc_file_type
Type: string
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) netcdf3
[mac27:~] bmcinnes%

--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-03-02 15:06:49 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------

Comment (by basmac):

The latest binary of ncarg 6.4.0 does not give the error using the test
bar.ncl.

Can we get that installed into macports ?

thanks

--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-08-08 00:25:29 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------
Changes (by Dave-Allured):

* Attachment "test3.setfileoption.ncl" added.

Reduced bug demo script
--
Ticket URL: <https://trac.macports.org/ticket/53031>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-08-08 00:43:08 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------

Comment (by Dave-Allured):

Here is a more reduced demo for the `setfileoption` bug:

{{{
procedure test3 ()
begin
setfileoption ("nc", "Format", "Classic")
x = 99
print (x+"")
end

begin
test3 ()
end
}}}

This should just print "99" if NCL is working correctly. With current
build ncarg.6.4.0_9 it gets this error, which is equivalent to the
previously reported errors:

{{{
ncl test3.setfileoption.ncl
NCAR Command Language Version 6.4.0
fatal:Variable (x) is undefined
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 5 in file
test3.setfileoption.ncl
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 9 in file
test3.setfileoption.ncl
}}}

The previous test script, bar.ncl, is longer than needed, and it contains
an unrelated bug that can also corrupt NCL execution and print more
confusing errors. The problem is a missing "undef" statement at the top,
not related to the current issue.

I agree with Takeshi's previous observation that `setfileoption` appears
to break the symbol table.
--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-08-13 06:51:59 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords:
Port: ncarg |
---------------------+----------------------

Comment (by tenomoto):

`setfileoption` in ncarg 6.5.0 causes Segmentation Fault 11 on High
Sierra. In the past the problem disappeared with some compilers #38687. So
I tried a few versions of gcc only to fail. I have no idea how to fix this
at the moment. I decided to revert to 6.4.0.
[cdde049ce2176cdef35c2e8737f718b9d4dae9d2/macports-ports].
--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-08-13 12:47:31 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: fixed | Keywords:
Port: ncarg |
---------------------+----------------------
Changes (by tenomoto):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"278e517b8e560b682d4a9c5ed79f9ee74530482f/macports-ports"
278e517b8e560b682d4a9c5ed79f9ee74530482f/macports-ports] (master):
{{{
#!ConfigurableCommitTicketReference repository="macports-ports"
revision="278e517b8e560b682d4a9c5ed79f9ee74530482f"
ncarg: update (again) to 6.5.0

Closes: https://trac.macports.org/ticket/53031
Closes: https://trac.macports.org/ticket/56870
}}}
--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-05 18:33:35 UTC
Permalink
#53031: macports ncl fails, mac install of ncarg works
---------------------+----------------------
Reporter: basmac | Owner: tenomoto
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: fixed | Keywords:
Port: ncarg |
---------------------+----------------------

Comment (by Dave-Allured):

For the record only, I got this information from an NCARG/NCL developer a
while back:

"The one library that I see that could potentially be an issue is HDF5
1.10.x. You cannot build or link NCL V6.4.0 against this version of HDF5.
You must use HDF 1.8.x. All the other libraries look okay to me, but I
have to admit that I haven't tried this exact pairing of everything, so
there could be something I'm not aware of. HDF5 1.10 just flat out
shouldn't work with NCL640, so I'm a bit surprised to see that and not
have heard from more people running into problems."

"In NCL V6.5.0, you *can* link against HDF5 1.10.x."

When this ticket #53031 was active (2016 Dec. to 2018 Aug.), MacPorts
NCARG V6.4.0 was indeed building against HDF5 1.10.x. Therefore I think
it is likely that this version incompatibility was behind the
`setfileoption` bug and other problems.
--
Ticket URL: <https://trac.macports.org/ticket/53031#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...