Error in opensuse 12.1

Discussion about building and installing Elmer
Post Reply
mario
Posts: 2
Joined: 20 Jun 2012, 19:02
Antispam: Yes

Error in opensuse 12.1

Post by mario »

greetings:
I am trying to install opensuse 12.1 of Elmer on 64, try it first with the script of the page and I marked that I could fix errors, I decided to compile step by step carperta all without problems however to reach emf use:

./configure --prefix=/opt/elmer --with-mpi-dir=/usr/lib64/mpi/gcc/openmpi --with-arpack=/usr/lib64/libarpack.so.2.0.0 --with-parpack=/usr/lib64/mpi/gcc/openmpi/lib64/libparpack.so.2 --with-umfpack=/opt/elmer/lib64/libumfpack.a

whose answers are:


Compilers:
Fortran 90 compiler gfortran
Fortran 77 compiler gfortran
CC gcc
C++ g++
CPP /lib/cpp

Libs:
BLAS -lblas
LAPACK -llapack
HYPRE
MUMPS
UMFPACK /opt/elmer/lib64/libumfpack.a
ARPACK /usr/lib64/libarpack.so.2.0.0
PARPACK /usr/lib64/mpi/gcc/openmpi/lib64/libparpack.so.2
HUTI -lhuti
EIO -leiof
MPI -L/usr/lib64/mpi/gcc/openmpi/lib

MPI:
yes
but when you make me throw the following error:

make all-recursive
make[1]: se ingresa al directorio `/opt/trunk/fem'
Making all in src
make[2]: se ingresa al directorio `/opt/trunk/fem/src'
Making all in view3d
make[3]: se ingresa al directorio `/opt/trunk/fem/src/view3d'
make[3]: No se hace nada para `all'.
make[3]: se sale del directorio `/opt/trunk/fem/src/view3d'
Making all in viewaxis
make[3]: se ingresa al directorio `/opt/trunk/fem/src/viewaxis'
make[3]: No se hace nada para `all'.
make[3]: se sale del directorio `/opt/trunk/fem/src/viewaxis'
Making all in binio
make[3]: se ingresa al directorio `/opt/trunk/fem/src/binio'
Making all in test
make[4]: se ingresa al directorio `/opt/trunk/fem/src/binio/test'
make[4]: No se hace nada para `all'.
make[4]: se sale del directorio `/opt/trunk/fem/src/binio/test'
make[4]: se ingresa al directorio `/opt/trunk/fem/src/binio'
gfortran -I. -I.. -O -m64 -fPIC -fPIC -I. -Ibinio -I../binio -I/usr/lib64/mpi/gcc/openmpi/include -c -o kinds.o kinds.f90
rm -f libbinio.a
ar cru libbinio.a binio.o kinds.o biniomod.o
ranlib libbinio.a
make[4]: se sale del directorio `/opt/trunk/fem/src/binio'
make[3]: se sale del directorio `/opt/trunk/fem/src/binio'
Making all in .
make[3]: se ingresa al directorio `/opt/trunk/fem/src'
rm -f libelmersolver.so
g++ -m64 -fPIC -Wl,-rpath=/opt/elmer/lib -shared -L. -L/opt/elmer/lib -Wl,-soname,libelmersolver-7.0.so -o libelmersolver-7.0.so NavierStokes.o NavierStokesGeneral.o NavierStokesCylindrical.o Lists.o DiffuseConvectiveAnisotropic.o DiffuseConvectiveGeneralAnisotropic.o PElementMaps.o PElementBase.o ElementDescription.o Integration.o ModelDescription.o GeneralUtils.o Stress.o StressGeneral.o LinearAlgebra.o CoordinateSystems.o ListMatrix.o CRSMatrix.o BandMatrix.o BandwidthOptimize.o BlockSolve.o MaterialModels.o DirectSolve.o IterSolve.o IterativeMethods.o TimeIntegrate.o Types.o SolveBand.o ElementUtils.o Radiation.o fft.o Load.o Differentials.o FreeSurface.o Maxwell.o MaxwellAxiS.o MaxwellGeneral.o Walls.o SolverUtils.o SolveSBand.o CPUTime.o Interpolation.o MainUtils.o Adaptive.o EigenSolve.o HashTable.o MeshUtils.o SParIterGlobals.o SParIterComm.o SParIterPrecond.o SParIterSolver.o Messages.o Multigrid.o Smoothers.o ClusteringMethods.o ParallelUtils.o ParallelEigenSolve.o solve_cmplx.o solve_real.o MGPrec.o DefUtils.o LUDecomposition.o RadiationFactors.o f_stubs.o ExchangeCorrelations.o SolveHypre.o SolveSuperLU.o iso_varying_string.o umf4_f77wrapper.o VankaCreate.o ParticleUtils.o Feti.o cholmod.o ElmerSolver.o -L. -ldl -L/opt/elmer/lib -lm /usr/lib64/libarpack.so.2.0.0 /usr/lib64/mpi/gcc/openmpi/lib64/libparpack.so.2 /opt/elmer/lib64/libumfpack.a -lhuti -lmatc -leiof -L. -ldl -L/opt/elmer/lib -lm -llapack -lblas -L/usr/lib64/gcc/x86_64-suse-linux/4.6 -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../.. -lgfortran -lm -lquadmath -L/usr/lib64/gcc/x86_64-suse-linux/4.6 -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../.. -lgfortran -lm -lquadmath -L/usr/lib64/gcc/x86_64-suse-linux/4.6 -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../.. -lstdc++ -lm -lgcc_s -lgcc_s -L. -Lbinio -lbinio
ln -s libelmersolver-7.0.so libelmersolver.so
gfortran -m64 -fPIC -Wl,-rpath=/opt/elmer/lib -L. -L/opt/elmer/lib \
-o ElmerSolver Solver.o mpi_stubs.o \
-L. -lelmersolver
./libelmersolver.so: undefined reference to `amd_postorder'
./libelmersolver.so: undefined reference to `amd_l_defaults'
./libelmersolver.so: undefined reference to `amd_defaults'
./libelmersolver.so: undefined reference to `amd_l_postorder'
./libelmersolver.so: undefined reference to `amd_aat'
./libelmersolver.so: undefined reference to `amd_1'
./libelmersolver.so: undefined reference to `amd_valid'
./libelmersolver.so: undefined reference to `amd_l_valid'
./libelmersolver.so: undefined reference to `amd_l_aat'
./libelmersolver.so: undefined reference to `amd_l1'
collect2: ld returned 1 exit status
make[3]: *** [ElmerSolver] Error 1
make[3]: se sale del directorio `/opt/trunk/fem/src'
make[2]: *** [all-recursive] Error 1
make[2]: se sale del directorio `/opt/trunk/fem/src'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/opt/trunk/fem'
make: *** [all] Error 2

