FluidityProject / fluidity

Fluidity
http://fluidity-project.org
Other
365 stars 115 forks source link

Undefined reference to vtk during make #328

Closed 100souci closed 3 years ago

100souci commented 3 years ago

Hello, I'm trying to install Fluidity from source on a cluster as root. I use Python 3.9, gnu 4, openmpi 4.0.4, PETSc v3.12.5. I compiled VTK 7.1.1 and installed it in the fluidity source folder. But when running make in the fluidity folder, I get the following error:

BUILD fluidity MKDIR bin LD ./bin/fluidity

Command was: /softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/bin/mpic++ -L/softs/SOURCES/FLUIDITY_GIT/Fluidity -L/softs/hdf5-gnu4/lib -I/softs/python/3.9.6-shared/include/python3.9 -DHAVE_NUMPY -I/softs/python/3.9.6-shared/lib/python3.9/site-packages/numpy/core/include -I/softs/SOURCES/FLUIDITY_GIT/Fluidity/include -I/softs/SOURCES/FLUIDITY_GIT/Fluidity/include/ -DHAVE_PETSC -I/softs/spud/include -I/softs/SOURCES/FLUIDITY_GIT/Fluidity/include/vtk-7.1 -DHAVE_VTK=1 -I/softs/SOURCES/FLUIDITY_GIT/Fluidity/include -I/softs/python/3.9.6-shared/include/python3.9 -I/softs/python/3.9.6-shared/lib/python3.9/site-packages/numpy/core/include/numpy -I/softs/SOURCES/FLUIDITY_GIT/Fluidity/include/vtk-7.1 -I/softs/python/3.9.6-shared/include/python3.9 -DHAVE_NUMPY -I/softs/python/3.9.6-shared/lib/python3.9/site-packages/numpy/core/include -O3 -I./include -o ./bin/fluidity main.o -L./lib -lfluidity ./lib/libadaptivity.a ./lib/libH5hutF.a ./lib/libH5hut.a -lhdf5_hl -lhdf5 -lz -ldl -lm ./lib/libvtkfortran.a /softs/SOURCES/FLUIDITY_GIT/Fluidity/lib/libspatialindex.a /softs/spud/lib/libspud.a ./lib/libjudy.a -lmba2d -Wl,-rpath,/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -Wl,-rpath,/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -Wl,-rpath,/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -Wl,-rpath,/softs/hdf5-gnu4/lib -L/softs/hdf5-gnu4/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -lpetsc -lHYPRE -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lml -lflapack -lfblas -lzoltan -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lparmetis -lmetis -lm -lz -lX11 -lstdc++ -ldl -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread -lrt -lquadmath -lstdc++ -ldl /softs/SOURCES/FLUIDITY_GIT/Fluidity/lib/liblapack.a -lpthread -lm -lstdc++ -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/python/3.9.6-shared/lib -lpython3.9 -Xlinker -export-dynamic -lcrypt -lpthread -ldl -lutil -lm -lm -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/softs/hdf5-gnu4/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lquadmath -lpthread -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/softs/hdf5-gnu4/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lquadmath -lpthread -L./lib -lblas -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/softs/hdf5-gnu4/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lquadmath -lpthread

Error was: ./lib/libfluidity.a(Mesh_Quality_C.o): In function mesh_quality_c': Mesh_Quality_C.cpp:(.text+0x2c): undefined reference tovtkPoints::New()' Mesh_Quality_C.cpp:(.text+0x34): undefined reference to vtkUnstructuredGrid::New()' Mesh_Quality_C.cpp:(.text+0x349): undefined reference tovtkMeshQuality::New()' Mesh_Quality_C.cpp:(.text+0x357): undefined reference to vtkDataSetAlgorithm::SetInputData(vtkDataSet*)' Mesh_Quality_C.cpp:(.text+0x39a): undefined reference tovtkDataSetAlgorithm::GetOutput()' Mesh_Quality_C.cpp:(.text+0x3a5): undefined reference to vtkFieldData::GetArray(int)' Mesh_Quality_C.cpp:(.text+0x3d7): undefined reference tovtkDataArray::GetTuple1(long long)' ./lib/libfluidity.a(VTK_interfaces.o): In function __vtk_interfaces_MOD_vtk_write_fields.constprop.1': VTK_interfaces.F90:(.text+0x6886): undefined reference tovtkwriteghostlevels_' ./lib/libfluidity.a(VTK_interfaces.o): In function __vtk_interfaces_MOD_vtk_write_fields': VTK_interfaces.F90:(.text+0xc87e): undefined reference tovtkwriteghostlevels_' collect2: error: ld returned 1 exit status

make: *** [bin/fluidity] Error 1

Could anyone help me with this please? Am I missing a VTK module? Or should I modify some environment variable?

Before running make, I ran the following commands: export PYTHON=/softs/python/3.9.6-shared/bin/python3.9 export PETSC_DIR=/softs/SOURCES/FLUIDITY_GIT/Fluidity/ export PETSC_DIR=/softs/SOURCES/FLUIDITY_GIT/Fluidity export PYTHONPATH=/softs/python/3.9.6-shared/lib/python3.9/site-packages export VTK_INCLUDE="/softs/SOURCES/FLUIDITY_GIT/Fluidity/include/vtk-7.1" export VTK_LIBS="/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib" export CFLAGS="-std=c99 -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib64"

