undefined symbol YAC_NCC_AVG
Hi there,
currently I am woring on PyCdo a updated version of the Python-Interface for CDO.
In that context Iam using a icon version provided by Ralf Mueller
/work/mh0287/k202125/pycdo/icon-mpim
Repo: icon-mpim Branch: pycdo
There I am trying to run
/work/mh0287/k202125/pycdo/icon-mpim/run/cmlexp.ICON_CLM.run
I have changed the PYTHON path in that runscript to my python environment
/work/mh0287/k202125/pycdo/venv/bin/
Loaded modules are from:
/work/mh0287/m300433/PyCdo/levante_load.sh
First I had problems with my PyCdo as the run script did not point to my python.
Following that I changed the mentioned path and ran
pip install /work/mh0287/k202125/pycdo/icon-mpim/externals/yac/python
Which successfully installed yac.
Executing the run script then yields:
PYTHONPATH=/work/mh0287/k202125/pycdo/venv/bin/
0: Your PYTHONPATH probably points to the source directory of yac/python instead of the build directory.
0: Traceback (most recent call last):
0: File "/work/mh0287/k202125/pycdo/icon-mpim/run/checksuite.clm/simple_output.py", line 3, in <module>
0: from yac import YAC, Reg2dGrid, Location, Field, TimeUnit, InterpolationStack, NNNReductionType, Action
0: File "/work/mh0287/k202125/pycdo/venv/lib/python3.10/site-packages/yac/__init__.py", line 6, in <module>
0: from ._yac import *
0: ImportError: /work/mh0287/k202125/pycdo/venv/lib/python3.10/site-packages/yac/_yac.cpython-310-x86_64-linux-gnu.so: undefined symbol: YAC_NCC_AVG
Can you help me figuring out what went wrong?
Extra Info:
[m300433@l20345:/work/mh0287/k202125/pycdo/icon-mpim/run] [venv] pycdo(+9/-2,1)* ± spack find --loaded
-- linux-rhel8-zen3 / gcc@11.2.0 --------------------------------
bzip2@1.0.8 cuda@12.2.0 gmake@4.4.1 intel-oneapi-mpi@2021.5.0 libiconv@1.17 lz4@1.9.4 ncurses@6.2 numactl@2.0.14 pkg-config@1.4.2 zlib@1.2.11
c-blosc@1.21.5 diffutils@3.9 hdf5@1.12.1 libaec@1.0.5 libxml2@2.9.7 m4@1.4.18 netcdf-c@4.9.2 openssl@1.1.1g snappy@1.1.8 zstd@1.5.2
-- linux-rhel8-zen3 / gcc@13.3.0 --------------------------------
autoconf@2.69 cmake@master gettext@0.21.1 libmd@1.0.4 mpfr@4.2.0 pigz@2.7 py-wheel@0.37.1 tar@1.34
autoconf-archive@2023.02.20 diffutils@3.9 gettext@0.21.1 libsigsegv@2.14 ncurses@6.4 pigz@2.7 python@3.10.10 texinfo@7.0.3
automake@1.16.5 expat@2.5.0 gmake@4.4.1 libtool@2.4.6 ncurses@6.4 pkg-config@1.4.2 re2c@2.2 util-linux-uuid@2.38.1
berkeley-db@18.1.40 gawk@5.2.1 gmp@6.2.1 libxcrypt@4.4.33 ninja@1.11.1 pkgconf@1.9.5 readline@8.2 xz@5.4.1
binutils@2.30 gcc@13.3.0 libbsd@0.11.7 libxml2@2.9.7 openssl@1.1.1g py-pip@23.0 readline@8.2 zlib@1.2.11
bzip2@1.0.8 gdbm@1.23 libffi@3.4.4 m4@1.4.18 perl@5.36.0 py-pybind11@master sqlite@3.40.1 zlib@1.2.13
ca-certificates-mozilla@2023-01-10 gdbm@1.23 libiconv@1.17 mpc@1.3.1 perl@5.36.0 py-setuptools@67.6.0 tar@1.34 zstd@1.5.5
==> 76 loaded packages
[m300433@l20345:/work/mh0287/k202125/pycdo/icon-mpim/run] [venv] pycdo(+9/-2,1)* 2s ±
[m300433@l20345:/work/mh0287/k202125/pycdo/icon-mpim/run] [venv] pycdo(+9/-2,1)* 2s ± pip freeze
certifi==2024.7.4
cftime==1.6.4
contourpy==1.2.1
cycler==0.12.1
fonttools==4.53.1
kiwisolver==1.4.5
matplotlib==3.9.2
netCDF4==1.7.1.post2
numpy==2.0.1
packaging==24.1
pandas==2.2.2
pillow==10.4.0
pybind11 @ file:///home/m/m300433/.spack/stage/spack-stage-py-pybind11-master-tk6wmiycbjcouz63kj6uixo7tkiv3tgw/spack-src
PyCdo @ file:///work/mh0287/m300433/PyCdo
pyparsing==3.1.2
python-dateutil==2.9.0.post0
pytz==2024.1
six==1.16.0
tzdata==2024.1
xarray==2024.7.0
yac @ file:///work/mh0287/k202125/pycdo/icon-mpim/externals/yac/python
[m300433@l20345:/work/mh0287/k202125/pycdo/icon-mpim/run] [venv] pycdo(+9/-2,1)* ± git diff
diff --git a/run/checksuite.clm/simple_output.py b/run/checksuite.clm/simple_output.py
index 0d623d7a1c..cadd91b293 100755
--- a/run/checksuite.clm/simple_output.py
+++ b/run/checksuite.clm/simple_output.py
@@ -95,3 +95,11 @@ for t in range(no_timesteps):
v[t, :] = data.reshape((-1, len(clat), len(clon)))
print("Finish!", file=sys.stderr)
+ds = xr.open_dataset(args.filename)
+
+
+
+i = PyCdo.sinfon(ds.to_netcdf(),ds.nbytes)
+i.run()
+
+
diff --git a/run/clmexp.ICON_CLM.run b/run/clmexp.ICON_CLM.run
index 25e1a56990..1665d42b0c 100755
--- a/run/clmexp.ICON_CLM.run
+++ b/run/clmexp.ICON_CLM.run
@@ -678,8 +678,7 @@ EOF
# As the runscripts does not support mpmd programs we need this workaround.
# This does only works with slurm.
if [[ "$START" == *"srun"* ]]; then
- export PYTHONPATH=${basedir}/externals/yac/python:${PYTHONPATH}
- echo "PYTHONPATH=${PYTHONPATH}"
+ echo "PYTHONPATH=/work/mh0287/k202125/pycdo/venv/bin/"
cat > ${EXPDIR}/mpmd.conf << EOF
0 ${basedir}/run/checksuite.clm/simple_output.py output.nc atm_output,icon_atmos_grid,temp atm_output,icon_atmos_grid,rho --bounds -58 86 15 81 --output-interval PT1H
* ${MODEL}