that may be?
Steven
Posts: 3
Joined: 02 Oct 2012, 00:45
Antispam: Yes

Re: Error in opensuse 12.1

Post by Steven »

Hello,

I also tried to compile Elmer on Suse 12.1 with 64 bits (with and without mpi)
and I've got similar error messages.

I think there is a problem due to 64 bits.

A former installation on a 64 bit opensuse 11.4 system compiled successfully and the elmer files were moved to /opt/elmer/bin, /share, /include and /lib (not lib64 !!)

Now with 64bits opensuse 12.1 only a /lib64 folder is created.

With the compile.sh script:
-------
#!/bin/sh -f

export CC="mpicc"
export CXX="mpicxx"
export FC="mpif90"
export F77="mpif77"

export MPI_HOME="/usr/lib64/mpi/gcc/openmpi"
export PATH=/usr/lib64/mpi/gcc/openmpi/bin:/home/stefan/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib64:/usr/include
export LD_LIBRARY_PATH=
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/mpi/gcc/openmpi/lib64:/usr/lib64
export PATH=$PATH:/usr/lib64/mpi/gcc/openmpi/bin
export ELMER_HOME=/opt/Elmer_6_Rev4689
export ELMER_INSTALL=$ELMER_HOME
export ELMER_LIB=$ELMER_HOME/lib64
export PATH=$ELMER_HOME/bin:$ELMER_HOME/lib64:$ELMER_HOME/include:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ELMER_HOME/lib64:$ELMER_HOME/include
export HUTI_LIBS=$ELMER_HOME/lib64
export EIOF_LIBS=$ELMER_HOME/lib64
export MATC_LIBS=$ELMER_HOME/lib64
export LIBS="-L$ELMER_HOME/lib64"
export LDFLAGS="-L$ELMER_HOME/lib64"

mds="matc umfpack mathlibs meshgen2d eio hutiter elmergrid fem"