./configure F77=mpif90 FC=mpif90 CXX=mpicxx CC=mpicc CXXFLAGS="-I$PETSC_DIR/include -I/softs/python/3.9.6-shared/include/python3.9 -I/softs/python/3.9.6-shared/lib/python3.9/site-packages/numpy/core/include/numpy -I$VTK_INCLUDE" LIBS="-L$PETSC_DIR/lib -L/softs/python/3.9.6-shared/lib -L$VTK_LIBS" --enable-2d-adaptivity --with-blas-dir=$PETSC_DIR --with-lapack=$PETSC_DIR/lib/liblapack.a --with-hdf5=/softs/hdf5-gnu4/bin/h5pcc --prefix=$PWD --with-libspud-root=/softs/spud

Summary:

Host OS: linux-gnu Host CPU: x86_64 Host vendor: unknown CC = /softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/bin/mpicc CXX = /softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/bin/mpic++ -std=gnu++11 FC = /softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/bin/mpif90 CFLAGS = -std=c99 -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib64 -Wall -O3 FFLAGS = -Wall -O3 AM_CPPFLAGS = -I/softs/hdf5-gnu4/include -DFC_MANGLING_LOWERCASE_SINGLE_UNDERSCORE -DPARALLEL_IO -DMPICH_IGNORE_CXX_SEEK AM_LDFLAGS = -L/softs/hdf5-gnu4/lib LIBS = -lhdf5 -lz -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/SOURCES/FLUIDITY_GIT/Fluidity/lib -lhdf5_hl -lhdf5 -lz -ldl -lm -lm HDF5_PREFIX = LUSTREROOT =

Many thanks in advance for your help.

stephankramer commented 3 years ago

Hm, not immediately clear what went wrong. The missing symbol vtkwriteghostlevels_ should be in the libvtkfortran.a library, a very old-fashioned fortran library that is built by fluidity, and which at that stage should be ready in lib/.

Could you give us the output of:

nm -A lib/libvtkfortran.a | grep -i vtkwriteghostlevel
100souci commented 3 years ago

Hello,

Here's the output: lib/libvtkfortran.a:vtkfortran.o:0000000000000040 T vtkwriteghostlevels

Thanks for your help!

stephankramer commented 3 years ago

OK, that's a little weird: vtkwriteghostlevels is a fortran subroutine, which depending on the fortran compiler gets some name-wrangling applied to the symbol name in the object file - typically something like: change to lower case and add a _. It appears the symbol name that it's produced when compiling that subroutine is different from what it expects when that subroutine is called (also from fortran); this typically happens when you use two different fortran compilers. However I cannot really see why that would happen in fluidity: the compiler used by libvtkfortran is set by our main configure (it seems we're not using libvtkfortran's own configure) by substituting FC in libvtkfortran/Makefile.in -> libvtkfortran/Makefile. The same should happen for the code that calls that routine which in femtools/ both use the exact same FC and configure should just substitute it with the FC that you have provided. One possibility is that you tried different configurations and didn't run make clean inbetween? Can you send me the config.log, femtools/Makefile and libvtkfortran/Makefile files?

100souci commented 3 years ago

I cloned Fluidity again and tried to install it in a new folder named /softs/Fluidity but I still get similar errors: BUILD fluidity MKDIR bin LD ./bin/fluidity

Command was: /softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/bin/mpic++ -L/softs/Fluidity -L/softs/hdf5-gnu4/lib -I/softs/python/3.9.6-shared/include/python3.9 -DHAVE_NUMPY -I/softs/python/3.9.6-shared/lib/python3.9/site-packages/numpy/core/include -I/softs/Fluidity/include -I/softs/Fluidity/include/ -DHAVE_PETSC -I/softs/spud/include -I/softs/Fluidity/include/vtk-7.1 -DHAVE_VTK=1 -I/softs/Fluidity/include -I/softs/python/3.9.6-shared/include/python3.9 -I/softs/python/3.9.6-shared/lib/python3.9/site-packages/numpy/core/include/numpy -I/softs/Fluidity/include/vtk-7.1 -I/softs/python/3.9.6-shared/include/python3.9 -DHAVE_NUMPY -I/softs/python/3.9.6-shared/lib/python3.9/site-packages/numpy/core/include -O3 -I./include -o ./bin/fluidity main.o -L./lib -lfluidity ./lib/libadaptivity.a ./lib/libH5hutF.a ./lib/libH5hut.a -lhdf5_hl -lhdf5 -lz -ldl -lm ./lib/libvtkfortran.a /softs/Fluidity/lib/libspatialindex.a /softs/spud/lib/libspud.a ./lib/libjudy.a -lmba2d -Wl,-rpath,/softs/Fluidity/lib -Wl,-rpath,/softs/Fluidity/lib -L/softs/Fluidity/lib -Wl,-rpath,/softs/Fluidity/lib -L/softs/Fluidity/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -Wl,-rpath,/softs/hdf5-gnu4/lib -L/softs/hdf5-gnu4/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -Wl,-rpath,/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -lpetsc -lHYPRE -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lml -lflapack -lfblas -lzoltan -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lparmetis -lmetis -lm -lz -lX11 -lstdc++ -ldl -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread -lrt -lquadmath -lstdc++ -ldl /softs/Fluidity/lib/liblapack.a -lpthread -lm -lstdc++ -L/softs/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/Fluidity/lib -L/softs/python/3.9.6-shared/lib -lpython3.9 -Xlinker -export-dynamic -lcrypt -lpthread -ldl -lutil -lm -lm -L/softs/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/softs/hdf5-gnu4/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lquadmath -lpthread -L/softs/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/softs/hdf5-gnu4/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lquadmath -lpthread -L./lib -lblas -L/softs/Fluidity/lib -L/softs/python/3.9.6-shared/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/softs/hdf5-gnu4/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/nccl_rdma_sharp_plugin/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/sharp/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hcoll/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/hmc/lib -L/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ucx/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lquadmath -lpthread

