an error when Elmer installtion on ubuntu 14.04

Discussion about building and installing Elmer
Post Reply
zhang liangfu
Posts: 22
Joined: 20 Nov 2014, 05:06
Antispam: Yes

an error when Elmer installtion on ubuntu 14.04

Post by zhang liangfu »

Hi Everyone,
I am sorry to trouble you that I was always wrong when I install the elmer my steps as follws. I am unfamiliar to the computer knowledge. my OS is ubuntu14.04

Code: Select all

sudo apt-get install subversion
sudo apt-get install libapache2-svn
svn checkout http://svn.code.sf.net/p/elmerfem/code/trunk elmerfem
first I install the dependence

Code: Select all

sudo apt-get install libsuitesparse-dev libsuitesparse-metis-dev liblapack-dev libatlas-dev libarpack2-dev libparpack2-dev libmpich2-dev libhypre-dev \
libqwt-dev libvtk5-qt4-dev libopencascade-dev libpythonqt2-dev libpythonqt2.0 libftgl-dev

Code: Select all

sudo apt-get install tcl8.4 
ln -s ./usr/share/tcltk/tcl8.4 /usr/include/tcl8.4
next I set the valuable

Code: Select all

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

Code: Select all

[quote]export F77=gfortran
export ELMER_HOME=$HOME/elmer-inst[/quote]
then I install the modules one by one

Code: Select all

cd elmerfem/
cd matc/
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
make clean
make
make install
cd ..
cd  umfpack
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
make clean
make
make install
cd ..
cd mathlibs/
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
make clean
make
make install
cd ..
cd elmergrid/
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
make clean
make 
make install
cd ..
cd  meshgen2d/
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
make clean
make
make install
cd ..
cd eio
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
make clean
make
make install
cd ..
cd hutiter/
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
make clean
make
make install
cd ..
cd fem/
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4" --with-mpi-inc-dir="/home/zlf/.local/share/Trash/files/mpich2/include/"
and here the program runs wrong .the log is as the attached file .I don't know what can I do next .
Attachments
anyname.log
(4.81 KiB) Downloaded 317 times
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: an error when Elmer installtion on ubuntu 14.04

Post by annier »

Hi Mr. Zhang,
If that is your complete log file, the compilation has just terminated when trying to search mpi destination for the configuration of fem module.
Can you repeat your installation without using the mpi direction?

Code: Select all

cd fem/
./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4" 
make 
make install 
cd ..
done
Yours
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: an error when Elmer installtion on ubuntu 14.04

Post by annier »

Hi Zhang Liangfu,
Try with this compile script:

Code: Select all

cd elmerfem/
    cd matc/
    ./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
    make clean
    make
    make install
    cd ..
    cd  umfpack
    ./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
    make clean
    make
    make install
    cd ..
    cd mathlibs/
    ./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
    make clean
    make
    make install
    cd ..
    cd elmergrid/
    ./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
    make clean
    make
    make install
    cd ..
    cd  meshgen2d/
    ./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
    make clean
    make
    make install
    cd ..
    cd eio
    ./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
    make clean
    make
    make install
    cd ..
    cd hutiter/
    ./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4"
    make clean
    make
    make install
    cd ..
    cd fem/
    ./configure --prefix="$ELMER_HOME" --with-tcltk="-ltcl8.4 -ltk8.4" 
    make clean
    make 
    make install
    cd ..
    done
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
zhang liangfu
Posts: 22
Joined: 20 Nov 2014, 05:06
Antispam: Yes

Re: an error when Elmer installtion on ubuntu 14.04

Post by zhang liangfu »

Hi Mr anil,
Thankyou for your reply, I do it as your sugesstions , The error will encounter in the following "make" step

