I was considering asking this in 'Installation & Compilation', but seeing as the relevant code appears to have been changed quite recently, I thought it might be a bug instead.
I'm trying to compile Elmer with the HYPRE libraries linked in. I followed the instructions here: http://www.elmerfem.org/elmerwiki/index ... on_(Linux)
as well as several other flag/env-var options. I'm able to install and test HYPRE, but when I run my Elmer compilation script, I get the following related (I think), errors:
Code: Select all
mpicc -DHAVE_CONFIG_H -I. -I.. -I/home/jat71//include -I/usr/local/Cluster-Apps.sandybridge/OpenMPI/intel/1.5.4/include -g -O2 -m64 -fPIC -fPIC -I/home/jat71//in\
clude -I/usr/local/Cluster-Apps.sandybridge/OpenMPI/intel/1.5.4/include -MT cholmod.o -MD -MP -MF .deps/cholmod.Tpo -c -o cholmod.o cholmod.c
SolveHypre.c: In function âsolvehypre1_â:
SolveHypre.c:732: warning: passing argument 2 of âHYPRE_ParCSRGMRESSetPrecondâ from incompatible pointer type
/home/jat71//include/HYPRE_parcsr_ls.h:1926: note: expected âHYPRE_PtrToParSolverFcnâ but argument is of type âint (*)(struct hypre_Solver_struct *, struct hypre_Ma\
trix_struct *, struct hypre_Vector_struct *, struct hypre_Vector_struct *)â
SolveHypre.c:732: warning: passing argument 3 of âHYPRE_ParCSRGMRESSetPrecondâ from incompatible pointer type
/home/jat71//include/HYPRE_parcsr_ls.h:1926: note: expected âHYPRE_PtrToParSolverFcnâ but argument is of type âint (*)(struct hypre_Solver_struct *, struct hypre_Ma\
trix_struct *, struct hypre_Vector_struct *, struct hypre_Vector_struct *)â
SolveHypre.c:735: warning: passing argument 2 of âHYPRE_ParCSRGMRESSetPrecondâ from incompatible pointer type
/home/jat71//include/HYPRE_parcsr_ls.h:1926: note: expected âHYPRE_PtrToParSolverFcnâ but argument is of type âint (*)(struct hypre_Solver_struct *, struct hypre_Ma\
trix_struct *, struct hypre_Vector_struct *, struct hypre_Vector_struct *)â
SolveHypre.c:735: warning: passing argument 3 of âHYPRE_ParCSRGMRESSetPrecondâ from incompatible pointer type
/home/jat71//include/HYPRE_parcsr_ls.h:1926: note: expected âHYPRE_PtrToParSolverFcnâ but argument is of type âint (*)(struct hypre_Solver_struct *, struct hypre_Ma\
trix_struct *, struct hypre_Vector_struct *, struct hypre_Vector_struct *)â
SolveHypre.c:738: warning: passing argument 2 of âHYPRE_ParCSRGMRESSetPrecondâ from incompatible pointer type
/home/jat71//include/HYPRE_parcsr_ls.h:1926: note: expected âHYPRE_PtrToParSolverFcnâ but argument is of type âint (*)(struct hypre_Solver_struct *, struct hypre_Ma\
trix_struct *, struct hypre_Vector_struct *, struct hypre_Vector_struct *)â
SolveHypre.c:738: warning: passing argument 3 of âHYPRE_ParCSRGMRESSetPrecondâ from incompatible pointer type
/home/jat71//include/HYPRE_parcsr_ls.h:1926: note: expected âHYPRE_PtrToParSolverFcnâ but argument is of type âint (*)(struct hypre_Solver_struct *, struct hypre_Ma\
trix_struct *, struct hypre_Vector_struct *, struct hypre_Vector_struct *)â
Code: Select all
mpif90 -m64 -fPIC -Wl,-rpath=/home/jat71//lib -L. -L/home/jat71//lib -lmpi_cxx -L/home/jat71//lib \
-o ElmerSolver Solver.o mpi_stubs.o \
-L. -lelmersolver
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESSetTol'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESDestroy'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESSetLogging'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESSetTol'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESSolve'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESSetup'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESSetMaxIter'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESDestroy'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESSetLogging'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESSolve'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESSetKDim'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESSetPrecond'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESSetMaxIter'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESSetKDim'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESCreate'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESSetPrintLevel'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESSetPrintLevel'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRFlexGMRESCreate'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESSetPrecond'
./libelmersolver.so: undefined reference to `HYPRE_ParCSRLGMRESSetup'
Here's my Elmer compilation script:
Code: Select all
#!/bin/sh -f
# Compile Elmer modules and install it
#
#This script should be placed in the folder containing the directories listed under 'modules'
# replace these with your compilers:
export CC=mpicc
export CXX=mpic++
export FC=mpif90
export F77=mpif90
export ELMER_INSTALL="/home/jat71/"
export ELMER_HOME="/home/jat71/"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib
export LIBS="-lpthread"
export HYPRE=/home/jat71/
export CPPFLAGS="-I$HYPRE/include"
export LDFLAGS="-L$HYPRE/lib -lmpi_cxx"
modules="matc umfpack mathlibs elmergrid meshgen2d eio hutiter fem"
for m in $modules; do
cd $m
make distclean
./configure --prefix=$ELMER_INSTALL --with-mpi=yes --with-mpi-dir=$MPI_HOME --with-mpi-libs="-L$HYPRE/lib -lmpi_cxx -L$MPI_HOME/lib -lmpi_f77 -lmpi" --with-debug\
--enable-static --with-64bits=yes --with-hypre="-L$HYPRE/lib -lHYPRE"
make -j4
make install
cd ..
done
I've tried with and without the --enable-static flag.
As I said, I'm reluctant to label this a bug, as I could well be making a mistake somewhere, but I was a little suspicious that all the errors seem to relate to the recently modified GMRES implementation.
Thanks in advance!
Joe