Error was: ./lib/libfluidity.a(SampleNetCDF.o): In function _GLOBAL__sub_I__ZN12SampleNetCDFC2Ev': SampleNetCDF.cpp:(.text.startup+0x28): undefined reference tovtkDebugLeaksManager::vtkDebugLeaksManager()' SampleNetCDF.cpp:(.text.startup+0x37): undefined reference to vtkDebugLeaksManager::~vtkDebugLeaksManager()' SampleNetCDF.cpp:(.text.startup+0x46): undefined reference tovtkObjectFactoryRegistryCleanup::vtkObjectFactoryRegistryCleanup()' SampleNetCDF.cpp:(.text.startup+0x55): undefined reference to vtkObjectFactoryRegistryCleanup::~vtkObjectFactoryRegistryCleanup()' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkopen': vtkfortran.cpp:(.text+0x5b5): undefined reference to vtkUnstructuredGrid::New()' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkwritemesh': vtkfortran.cpp:(.text+0x721): undefined reference to vtkPoints::New()' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkwritemeshd': vtkfortran.cpp:(.text+0xa11): undefined reference to vtkPoints::New()' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkwriteisn': vtkfortran.cpp:(.text+0xd06): undefined reference to vtkIntArray::New()' vtkfortran.cpp:(.text+0xdff): undefined reference tovtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0xe16): undefined reference to `vtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwritefsn': vtkfortran.cpp:(.text+0xec4): undefined reference tovtkFloatArray::New()' vtkfortran.cpp:(.text+0xfcf): undefined reference to vtkFieldData::AddArray(vtkAbstractArray*)' vtkfortran.cpp:(.text+0xfe6): undefined reference tovtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwritedsn': vtkfortran.cpp:(.text+0x1094): undefined reference tovtkDoubleArray::New()' vtkfortran.cpp:(.text+0x119f): undefined reference to `vtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x11b6): undefined reference to vtkDataSetAttributes::SetActiveAttribute(char const*, int)' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkwritefvn': vtkfortran.cpp:(.text+0x126b): undefined reference to vtkFloatArray::New()' vtkfortran.cpp:(.text+0x12da): undefined reference tovtkDataArray::SetTuple3(long long, double, double, double)' vtkfortran.cpp:(.text+0x12f8): undefined reference to vtkFieldData::AddArray(vtkAbstractArray*)' vtkfortran.cpp:(.text+0x1312): undefined reference tovtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwritedvn': vtkfortran.cpp:(.text+0x13cb): undefined reference tovtkDoubleArray::New()' vtkfortran.cpp:(.text+0x1431): undefined reference to vtkDataArray::SetTuple3(long long, double, double, double)' vtkfortran.cpp:(.text+0x144f): undefined reference tovtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x1469): undefined reference to vtkDataSetAttributes::SetActiveAttribute(char const*, int)' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkwriteftn': vtkfortran.cpp:(.text+0x1537): undefined reference to vtkFloatArray::New()' vtkfortran.cpp:(.text+0x1605): undefined reference tovtkDataArray::SetTuple9(long long, double, double, double, double, double, double, double, double, double)' vtkfortran.cpp:(.text+0x1627): undefined reference to vtkFieldData::AddArray(vtkAbstractArray*)' vtkfortran.cpp:(.text+0x1641): undefined reference tovtkDataSetAttributes::SetActiveAttribute(char const, int)' vtkfortran.cpp:(.text+0x1654): undefined reference to `vtkDataSetAttributes::SetTensors(vtkDataArray)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwritedtn': vtkfortran.cpp:(.text+0x1731): undefined reference tovtkDoubleArray::New()' vtkfortran.cpp:(.text+0x17dd): undefined reference to vtkDataArray::SetTuple9(long long, double, double, double, double, double, double, double, double, double)' vtkfortran.cpp:(.text+0x17fb): undefined reference tovtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x1815): undefined reference to `vtkDataSetAttributes::SetActiveAttribute(char const, int)' vtkfortran.cpp:(.text+0x1828): undefined reference to vtkDataSetAttributes::SetTensors(vtkDataArray*)' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkwriteisc': vtkfortran.cpp:(.text+0x18e6): undefined reference to vtkIntArray::New()' vtkfortran.cpp:(.text+0x19df): undefined reference tovtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x19f6): undefined reference to `vtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwriteghostlevels_': vtkfortran.cpp:(.text+0x1a97): undefined reference tovtkUnsignedCharArray::New()' vtkfortran.cpp:(.text+0x1b9f): undefined reference to vtkFieldData::AddArray(vtkAbstractArray*)' vtkfortran.cpp:(.text+0x1bb6): undefined reference tovtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwritefsc': vtkfortran.cpp:(.text+0x1c14): undefined reference tovtkFloatArray::New()' vtkfortran.cpp:(.text+0x1d1f): undefined reference to `vtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x1d36): undefined reference to vtkDataSetAttributes::SetActiveAttribute(char const*, int)' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkwritedsc': vtkfortran.cpp:(.text+0x1de4): undefined reference to vtkDoubleArray::New()' vtkfortran.cpp:(.text+0x1eef): undefined reference tovtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x1f06): undefined reference to `vtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwritefvc': vtkfortran.cpp:(.text+0x1fbb): undefined reference tovtkFloatArray::New()' vtkfortran.cpp:(.text+0x202a): undefined reference to vtkDataArray::SetTuple3(long long, double, double, double)' vtkfortran.cpp:(.text+0x2048): undefined reference tovtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x2062): undefined reference to `vtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwritedvc': vtkfortran.cpp:(.text+0x211b): undefined reference tovtkDoubleArray::New()' vtkfortran.cpp:(.text+0x2181): undefined reference to vtkDataArray::SetTuple3(long long, double, double, double)' vtkfortran.cpp:(.text+0x219f): undefined reference tovtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x21b9): undefined reference to `vtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkwriteftc': vtkfortran.cpp:(.text+0x2287): undefined reference tovtkFloatArray::New()' vtkfortran.cpp:(.text+0x2355): undefined reference to vtkDataArray::SetTuple9(long long, double, double, double, double, double, double, double, double, double)' vtkfortran.cpp:(.text+0x2377): undefined reference tovtkFieldData::AddArray(vtkAbstractArray)' vtkfortran.cpp:(.text+0x2391): undefined reference to `vtkDataSetAttributes::SetActiveAttribute(char const, int)' vtkfortran.cpp:(.text+0x23a4): undefined reference to vtkDataSetAttributes::SetTensors(vtkDataArray*)' ./lib/libvtkfortran.a(vtkfortran.o): In functionvtkwritedtc': vtkfortran.cpp:(.text+0x2481): undefined reference to vtkDoubleArray::New()' vtkfortran.cpp:(.text+0x252d): undefined reference tovtkDataArray::SetTuple9(long long, double, double, double, double, double, double, double, double, double)' vtkfortran.cpp:(.text+0x254b): undefined reference to vtkFieldData::AddArray(vtkAbstractArray*)' vtkfortran.cpp:(.text+0x2565): undefined reference tovtkDataSetAttributes::SetActiveAttribute(char const, int)' vtkfortran.cpp:(.text+0x2578): undefined reference to `vtkDataSetAttributes::SetTensors(vtkDataArray)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtkclose': vtkfortran.cpp:(.text+0x2607): undefined reference tovtkXMLUnstructuredGridWriter::New()' vtkfortran.cpp:(.text+0x260f): undefined reference to vtkZLibDataCompressor::New()' vtkfortran.cpp:(.text+0x262d): undefined reference tovtkXMLWriter::SetDataModeToAppended()' vtkfortran.cpp:(.text+0x2648): undefined reference to vtkXMLWriter::SetInputData(vtkDataObject*)' vtkfortran.cpp:(.text+0x2669): undefined reference tovtkXMLWriter::Write()' ./lib/libvtkfortran.a(vtkfortran.o): In function _vtkpclose_nointerleave': vtkfortran.cpp:(.text+0x26be): undefined reference tovtkXMLPUnstructuredGridWriter::New()' vtkfortran.cpp:(.text+0x26c6): undefined reference to vtkZLibDataCompressor::New()' vtkfortran.cpp:(.text+0x26d1): undefined reference tovtkXMLWriter::SetDataModeToBinary()' vtkfortran.cpp:(.text+0x28a0): undefined reference to vtkXMLWriter::SetInputData(vtkDataObject*)' vtkfortran.cpp:(.text+0x28c1): undefined reference tovtkXMLWriter::SetDataModeToAppended()' vtkfortran.cpp:(.text+0x28fb): undefined reference to vtkXMLWriter::Write()' vtkfortran.cpp:(.text+0x2999): undefined reference tovtkMPIController::New()' vtkfortran.cpp:(.text+0x29a1): undefined reference to vtkMPICommunicator::GetWorldCommunicator()' vtkfortran.cpp:(.text+0x29ac): undefined reference tovtkMPIController::SetCommunicator(vtkMPICommunicator)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtksetactivescalars': vtkfortran.cpp:(.text+0x2c3d): undefined reference tovtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtksetactivevectors': vtkfortran.cpp:(.text+0x2ce0): undefined reference tovtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function vtksetactivetensors': vtkfortran.cpp:(.text+0x2d80): undefined reference tovtkDataSetAttributes::SetActiveAttribute(char const, int)' ./lib/libvtkfortran.a(vtkfortran.o): In function _GLOBAL__sub_I__Z23pvtu_search_and_replaceP12TiXmlElementPKc': vtkfortran.cpp:(.text.startup+0x28): undefined reference tovtkDebugLeaksManager::vtkDebugLeaksManager()' vtkfortran.cpp:(.text.startup+0x37): undefined reference to vtkDebugLeaksManager::~vtkDebugLeaksManager()' vtkfortran.cpp:(.text.startup+0x46): undefined reference tovtkObjectFactoryRegistryCleanup::vtkObjectFactoryRegistryCleanup()' vtkfortran.cpp:(.text.startup+0x55): undefined reference to vtkObjectFactoryRegistryCleanup::~vtkObjectFactoryRegistryCleanup()' ./lib/libvtkfortran.a(vtkmeshio.o): In functionCheckConnected(vtkUnstructuredGrid, int, int, long long, long long, vtkIdList, vtkIdList) [clone .constprop.27]': vtkmeshio.cpp:(.text+0x807): undefined reference to vtkIdList::New()' vtkmeshio.cpp:(.text+0x80f): undefined reference tovtkIdList::New()' vtkmeshio.cpp:(.text+0x81c): undefined reference to vtkIdList::SetNumberOfIds(long long)' vtkmeshio.cpp:(.text+0x826): undefined reference tovtkIdList::SetNumberOfIds(long long)' ./lib/libvtkfortran.a(vtkmeshio.o): In function `CheckConnected(vtkUnstructuredGrid, int, int, long long, long long, vtkIdList, vtkIdList)': vtkmeshio.cpp:(.text+0xa9d): undefined reference to vtkIdList::New()' vtkmeshio.cpp:(.text+0xaa5): undefined reference tovtkIdList::New()' vtkmeshio.cpp:(.text+0xab2): undefined reference to vtkIdList::SetNumberOfIds(long long)' vtkmeshio.cpp:(.text+0xabc): undefined reference tovtkIdList::SetNumberOfIds(long long)' ./lib/libvtkfortran.a(vtkmeshio.o): In function readVTKFile(char const*, int*, int*, int*, int*, int*, int*, _Field_Info*, double**, double**, double**, int**, int**, double**, double**, int, int)': vtkmeshio.cpp:(.text+0x173f): undefined reference tovtkXMLPUnstructuredGridReader::New()' vtkmeshio.cpp:(.text+0x176a): undefined reference to vtkXMLPUnstructuredGridReader::GetOutput()' vtkmeshio.cpp:(.text+0x186a): undefined reference tovtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x1897): undefined reference to vtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x1959): undefined reference tovtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x1989): undefined reference to vtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x238a): undefined reference tovtkAlgorithm::ReleaseDataFlagOn()' vtkmeshio.cpp:(.text+0x23ab): undefined reference to vtkAlgorithm::ReleaseDataFlagOn()' vtkmeshio.cpp:(.text+0x23cc): undefined reference tovtkAlgorithm::ReleaseDataFlagOn()' vtkmeshio.cpp:(.text+0x261c): undefined reference to vtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x2c74): undefined reference tovtkDataSetReader::New()' vtkmeshio.cpp:(.text+0x2d58): undefined reference to vtkXMLUnstructuredGridReader::New()' vtkmeshio.cpp:(.text+0x2d83): undefined reference tovtkXMLUnstructuredGridReader::GetOutput()' vtkmeshio.cpp:(.text+0x2e74): undefined reference to vtkIdList::New()' vtkmeshio.cpp:(.text+0x2e7c): undefined reference tovtkIdList::New()' vtkmeshio.cpp:(.text+0x2e8c): undefined reference to vtkIdList::SetNumberOfIds(long long)' vtkmeshio.cpp:(.text+0x2e99): undefined reference tovtkIdList::SetNumberOfIds(long long)' vtkmeshio.cpp:(.text+0x35a7): undefined reference to vtkDataSetReader::GetUnstructuredGridOutput()' vtkmeshio.cpp:(.text+0x39a7): undefined reference tovtkFieldData::GetArray(int)' ./lib/libvtkfortran.a(vtkmeshio.o): In function fgetvtksizes(char*, int*, int*, int*, int*, int*, int*, int*, int*)': vtkmeshio.cpp:(.text+0x4b90): undefined reference tovtkXMLPUnstructuredGridReader::New()' vtkmeshio.cpp:(.text+0x4bb8): undefined reference to vtkXMLPUnstructuredGridReader::GetOutput()' vtkmeshio.cpp:(.text+0x4c46): undefined reference tovtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x4c7f): undefined reference to vtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x4d47): undefined reference tovtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x4d77): undefined reference to vtkFieldData::GetArray(int)' vtkmeshio.cpp:(.text+0x58ea): undefined reference tovtkDataSetReader::New()' vtkmeshio.cpp:(.text+0x59f1): undefined reference to vtkXMLUnstructuredGridReader::New()' vtkmeshio.cpp:(.text+0x5a1b): undefined reference tovtkXMLUnstructuredGridReader::GetOutput()' vtkmeshio.cpp:(.text+0x5c05): undefined reference to vtkDataSetReader::GetUnstructuredGridOutput()' ./lib/libvtkfortran.a(vtkmeshio.o): In function_GLOBALsub_I__Z10AddToFrontPxx': vtkmeshio.cpp:(.text.startup+0x28): undefined reference to vtkDebugLeaksManager::vtkDebugLeaksManager()' vtkmeshio.cpp:(.text.startup+0x37): undefined reference tovtkDebugLeaksManager::~vtkDebugLeaksManager()' vtkmeshio.cpp:(.text.startup+0x46): undefined reference to vtkObjectFactoryRegistryCleanup::vtkObjectFactoryRegistryCleanup()' vtkmeshio.cpp:(.text.startup+0x55): undefined reference tovtkObjectFactoryRegistryCleanup::~vtkObjectFactoryRegistryCleanup()' ./lib/libfluidity.a(vtk_read_files.o): In function `_GLOBALsub_I_vtk_getsizes': vtk_read_files.cpp:(.text.startup+0x28): undefined reference to vtkDebugLeaksManager::vtkDebugLeaksManager()' vtk_read_files.cpp:(.text.startup+0x37): undefined reference tovtkDebugLeaksManager::~vtkDebugLeaksManager()' vtk_read_files.cpp:(.text.startup+0x46): undefined reference to vtkObjectFactoryRegistryCleanup::vtkObjectFactoryRegistryCleanup()' vtk_read_files.cpp:(.text.startup+0x55): undefined reference tovtkObjectFactoryRegistryCleanup::~vtkObjectFactoryRegistryCleanup()' ./lib/libfluidity.a(Mesh_Quality_C.o): In function mesh_quality_c': Mesh_Quality_C.cpp:(.text+0x2c): undefined reference tovtkPoints::New()' Mesh_Quality_C.cpp:(.text+0x34): undefined reference to vtkUnstructuredGrid::New()' Mesh_Quality_C.cpp:(.text+0x349): undefined reference tovtkMeshQuality::New()' Mesh_Quality_C.cpp:(.text+0x357): undefined reference to vtkDataSetAlgorithm::SetInputData(vtkDataSet*)' Mesh_Quality_C.cpp:(.text+0x39a): undefined reference tovtkDataSetAlgorithm::GetOutput()' Mesh_Quality_C.cpp:(.text+0x3a5): undefined reference to vtkFieldData::GetArray(int)' Mesh_Quality_C.cpp:(.text+0x3d7): undefined reference tovtkDataArray::GetTuple1(long long)' collect2: error: ld returned 1 exit status