##### configure, build and install #########
for m in $mds; do
echo "module $m"
echo "###############"
##### parallel #######
cd $m
make distclean
./configure --prefix=$ELMER_INSTALL \
--with-mpi=yes \
--with-mpi-dir=$MPI_HOME \
--with-mpi-lib-dir=/usr/lib64/mpi/gcc/openmpi/lib64 \
--with-mpi-inc-dir=/usr/lib64/mpi/gcc/openmpi/include \
--with-64bits=yes \
--with-arpack=$ELMER_HOME/lib64/libarpack.a \
--with-parpack=$ELMER_HOME/lib64/libparpack.a \
--with-umfpack="-L$ELMER_HOME/lib64/" \
--with-huti=$ELMER_HOME/lib64/libhuti.a \
--with-eiof=$ELMER_HOME/lib64/libeiof.a \
--with-matc=$ELMER_HOME/lib64/libmatc.a
make
make install
cd ..
done
---

the reported errors like
"./libelmersolver.so: undefined reference to `amd_postorder'"
don't appear anymore, which might be due to
--with-umfpack="-L$ELMER_HOME/lib64/" \
and thus the library
libamd.a
could be found.

All modules except "fem" are compiled successfully.
The exit status of all configure-steps finish with exit status = 0, which means OK.

During "make install" of "fem" following error is reported:
---
./configure: line 16774: 0: command not found /// (the lines in configure are related to an if-(OSX ?)-fi query, maybe obsolete)