zlf@zlf-ThinkPad-T420:~/elmerfem/fem$ ./configure --prefix="$HOME/elmer-inst" --with-tcltk="-ltcl8.4 -ltk8.4"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for ftello... yes
checking for fseeko... yes
checking for answer to meaning of life... 42
checking for default compilation flags... optimized
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for xlC... no
checking for pathCC... no
checking for icc... no
checking for CC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking for ranlib... ranlib
checking for ar... ar
checking for ar flags... cru
checking whether we are using the Microsoft C compiler... no
checking for /lib/cpp... yes
checking for C++ linker flags... checking how to run the C preprocessor... /lib/cpp
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for 64 bit compilation flags... let's see what happens
checking for 64 bit CFLAGS... -m64 -fPIC
checking for 64 bit FCFLAGS... -m64 -fPIC
checking for 64 bit CXXFLAGS... -m64 -fPIC
checking for 64 bit FFLAGS... -m64 -fPIC
checking for void*... yes
checking size of void*... 8
checking to see if we got 64 bits... oh yes
checking how to get verbose linking output from gfortran... -v
checking for Fortran 77 libraries of gfortran... -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lgfortran -lm -lquadmath
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking how to get verbose linking output from gfortran... -v
checking for Fortran libraries of gfortran... -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lgfortran -lm -lquadmath
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
checking for Fortran char* mangling scheme... char_ptr
checking if fortran implements CONTIGUOUS attribute... yes
checking if fortran implements allocatable character strings... yes
checking for fortran intrinsic etime... found
checking for fortran intrinsic flush... found
checking for shl_load in -ldld... no
checking for shl_load... no
checking for shl_findsym... no
checking for dlopen in -ldl... yes
checking for dlopen... yes
checking for dlsym... yes
checking for dlerror... yes
checking for dlclose... yes
checking for mpi-directory...
checking for mpi-lib-directory...
checking for mpi-inc-directory...
checking for mpi-library...
checking for mpi-include...
checking for mpf90... no
checking for mpxlf90... no
checking for saxpy_... no
checking for ATL_xerbla in -latlas... no
checking for saxpy_ in -lblas... yes
checking for daxpy_ in -ldaxpy... no
checking for saxpy_ in -lcxml... no
checking for saxpy_ in -ldxml... no
checking for saxpy_ in -lscs... no
checking for saxpy_ in -lcomplib.sgimath... no
checking for saxpy_ in -lblas... (cached) yes
checking for saxpy_ in -lessl... no
checking for saxpy_ in -lessl... (cached) no
checking for saxpy_ in -lblas... (cached) yes
checking for cheev_... no
checking for cheev_ in -llapack... yes
checking for huti_d_gmres_ in -lhuti... yes
checking for eio_init_ in -leiof... yes
checking for dseupd_ in -larpack... yes
checking for pdneupd_ in -lparpack... no
configure: WARNING: No parallel arpack found.
checking for HYPRE_IJMatrixCreate in -lHYPRE_IJ_mv... yes
checking for dmumps_ in -ldmumps... no
checking for dmumps_ in -ldmumps... (cached) no
configure: WARNING: MUMPS not found, some functionaly will be disabled.
checking for umfpack_di_defaults in -lumfpack... yes
checking for mtc_init in -lmatc... yes
checking for main in -lm... yes
checking for *.mod-file naming convention... modulename.mod
checking for option to tell gfortran where to put *.mod-files... -J
checking for off_t... yes
checking size of off_t... 8
./configure: line 16831: 0: command not found
defining FPICFLAG to be -fPIC
defining CPICFLAG to be -fPIC
defining CXXPICFLAG to be -fPIC
defining SHLEXT to be so
defining SHLLIB to be $(SHLEXT)
defining SHLBIN to be
defining SHLEXT_VER to be $(SHLEXT).$(version)
defining SHLLIB_VER to be $(SHLLIB).$(version)
defining SHLBIN_VER to be $(SHLBIN).$(version)
defining SHLLINKEXT to be
defining DLFCN_DIR to be
defining SH_LD to be gfortran
defining SH_LDFLAGS to be -shared
defining SH_LINKING_TO_FLAGS to be -m64 -fPIC
defining DL_LD to be $(SH_LD)
defining DL_LDFLAGS to be $(SH_LDFLAGS)
defining MKOCTFILE_DL_LDFLAGS to be
defining SONAME_FLAGS to be
defining NO_OCT_FILE_STRIP to be
defining RLD_FLAG to be
defining TEMPLATE_AR to be
defining TEMPLATE_ARFLAGS to be
defining library_path_var to be
defining FCPPFLAGS to be -DCONTIG=",CONTIGUOUS" -DALLOC_CHAR=1 -P -traditional-cpp -I. -I/home/zlf/elmer-inst/include -DFULL_INDUCTION -DUSE_ARPACK
defining LIBSOLVER_DEPS to be
defining OFF_KIND to be selected_int_kind(18)
defining LONG_KIND to be
configure: creating ./config.status
config.status: creating tests/runtests
config.status: creating src/elmerf90
config.status: creating src/elmerf90-nosh
config.status: creating src/elmerld
config.status: creating Makefile
config.status: creating Makeconf
config.status: creating src/Makefile
config.status: creating src/modules/Makefile
config.status: creating src/view3d/Makefile
config.status: creating src/viewaxis/Makefile
config.status: creating src/binio/Makefile
config.status: creating src/binio/kinds.f90
config.status: creating src/binio/test/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