Here are the requested files:

config.log Makefile_femtools.txt Makefile_libvtkfortran.txt

Thank you.

stephankramer commented 3 years ago

It may not look like it (more errors!) but this is progress. The issue you reported has now disappeared which you can see from:

./lib/libvtkfortran.a(vtkfortran.o): In function vtkwriteghostlevels_':
vtkfortran.cpp:(.text+0x1a97): undefined reference to vtkUnsignedCharArray::New()' 

i.e. it has now found vtkghostwritelevels_ in libvtkfortran, but the issue is now that it's not able to find many symbols that should be provided by the external vtk libraries. If I look at the link line it's missing a lot of -LvtkXXX (there should be a whole array of them). This looks to be because fluidity's configure fails to find the required flags through it's favoured method (which is marked with Checking for VTK automagic in your config.log) which is asking cmake. That method fails, and it then goes on to try to figure it out on its own but I think that figure-it-out-on-your-own method only works for older versions. Fluidity's configure thinks it's figured it out, but the test isn't very good - so it should have failed. Check the output of:

cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=COMPILE

and

cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=LINK

I suspect at the moment it just says "VTK not found". So it requires the cmake modules that get produced by your vtk build to be findable by cmake.

100souci commented 3 years ago

Yes, you're right it returns "VTK not found". Do you know how I could help cmake find the modules? Is there an argument I shoud configure when running ccmake on my VTK source folder? I attach the screenshots. cmake1 cmake2