Installing stuff to /opt/Elmer_Rev5845/bin
mkdir -p /opt/Elmer_Rev5845/bin
cp ElmerSolver /opt/Elmer_Rev5845/bin
cp ViewFactors /opt/Elmer_Rev5845/bin
cp GebhardtFactors /opt/Elmer_Rev5845/bin
cp libelmersolver-7.0.so /opt/Elmer_Rev5845/lib
ln -sf libelmersolver-7.0.so\
/opt/Elmer_Rev5845/lib/libelmersolver.so
make[3]: Leaving directory `/opt/Elmer_Rev5845/trunk/fem/src'
make[2]: Leaving directory `/opt/Elmer_Rev5845/trunk/fem/src'
make[1]: Leaving directory `/opt/Elmer_Rev5845/trunk/fem/src'

ln: Zugriff auf „/opt/Elmer_Rev5845/lib/libelmersolver.so“: Ist kein Verzeichnis
make[3]: *** [install-exec-local] Fehler 1
make[2]: *** [install-am] Fehler 2
make[1]: *** [install-recursive] Fehler 1
---
The executables are successfully moved to /bin.
But "make install" still uses /opt/elmer/lib instead of /opt/elmer/lib64
and moving of the compiled libraries is aborted.

In the config.log of "fem"
the variables
-----
LDFLAGS -L. -L/opt/Elmer_Rev5845/lib64 -L/opt/Elmer_Rev5845/lib
LIBS -L. -ldl -L/opt/Elmer_Rev5845/lib64 -L/opt/Elmer_Rev5845/lib -lm
SOLVER_LIBS -L. -ldl -L/opt/Elmer_Rev5845/lib64 -L/opt/Elmer_Rev5845/lib -lm
---
contain lib64 and lib.
But some variables
---
RPATH_ELMER='-Wl,-rpath=/opt/Elmer_Rev5845/lib'
RPATH_FLAG='-Wl,-rpath='
libdir='${exec_prefix}/lib64'
libexecdir='${exec_prefix}/lib'
---
are still only for 32 bits.



Now my questions:
Is the configure-script of fem already adapted to opensuse12.1 and 64 bits?
Or are there other variables which have to be set?


Thanks for your help...

Steven
Steven
Posts: 3
Joined: 02 Oct 2012, 00:45
Antispam: Yes

Re: Error in opensuse 12.1

Post by Steven »

Hello again,

finally I found a way to get Elmer compiled on OpenSuse 12.1 - 64 bit.

During "make" and "make install"
the folder $ELMER_HOME/lib is searched for libelmersolver.so.
If the folder doesn't exist, an error occurs and "make" , "make install" is aborted.

So creating the folder $ELMER_HOME/lib
and running the script

Code: Select all

#!/bin/sh -f


export CC="gcc"
export CXX="g++"
export FC="gfortran"
export F77="gfortran"

export PATH=/usr/lib64/mpi/gcc/openmpi/bin:/home/stefan/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin


export LD_LIBRARY_PATH=


export ELMER_HOME=/opt/Elmer_Rev5856_nompi
export PATH=$ELMER_HOME/bin:$ELMER_HOME/lib64:$ELMER_HOME/lib:$ELMER_HOME/include:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ELMER_HOME/lib64:$ELMER_HOME/lib:$ELMER_HOME/include
export LIBS="-L$ELMER_HOME/lib64"


mds="matc umfpack mathlibs meshgen2d eio hutiter elmergrid fem post"

##### configure, build and install #########
 for m in $mds; do
   echo "module $m"
   echo "###############"
   ##### parallel #######
  cd $m
  make distclean
  ./configure --prefix=$ELMER_HOME \
                 --with-blas=$ELMER_HOME/lib64/libblas.a \
                 --with-lapack=$ELMER_HOME/lib64/liblapack.a \
 		 --with-arpack=$ELMER_HOME/lib64/libarpack.a \
		 --with-parpack=$ELMER_HOME/lib64/libparpack.a \
		 --with-umfpack="-L$ELMER_HOME/lib64/" \
		 --with-huti=$ELMER_HOME/lib64/libhuti.a \
		 --with-eiof=$ELMER_HOME/lib64/libeiof.a \
		 --with-matc=$ELMER_HOME/lib64/libmatc.a 

  make
  make install
  cd ..
done
completed the compilation.
The libs "libelmersolver.so" and "libelmersolver-7.0.so" are now located in $ELMER_HOME/lib and could/should be manually moved to $ELMER_HOME/lib64.


It seems like the configure script does not really get along with the opensuse 12.1 64bit machine.
Steven
Posts: 3
Joined: 02 Oct 2012, 00:45
Antispam: Yes

Re: Error in opensuse 12.1

Post by Steven »

Same for the mpi-version:

create the folder $ELMER_HOME/lib,

run the script

Code: Select all

#!/bin/sh -f


export CC="mpicc"
export CXX="mpicxx"
export FC="mpif90"
export F77="mpif77"

export PATH=/usr/lib64/mpi/gcc/openmpi/bin:/home/stefan/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin


export LD_LIBRARY_PATH=

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/mpi/gcc/openmpi/lib64:/usr/lib64
export PATH=$PATH:/usr/lib64/mpi/gcc/openmpi/bin

export ELMER_HOME=/opt/Elmer_Rev5856_mpi
export PATH=$ELMER_HOME/bin:$ELMER_HOME/lib64:$ELMER_HOME/lib:$ELMER_HOME/include:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ELMER_HOME/lib64:$ELMER_HOME/lib:$ELMER_HOME/include
export LIBS="-L$ELMER_HOME/lib64"
export LDFLAGS="-L$ELMER_HOME/lib64"

export MPI_HOME="/usr/lib64/mpi/gcc/openmpi"


mds="matc umfpack mathlibs meshgen2d eio hutiter elmergrid fem post"

##### configure, build and install #########
 for m in $mds; do
   echo "module $m"
   echo "###############"
   ##### parallel #######
  cd $m
  make distclean
  ./configure --prefix=$ELMER_HOME  --with-debug \
                 --with-mpi=yes \
                 --with-64bits=yes \
                 --with-mpi-dir=$MPI_HOME \
		 --with-mpi-lib-dir=/usr/lib64/mpi/gcc/openmpi/lib64 \
		 --with-mpi-inc-dir=/usr/lib64/mpi/gcc/openmpi/include \
		 --with-blas=$ELMER_HOME/lib64/libblas.a \
                 --with-lapack=$ELMER_HOME/lib64/liblapack.a \
 		 --with-arpack=$ELMER_HOME/lib64/libarpack.a \
		 --with-parpack=$ELMER_HOME/lib64/libparpack.a \
		 --with-umfpack="-L$ELMER_HOME/lib64/" \
		 --with-huti=$ELMER_HOME/lib64/libhuti.a \
		 --with-eiof="-L$ELMER_HOME/lib64/" \
		 --with-matc=$ELMER_HOME/lib64/libmatc.a 
           

  make
  make install
  cd ..
done
Here I had to create a symbolic link
from /usr/lib64/libmpi.so to /usr/lib64/mpi/gcc/lib64/libmpi.so

with the command

ln -s /usr/lib64/mpi/gcc/openmpi/lib64/libmpi.so /usr/lib64/libmpi.so

(after making a backup of /usr/lib64/libmpi.so)


Not that nice, but it worked for me.

regards

Steven
mario
Posts: 2
Joined: 20 Jun 2012, 19:02
Antispam: Yes

Re: Error in opensuse 12.1

Post by mario »

Hi I solved the problem by modifying the Elmer.pri which is in the folder ElmerGUI

#------------------------------------------------------------------------------
# QWT library:
#------------------------------------------------------------------------------
unix {
QWT_INCLUDEPATH = /usr/include/qwt5
QWT_LIBPATH = /usr/lib64
QWT_LIBS = -lqwt
}
Post Reply