ELMER build options:
Version 7.0
Install prefix /home/zlf/elmer-inst
CPPFLAGS
FCPPFLAGS -DCONTIG=",CONTIGUOUS" -DALLOC_CHAR=1 -P -traditional-cpp -I. -I/home/zlf/elmer-inst/include -DFULL_INDUCTION -DUSE_ARPACK

CFLAGS -g -O2 -m64 -fPIC -fPIC -I/home/zlf/elmer-inst/include
CXXFLAGS -O -m64 -fPIC -fPIC
FCFLAGS -O -m64 -fPIC -fPIC -I. -Ibinio -I../binio
FFLAGS -O -m64 -fPIC -fPIC -I.

LDFLAGS -L. -L/home/zlf/elmer-inst/lib
LIBS -L. -ldl -L/home/zlf/elmer-inst/lib -lm
SOLVER_LIBS -L. -ldl -L/home/zlf/elmer-inst/lib -lm -larpack -lHYPRE_Euclid -lHYPRE_parcsr_ls -lHYPRE_ParaSails -lHYPRE_IJ_mv -lumfpack -lamd -lhuti -lmatc -leiof -L. -ldl -L/home/zlf/elmer-inst/lib -lm -llapack -lblas -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lgfortran -lm -lquadmath -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lgfortran -lm -lquadmath

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

Libs:
BLAS -lblas
LAPACK -llapack
HYPRE -lHYPRE_Euclid -lHYPRE_parcsr_ls -lHYPRE_ParaSails -lHYPRE_IJ_mv
MUMPS
UMFPACK -lumfpack -lamd
ARPACK -larpack
PARPACK
HUTI -lhuti
EIO -leiof
MPI

MPI:
disabled