stephankramer commented 3 years ago

I'm afraid I'm not too hot on cmake. Hopefully @tmbgreaves or @jrper can chime in (we're going to need some instructions for people that build their own vtk >= 7). If you've installed vtk through cmake it may have already installed in lib/cmake/ If so I believe you can set CMAKE_PREFIX_PATH for the cmake that's called from fluidity's configure - set it to whatever you've used for CMAKE_INSTALL_PREFIX when building vtk (and installing). I'm not 100% sure but I think this is one of the few cmake variables that is picked as environment variable. If not you can add -DCMAKE_INSTALL_PREFIX=... but you would have to hack or configure to do so (change the relevant lines in configure.in and run autoconf)

100souci commented 3 years ago

Thanks, setting CMAKE_PREFIX_PATH has solved this error and now the two cmake commands you mentionned can find VTK. This is progress as you said, however I have another error now when running make install: BUILD fldecomp MKDIR bin g++: error: lib/libvtksys-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonCore-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonMath-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonMisc-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonSystem-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonTransforms-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonDataModel-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonColor-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonExecutionModel-7.1.so.1: No such file or directory g++: error: lib/libvtkDICOMParser-7.1.so.1: No such file or directory g++: error: lib/libvtkzlib-7.1.so.1: No such file or directory g++: error: lib/libvtkmetaio-7.1.so.1: No such file or directory g++: error: lib/libvtkjpeg-7.1.so.1: No such file or directory g++: error: lib/libvtkpng-7.1.so.1: No such file or directory g++: error: lib/libvtktiff-7.1.so.1: No such file or directory g++: error: lib/libvtkIOImage-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersCore-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonComputationalGeometry-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersGeneral-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingCore-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingFourier-7.1.so.1: No such file or directory g++: error: lib/libvtkalglib-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersStatistics-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersExtraction-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersSources-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersGeometry-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingCore-7.1.so.1: No such file or directory g++: error: lib/libvtkInteractionStyle-7.1.so.1: No such file or directory g++: error: lib/libvtkglew-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingOpenGL2-7.1.so.1: No such file or directory g++: error: lib/libvtkTestingRendering-7.1.so.1: No such file or directory g++: error: lib/libvtkIOCore-7.1.so.1: No such file or directory g++: error: lib/libvtkIOLegacy-7.1.so.1: No such file or directory g++: error: lib/libvtkexpat-7.1.so.1: No such file or directory g++: error: lib/libvtkIOXMLParser-7.1.so.1: No such file or directory g++: error: lib/libvtkIOXML-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingMath-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingVolume-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingVolumeOpenGL2-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingSources-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersHybrid-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingStencil-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersModeling-7.1.so.1: No such file or directory g++: error: lib/libvtkverdict-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersVerdict-7.1.so.1: No such file or directory g++: error: lib/libvtkParallelCore-7.1.so.1: No such file or directory g++: error: lib/libvtkIOParallelXML-7.1.so.1: No such file or directory g++: error: lib/libvtkParallelMPI-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingColor-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingGeneral-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingHybrid-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingMorphological-7.1.so.1: No such file or directory g++: error: lib/libvtkfreetype-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingFreeType-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingAnnotation-7.1.so.1: No such file or directory g++: error: lib/libvtkInteractionWidgets-7.1.so.1: No such file or directory g++: error: lib/libvtkInteractionImage-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingOpenGL2-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingStatistics-7.1.so.1: No such file or directory g++: error: lib/libvtkTestingGenericBridge-7.1.so.1: No such file or directory g++: error: lib/libvtkWrappingTools-7.1.a: No such file or directory g++: error: lib/libvtkWrappingPython39Core-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingMath-7.1.so.1: No such file or directory g++: error: lib/libvtkverdict-7.1.so.1: No such file or directory g++: error: lib/libvtkParallelCore-7.1.so.1: No such file or directory g++: error: lib/libvtkIOLegacy-7.1.so.1: No such file or directory g++: error: lib/libvtkInteractionWidgets-7.1.so.1: No such file or directory g++: error: lib/libvtkInteractionStyle-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersExtraction-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersStatistics-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingFourier-7.1.so.1: No such file or directory g++: error: lib/libvtkalglib-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingVolume-7.1.so.1: No such file or directory g++: error: lib/libvtkIOXML-7.1.so.1: No such file or directory g++: error: lib/libvtkIOXMLParser-7.1.so.1: No such file or directory g++: error: lib/libvtkIOCore-7.1.so.1: No such file or directory g++: error: lib/libvtkexpat-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersHybrid-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersModeling-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingHybrid-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingAnnotation-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingColor-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingFreeType-7.1.so.1: No such file or directory g++: error: lib/libvtkfreetype-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingOpenGL2-7.1.so.1: No such file or directory g++: error: lib/libvtkIOImage-7.1.so.1: No such file or directory g++: error: lib/libvtkDICOMParser-7.1.so.1: No such file or directory g++: error: lib/libvtkmetaio-7.1.so.1: No such file or directory g++: error: lib/libvtkpng-7.1.so.1: No such file or directory g++: error: lib/libvtktiff-7.1.so.1: No such file or directory g++: error: lib/libvtkzlib-7.1.so.1: No such file or directory g++: error: lib/libvtkjpeg-7.1.so.1: No such file or directory g++: error: lib/libvtkRenderingCore-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonColor-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersSources-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersGeneral-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonComputationalGeometry-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersGeometry-7.1.so.1: No such file or directory g++: error: lib/libvtkFiltersCore-7.1.so.1: No such file or directory g++: error: lib/libvtkglew-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingGeneral-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingSources-7.1.so.1: No such file or directory g++: error: lib/libvtkImagingCore-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonExecutionModel-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonDataModel-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonMisc-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonSystem-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonTransforms-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonMath-7.1.so.1: No such file or directory g++: error: lib/libvtksys-7.1.so.1: No such file or directory g++: error: lib/libvtkCommonCore-7.1.so.1: No such file or directory gmake[2]: [fldecomp] Error 1 gmake[1]: [fldecomp] Error 2

I don't understand why since these librairies are located in lib/ and the cmake commands can find them:

cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=COMPILE -I/softs/Fluidity/include/vtk-7.1 -I/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/include/openmpi -I/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/include/openmpi/opal/mca/hwloc/hwloc201/hwloc/include -I/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/include/openmpi/opal/mca/event/libevent2022/libevent -I/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/include/openmpi/opal/mca/event/libevent2022/libevent/include -I/softs/hpcx-v2.7.0-gcc-MLNX_OFED_LINUX-4.7-1.0.0.1-redhat7.7-x86_64/ompi/include -I/softs/python/3.9.6-shared/include/python3.9

cmake --find-package -DNAME=VTK -DCOMPILER_ID=gcc -DLANGUAGE=Fortran -DMODE=LINK lib/libvtksys-7.1.so.1 lib/libvtkCommonCore-7.1.so.1 lib/libvtkCommonMath-7.1.so.1 lib/libvtkCommonMisc-7.1.so.1 lib/libvtkCommonSystem-7.1.so.1 lib/libvtkCommonTransforms-7.1.so.1 lib/libvtkCommonDataModel-7.1.so.1 lib/libvtkCommonColor-7.1.so.1 lib/libvtkCommonExecutionModel-7.1.so.1 lib/libvtkDICOMParser-7.1.so.1 lib/libvtkzlib-7.1.so.1 lib/libvtkmetaio-7.1.so.1 lib/libvtkjpeg-7.1.so.1 lib/libvtkpng-7.1.so.1 lib/libvtktiff-7.1.so.1 lib/libvtkIOImage-7.1.so.1 lib/libvtkFiltersCore-7.1.so.1 lib/libvtkCommonComputationalGeometry-7.1.so.1 lib/libvtkFiltersGeneral-7.1.so.1 lib/libvtkImagingCore-7.1.so.1 lib/libvtkImagingFourier-7.1.so.1 lib/libvtkalglib-7.1.so.1 lib/libvtkFiltersStatistics-7.1.so.1 lib/libvtkFiltersExtraction-7.1.so.1 lib/libvtkFiltersSources-7.1.so.1 lib/libvtkFiltersGeometry-7.1.so.1 lib/libvtkRenderingCore-7.1.so.1 lib/libvtkInteractionStyle-7.1.so.1 lib/libvtkglew-7.1.so.1 lib/libvtkRenderingOpenGL2-7.1.so.1 lib/libvtkTestingRendering-7.1.so.1 lib/libvtkIOCore-7.1.so.1 lib/libvtkIOLegacy-7.1.so.1 lib/libvtkexpat-7.1.so.1 lib/libvtkIOXMLParser-7.1.so.1 lib/libvtkIOXML-7.1.so.1 lib/libvtkImagingMath-7.1.so.1 lib/libvtkRenderingVolume-7.1.so.1 lib/libvtkRenderingVolumeOpenGL2-7.1.so.1 lib/libvtkImagingSources-7.1.so.1 lib/libvtkFiltersHybrid-7.1.so.1 lib/libvtkImagingStencil-7.1.so.1 lib/libvtkFiltersModeling-7.1.so.1 lib/libvtkverdict-7.1.so.1 lib/libvtkFiltersVerdict-7.1.so.1 lib/libvtkParallelCore-7.1.so.1 lib/libvtkIOParallelXML-7.1.so.1 lib/libvtkParallelMPI-7.1.so.1 lib/libvtkImagingColor-7.1.so.1 lib/libvtkImagingGeneral-7.1.so.1 lib/libvtkImagingHybrid-7.1.so.1 lib/libvtkImagingMorphological-7.1.so.1 lib/libvtkfreetype-7.1.so.1 lib/libvtkRenderingFreeType-7.1.so.1 lib/libvtkRenderingAnnotation-7.1.so.1 lib/libvtkInteractionWidgets-7.1.so.1 lib/libvtkInteractionImage-7.1.so.1 lib/libvtkImagingOpenGL2-7.1.so.1 lib/libvtkImagingStatistics-7.1.so.1 /softs/python/3.9.6-shared/lib/libpython3.9.so.1.0 lib/libvtkTestingGenericBridge-7.1.so.1 lib/libvtkWrappingTools-7.1.a lib/libvtkWrappingPython39Core-7.1.so.1 lib/libvtkImagingMath-7.1.so.1 lib/libvtkverdict-7.1.so.1 lib/libvtkParallelCore-7.1.so.1 lib/libvtkIOLegacy-7.1.so.1 lib/libvtkInteractionWidgets-7.1.so.1 lib/libvtkInteractionStyle-7.1.so.1 lib/libvtkFiltersExtraction-7.1.so.1 lib/libvtkFiltersStatistics-7.1.so.1 lib/libvtkImagingFourier-7.1.so.1 lib/libvtkalglib-7.1.so.1 lib/libvtkRenderingVolume-7.1.so.1 lib/libvtkIOXML-7.1.so.1 lib/libvtkIOXMLParser-7.1.so.1 lib/libvtkIOCore-7.1.so.1 lib/libvtkexpat-7.1.so.1 lib/libvtkFiltersHybrid-7.1.so.1 lib/libvtkFiltersModeling-7.1.so.1 lib/libvtkImagingHybrid-7.1.so.1 lib/libvtkRenderingAnnotation-7.1.so.1 lib/libvtkImagingColor-7.1.so.1 lib/libvtkRenderingFreeType-7.1.so.1 lib/libvtkfreetype-7.1.so.1 lib/libvtkRenderingOpenGL2-7.1.so.1 lib/libvtkIOImage-7.1.so.1 lib/libvtkDICOMParser-7.1.so.1 lib/libvtkmetaio-7.1.so.1 lib/libvtkpng-7.1.so.1 -lm lib/libvtktiff-7.1.so.1 lib/libvtkzlib-7.1.so.1 lib/libvtkjpeg-7.1.so.1 /usr/lib64/libm.so lib/libvtkRenderingCore-7.1.so.1 lib/libvtkCommonColor-7.1.so.1 lib/libvtkFiltersSources-7.1.so.1 lib/libvtkFiltersGeneral-7.1.so.1 lib/libvtkCommonComputationalGeometry-7.1.so.1 lib/libvtkFiltersGeometry-7.1.so.1 lib/libvtkFiltersCore-7.1.so.1 lib/libvtkglew-7.1.so.1 /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so /usr/lib64/libXext.so /usr/lib64/libXt.so lib/libvtkImagingGeneral-7.1.so.1 lib/libvtkImagingSources-7.1.so.1 lib/libvtkImagingCore-7.1.so.1 lib/libvtkCommonExecutionModel-7.1.so.1 lib/libvtkCommonDataModel-7.1.so.1 lib/libvtkCommonMisc-7.1.so.1 lib/libvtkCommonSystem-7.1.so.1 lib/libvtkCommonTransforms-7.1.so.1 lib/libvtkCommonMath-7.1.so.1 lib/libvtksys-7.1.so.1 -ldl lib/libvtkCommonCore-7.1.so.1 /softs/python/3.9.6-shared/lib/libpython3.9.so.1.0 -Wl,-rpath,/softs/Fluidity/lib

This is the configure command I launch:

./configure F77=mpif90 FC=mpif90 CXX=mpicxx CC=mpicc CXXFLAGS="-I$PETSC_DIR/include -I/softs/python/3.9.6-shared/include/python3.9 -I/softs/python/3.9.6-shared/lib/python3.9/site-packages/numpy/core/include/numpy -I$VTK_INCLUDE" LIBS="-L$PETSC_DIR/lib -L/softs/python/3.9.6-shared/lib -L$VTK_LIBS" --enable-2d-adaptivity --with-blas-dir=$PETSC_DIR --with-lapack=$PETSC_DIR/lib/liblapack.a --with-hdf5=/softs/hdf5-gnu4/bin/h5pcc --prefix=$PWD --with-libspud-root=/softs/spud CMAKE_PREFIX_PATH=/softs/Fluidity

stephankramer commented 3 years ago

Progress again - as it's now succesfully linked fluidity itself. It's now trying to link fldecomp and failing. I think that's because your cmake output provides relative rather than absolute paths to the libraries (for reasons I don't really understand). This has worked when linking fluidity because that happens in the main directory of fluidity, so it can find lib/libVTKXXX from there. fldecomp however is linked in fldecomp/. You might be able to trick it by symlinking to the lib directory from fldecomp:

cd fldecomp/
ln -s ../lib/
100souci commented 3 years ago

The symlink trick worked. The make install was able to complete. Now I'll have to wait for our users to test if everything works as they want. Thank you so much for your help.