cyclops-community / ctf

Cyclops Tensor Framework: parallel arithmetic on multidimensional arrays
Other
194 stars 53 forks source link

ctf header error during installation on perlmutter #163

Closed hongyx11 closed 4 months ago

hongyx11 commented 4 months ago

Hi CTF developer,

I'm trying to install CTF on perlmutter https://docs.nersc.gov/systems/perlmutter/ A cray system. clone the repo

git clone https://github.com/cyclops-community/ctf.git
../configure --install-dir=/pscratch/sd/y/yuxihong/graphclustering/ctf/ctfinstall --build-dir=/pscratch/sd/y/yuxihong/graphclustering/ctf/build CXX=CC CXXFLAGS="-std=c++17" LIB_PATH=-L${MKLROOT}/lib LIBS="-lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl"
(base) yuxihong@perlmutter:login32:/pscratch/sd/y/yuxihong/graphclustering/ctf/build> ../configure --install-dir=/pscratch/sd/y/yuxihong/graphclustering/ctf/ctfinstall --build-dir=/pscratch/sd/y/yuxihong/graphclustering/ctf/build CXX=CC CXXFLAGS="-std=c++17" LIB_PATH=-L${MKLROOT}/lib LIBS="-lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl"
LD_LIB_PATH was unspecified but LIB_PATH was, setting LD_LIB_PATH=-L/global/common/software/m4293/intelmkl/mkl/2023.2.0/lib.
LD_LIBS was unspecified but LIBS was, setting LD_LIBS=-lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl.
Checking compiler type/version... Using GNU compilers.
Checking whether __APPLE__ is defined... no.
Checking compiler (CXX)... successful.
Checking flags (CXXFLAGS)... successful.
Checking availability of C++11... successful.
Checking for MPI... MPI works.
Checking for OpenMP... using OpenMP via -fopenmp flag.
Checking for static BLAS library... static BLAS library found, with underscores.
Checking for availability of static batched gemm... available, will build with -DUSE_BATCH_GEMM.
Checking for dynamic BLAS library... dynamic BLAS library found, with underscores.
Checking for availability of dynamic batched gemm... Checking for static LAPACK library... static LAPACK found.
Checking for dynamic LAPACK library... dynamic LAPACK found.
Checking for sparse MKL routines... sparse MKL found.
Checking for static ScaLAPACK... static SCALAPACK found.
Checking for dynamic ScaLAPACK... dynamic SCALAPACK found.
Checking for HPTT (optimized transposition library)... HPTT does not work, will use built-in transpose kernel.
Checking whether to use CUDA... CUDA will not be used.
A config.mk file has been created (to adjust all settings edit the config.mk file manually or rerun ./configure to create a new one).
A setup.py file has been created (to adjust all settings edit the setup.py file manually or rerun ./configure to create a new one).
Configure finished successfully (see how-did-i-configure to determine how script was executed).

I can successfully build the library. After I install the library using make install, I look into the header ctf.hpp. I found these error in the header.


   46 #ifdef CRITTER
   47 cp: cannot stat 'critter_mpi.h': No such file or directory
   48 sed: can't read critter_mpi.h.tmp.concat: No such file or directory
   49 awk: fatal: cannot open file `critter_mpi.h.tmp.concat' for reading (No such file or directory)
   50 rm: cannot remove 'critter_mpi.h.tmp.concat': No such file or directory
   51 cp: cannot stat 'critter_symbol.h': No such file or directory
   52 sed: can't read critter_symbol.h.tmp.concat: No such file or directory
   53 awk: fatal: cannot open file `critter_symbol.h.tmp.concat' for reading (No such file or directory)
   54 rm: cannot remove 'critter_symbol.h.tmp.concat': No such file or directory
   55 #else

 6060 #ifdef _OPENMP
 6061 cp: cannot stat 'omp.h': No such file or directory
 6062 sed: can't read omp.h.tmp.concat: No such file or directory
 6063 awk: fatal: cannot open file `omp.h.tmp.concat' for reading (No such file or directory)
 6064 rm: cannot remove 'omp.h.tmp.concat': No such file or directory
 6065 #endif

I believe they are related to installation of the header. cd src/scripts && bash ./expand_includes.sh && cd .. the expansion the include.

May I ask do you have any solutions for this error?

Best, Yuxi

solomonik commented 4 months ago

Hi Yuxi, this looks like a bug due to recent changes, but should be specific to 'make install'. I would recommend to simply use the local build / make install is mostly intended to install system-wide or out of source, and simply copies the lib files and an expanded version of the header. If you include the header in the include repo directly it will work fine.

hongyx11 commented 4 months ago

Hi Edgar,

Got it, thanks for the suggestions. It works!

Best, Yuxi