zlf@zlf-ThinkPad-T420:~/elmerfem/fem$ make
make all-recursive
make[1]: Entering directory `/home/zlf/elmerfem/fem'
Making all in src
make[2]: Entering directory `/home/zlf/elmerfem/fem/src'
Making all in view3d
make[3]: Entering directory `/home/zlf/elmerfem/fem/src/view3d'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/zlf/elmerfem/fem/src/view3d'
Making all in viewaxis
make[3]: Entering directory `/home/zlf/elmerfem/fem/src/viewaxis'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/zlf/elmerfem/fem/src/viewaxis'
Making all in binio
make[3]: Entering directory `/home/zlf/elmerfem/fem/src/binio'
Making all in test
make[4]: Entering directory `/home/zlf/elmerfem/fem/src/binio/test'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/zlf/elmerfem/fem/src/binio/test'
make[4]: Entering directory `/home/zlf/elmerfem/fem/src/binio'
gfortran -I. -I.. -O -m64 -fPIC -fPIC -I. -Ibinio -I../binio -c -o kinds.o kinds.f90
Warning: Nonexistent include directory "binio"
rm -f libbinio.a
ar cru libbinio.a binio.o kinds.o biniomod.o
ranlib libbinio.a
make[4]: Leaving directory `/home/zlf/elmerfem/fem/src/binio'
make[3]: Leaving directory `/home/zlf/elmerfem/fem/src/binio'
Making all in .
make[3]: Entering directory `/home/zlf/elmerfem/fem/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -m64 -fPIC -fPIC -I/home/zlf/elmer-inst/include -MT SolveHypre.o -MD -MP -MF .deps/SolveHypre.Tpo -c -o SolveHypre.o SolveHypre.c
In file included from /usr/include/_hypre_utilities.h:16:0,
from SolveHypre.c:47:
/usr/include/HYPRE_utilities.h:26:17: fatal error: mpi.h: No such file or directory
#include "mpi.h"
^
compilation terminated.
make[3]: *** [SolveHypre.o] Error 1
make[3]: Leaving directory `/home/zlf/elmerfem/fem/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/zlf/elmerfem/fem/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zlf/elmerfem/fem'
make: *** [all] Error 2
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: an error when Elmer installtion on ubuntu 14.04

Post by annier »

Hi Zhang Liangfu,

Method - X (Described only for installation of fem module after all other modules and necessary prerequisites have been installed)
- Now you have also been clear that installation of newer and updated versions of fem module requires openmpi library.
-i am not sure where your original openmpi library is:

To find its location type it in terminal:

Code: Select all

$whereis openmpi
In my context the answer is:

Code: Select all

$whereis openmpi
openmpi: /etc/openmpi /usr/lib/openmpi /usr/include/openmpi /usr/share/openmpi
Please note that the openmpi in /usr/include/ directory is the symlink of the original one in /usr/lib/ directory.
Since, most of the .h files for installation are kept in /usr/include/ directory , it is better to keep a symlink of openmpi there. please check the locations of your openmpi using the command.
If openmpi is not there, you can keep a copy there.

Code: Select all

$sudo -s 

Code: Select all

#ln -s /usr/lib/openmpi/  /usr/include/openmpi
Then you can install fem module using:

Code: Select all

./configure --prefix="$HOME/elmer-inst" --with-tcltk="-ltcl8.4 -ltk8.4" --with-mpi-inc-dir="/usr/include/openmpi/"
Method -Y
There is this way to install ElmerNonGui in Ubuntu 14.04 as mentioned in this reference

Code: Select all

$ sudo apt-add-repository ppa:elmer-csc-ubuntu/elmer-csc-ppa

Code: Select all

$ sudo apt-get update

Code: Select all

$ sudo apt-get install elmerfem-csc

Yours
Anil Kunwar
Last edited by annier on 16 Dec 2014, 09:00, edited 2 times in total.
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: an error when Elmer installtion on ubuntu 14.04

Post by raback »

Hi

For those troubled with installation problems you could try some of the options available under the new cmake fork, see
viewtopic.php?f=11&t=3725&sid=c40e000aa ... dfd#p12723

This will soon become the mainstream and the gnu autotools (configure) will be dropped.

-Peter
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: an error when Elmer installtion on ubuntu 14.04

Post by annier »

Hi Zhang Liangfu,
There is this way to install ElmerNonGui in Ubuntu 14.04 as mentioned in this reference
1. First add ppa repository of elmer

Code: Select all

$ sudo apt-add-repository ppa:elmer-csc-ubuntu/elmer-csc-ppa
2. Get update

Code: Select all

$ sudo apt-get update
3. Install elmer

Code: Select all

$ sudo apt-get install elmerfem-csc

Yours
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Post Reply