E3SM-Project / scorpio

A high-level Parallel I/O Library for structured grid applications
Other
21 stars 16 forks source link

spio_hash.h not installed together with pio.h #556

Closed dqwu closed 10 months ago

dqwu commented 10 months ago

In pio.h, spio_hash.h is explicitly included: #include "spio_hash.h" /* Hash table implementation for ADIOS read */

However, this file is not installed together with pio.h under the include directory.

Steps to reproduce this issue on ANL Ubuntu 20 workstations:

module load cmake/3.20.5-zyz2eld
module load gcc/11.1.0-qsjmpcg
export PATH=/nfs/gce/projects/climate/software/linux-ubuntu20.04-x86_64/mpich/4.0/gcc-11.1.0/bin:$PATH

git clone https://github.com/E3SM-Project/scorpio.git
cd scorpio

mkdir build
cd build

ADIOS2_DIR=/nfs/gce/projects/climate/software/linux-ubuntu20.04-x86_64/adios2/2.9.1/mpich-4.0/gcc-11.1.0 \
CC=mpicc CXX=mpicxx FC=mpifort cmake -Wno-dev \
-DCMAKE_INSTALL_PREFIX=$HOME/spio \
-DWITH_ADIOS2=ON \
-DWITH_NETCDF=OFF \
-DPnetCDF_PATH=/nfs/gce/projects/climate/software/linux-ubuntu20.04-x86_64/pnetcdf/1.12.2/mpich-4.0/gcc-11.1.0 \
-DPIO_USE_MALLOC=ON \
..

make

make install

ls $HOME/spio/include/*.h

This issue was initially mentioned in #554 by a user of ESMF and SCORPIO:

I tried to compile scorpio with esmf. I included scorpio include path and adios2 include path. But I still got this error: In file included from /glade/.../esmf/src/Infrastructure/IO/src/ESMCI_IO_Handler.C:36: In file included from /glade/.../esmf/src/Infrastructure/IO/src/../include/ESMCI_PIO_Handler.h:45: /glade/.../scorpio/install/include/pio.h:71:10: fatal error: In file included from /glade/.../esmf/src/Infrastructure/IO/src/ESMCI_PIO_Handler.C:'spio_hash.h' file not found27:

jayeshkrishna commented 10 months ago

This issue can be reproduced by building a SCORPIO application with _ADIOS2 preproc defn,

${CXX} -D_ADIOS2 ... spio_hello.cpp