NCDatasets.jl icon indicating copy to clipboard operation
NCDatasets.jl copied to clipboard

NCDatasets.jl v0.11+ does not work on PowerPC

Open ali-ramadhan opened this issue 5 years ago • 2 comments

Describe the bug

Earlier versions of NCDatasets.jl provided the NetCDF C library through Conda.jl which supports PowerPC so NCDatasets.jl ran with no problems on PowerPC platforms, but now that the library is provided via a JLL, I don't think it works on PowerPC.

I realize that Julia itself only offers Tier 3 support for PowerPC so I'm not expecting this issue to be addressed, but it would be nice to know whether there is an easy solution to get NCDatasets.jl to work on PowerPC (besides sticking to NCDatasets.jl v0.10.4).

To Reproduce

julia> using NCDatasets
[ Info: Precompiling NCDatasets [85f8d34a-cbdd-5861-8df4-14fed0d494ab]

julia> NCDataset("tmp.nc", "c")
ERROR: UndefVarError: libnetcdf not defined
Stacktrace:
 [1] nc_create(::String, ::UInt16) at /home/alir/.julia/packages/NCDatasets/KVato/src/netcdf_c.jl:256
 [2] NCDataset(::String, ::String; format::Symbol, diskless::Bool, persist::Bool, attrib::Array{Any,1}) at /home/alir/.julia/packages/NCDatasets/KVato/src/dataset.jl:266
 [3] NCDataset(::String, ::String) at /home/alir/.julia/packages/NCDatasets/KVato/src/dataset.jl:226
 [4] top-level scope at REPL[4]:1

Expected behavior

It would create the tmp.nc file and return an NCDataset.

Environment

Julia Version 1.5.3
Commit 788b2c77c1* (2020-11-09 13:37 UTC)
Platform Info:
  OS: Linux (powerpc64le-unknown-linux-gnu)
  CPU: unknown
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, pwr9)
(@v1.5) pkg> st
Status `~/.julia/environments/v1.5/Project.toml`
  [85f8d34a] NCDatasets v0.11.1

ali-ramadhan avatar Dec 05 '20 00:12 ali-ramadhan

Hmm yes the NetCDF_jll is unfortunately not available for PowerPC. This is the list of platforms:

https://github.com/JuliaPackaging/Yggdrasil/blob/684308e81b9249a35e6fff353f286eee12bd6a29/N/NetCDF/build_tarballs.jl#L45-L58

So we rely on which builds are available for HDF5, which is limited because there is no proper cross compiling build for HDF5 (https://github.com/JuliaPackaging/Yggdrasil/pull/567).

This is the build script for HDF5: https://github.com/JuliaPackaging/Yggdrasil/blob/684308e81b9249a35e6fff353f286eee12bd6a29/H/HDF5/build_tarballs.jl

So for most linux builds this makes use of the wheels hosted on PyPI: https://pypi.org/project/h5py/#files I don't see PowerPC in this list, so I think we can't easily add support for this, but @musm can correct me if I'm wrong.

visr avatar Dec 05 '20 09:12 visr

It seems that @musm is collecting the platform dependent variables used by HDF5: https://github.com/musm/hdf5-build-output

Maybe somebody with access to a PowerPC can contribute to this database (if I understand well its purpose). So far PowerPC is not part of the tested platforms.

Alexander-Barth avatar Dec 08 '20 21:12 Alexander-Barth

NCDatasets v0.12.16 should in principle work on PowerPC (thanks to the work of @eschnett on HDF5_jll and NetCDF_jll). @ali-ramadhan Can you check?

Ref: https://github.com/JuliaPackaging/Yggdrasil/pull/6795 https://github.com/JuliaPackaging/Yggdrasil/pull/6551 https://github.com/JuliaBinaryWrappers/NetCDF_jll.jl/releases/tag/NetCDF-v400.902.208%2B0

Alexander-Barth avatar Jun 02 '23 14:06 Alexander-Barth

Feel free to re-open an issue here JuliaPackaging/Yggdrasil (ping to me) if the issue persists.

Alexander-Barth avatar Jun 27 '23 12:06 Alexander-Barth