YAMS installation problem

Extension of Elmer in computational glaciology
Post Reply
dolphin
Posts: 5
Joined: 13 Oct 2017, 15:17
Antispam: Yes

YAMS installation problem

Post by dolphin »

I am new user. OS: Ubuntu Mint 64, and elmerice working fine, but, I cant install YAMS.
Following the guide: http://elmerice.elmerfem.org/wiki/doku. ... :yamsnotes
I got the next error:
gcc -static-libgcc objects/pritim.o objects/prichk.o objects/sizcor_a.o objects/optima.o objects/optra4.o objects/cassar_q.o objects/norpoi.o objects/priqua_a.o objects/colar2.o objects/outqua_q.o objects/yams8.o objects/parsop.o objects/noshrk.o objects/delar1.o objects/metric_a.o objects/analar_a.o objects/yams3.o objects/sident.o objects/inmsh2.o objects/qualfa_a.o objects/boulep.o objects/split_a.o objects/optlen_a.o objects/setvoi.o objects/coledg.o objects/cutmet.o objects/calpar.o objects/sizcor.o objects/yams4.o objects/chkspl_a.o objects/zaldy3.o objects/hilbert.o objects/prigap.o objects/ptmult.o objects/blinde.o objects/memory.o objects/priqua.o objects/colver.o objects/optia3.o objects/analar.o objects/inival.o objects/stack.o objects/split.o objects/optfem.o objects/primsg.o objects/eigenv.o objects/hash.o objects/qualfa.o objects/flipa2.o objects/chkspl.o objects/optia2.o objects/subdvd.o objects/delpo2.o objects/bilan.o objects/cassar_a.o objects/colpoi.o objects/outms2.o objects/taspoi.o objects/outqua_a.o objects/delnul.o objects/optedg.o objects/prierr.o objects/cassar.o objects/coorpo.o objects/heap.o objects/opticu.o objects/yams2.o objects/updtop.o objects/priout.o objects/flipa1.o objects/prihis.o objects/rchsub.o objects/angdef.o objects/delpo1.o objects/analfa.o objects/colpo3.o objects/flipa0.o objects/optpo1_q.o objects/addver.o objects/radpoi_a.o objects/zaldy2.o objects/optpo2.o objects/deled0.o objects/error.o objects/delpo0.o objects/radpoi.o objects/analar_q.o objects/tgepoi.o objects/yams1.o objects/swapar.o objects/inout.o objects/outqua.o objects/yams6.o objects/deled1.o objects/inbbf.o objects/outwrl.o objects/outbbf.o objects/optia1.o objects/debug.o objects/yams0.o objects/optpo1.o objects/denois.o objects/yamsq.o objects/libmesh3.o objects/tabvo2.o objects/zaldy1.o objects/chrono.o objects/chktge.o objects/flprdg.o objects/colar1.o objects/prilen.o objects/radedg_a.o objects/lenseg.o objects/deled2.o objects/parsar.o objects/yams.o objects/flipa3.o -o /home/user/bin/yams -lm
objects/addver.o: In function `pritim':
pritim.c:(.text+0x0): multiple definition of `pritim'
objects/pritim.o:pritim.c:(.text+0x0): first defined here
objects/analar_a.o: In function `analar_a':
analar_a.c:(.text+0x11a5): undefined reference to `addver'
objects/analar.o: In function `analar':
analar.c:(.text+0x945): undefined reference to `addver'
analar.c:(.text+0xb7d): undefined reference to `addver'
analar.c:(.text+0xbb4): undefined reference to `addver'
objects/optfem.o: In function `optfem':
optfem.c:(.text+0x237): undefined reference to `addver'
objects/optfem.o:optfem.c:(.text+0x539): more undefined references to `addver' follow
collect2: error: ld returned 1 exit status
makefile:29: recipe for target '/home/user/bin/yams' failed
make: *** [/home/user/bin/yams] Error 1
...
any help is more than welcome!
fgillet
Posts: 46
Joined: 30 Sep 2010, 16:58

Re: YAMS installation problem

Post by fgillet »

Hello,

Yams was used in a pre-processing stesp to adapt the mesh using an error estimator.

I have recently implemented very similar codes directly in Elmer.

Documentation can be found here:
http://elmerice.elmerfem.org/wiki/doku. ... adaptation

It requires to install an external library Mmg to do the remeshing.

This is needed only if you are interested by mesh adaptation.

best regards,

fabien
dolphin
Posts: 5
Joined: 13 Oct 2017, 15:17
Antispam: Yes

Re: YAMS installation problem

Post by dolphin »

Thanks Fabien

I am not sure for the next steps:
1. Mmg compiled using the -fPIC ?
if I define the Flags of during the installation of Mmg (https://github.com/MmgTools/Mmg/wiki/Setup-guide):
cmake C_FLAGS="-fPIC" CXX_FLAGS="-fPIC" Fortran_FLAGS="-fPIC" ..
make sense?
2. if the previous step it is right, then I modified the installation script of Elmerice (http://elmerice.elmerfem.org/wiki/doku. ... ationcmake):
$CMAKE $ELMERSRC \
-DCMAKE_INSTALL_PREFIX=$IDIR \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
-DMMG_INCLUDE_DIR=/usr/local/include \
-DMMG_LIBRARY=/usr/local/lib/libmmg.a \
-DWITH_MPI:BOOL=TRUE \
-DWITH_Mumps:BOOL=TRUE \
-DWITH_Hypre:BOOL=TRUE \
-DWITH_Trilinos:BOOL=FALSE \
-DWITH_ELMERGUI:BOOL=FALSE \
-DWITH_ElmerIce:BOOL=TRUE
3. Next, during the elmerice installation, I get the next error:
[ 68%] Building Fortran object elmerice/Tests/DGsolver/CMakeFiles/DGsolver_InitializeDGVariable.dir/PROG/InitializeDGVariable.f90.o
/home/user/Elmer/elmerice/elmerice/Solvers/MeshAdaptation_2D/MMG2DSolver.F90:558:68:

CALL MMG2D_SET_IPARAMETER(mmgMesh,mmgSol,MMG2D_IPARAM_bucket, &
1
Error: Symbol ‘mmg2d_iparam_bucket’ at (1) has no IMPLICIT type
elmerice/Solvers/MeshAdaptation_2D/CMakeFiles/ElmerIce_MeshAdapt2D.dir/build.make:134: recipe for target 'elmerice/Solvers/MeshAdaptation_2D/CMakeFiles/ElmerIce_MeshAdapt2D.dir/MMG2DSolver.F90.o' failed
make[2]: *** [elmerice/Solvers/MeshAdaptation_2D/CMakeFiles/ElmerIce_MeshAdapt2D.dir/MMG2DSolver.F90.o] Error 1
make[2]: *** Waiting for unfinished jobs....
...
[ 74%] Built target ElmerIceSolvers
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

...
any idea what could cause this ?
fgillet
Posts: 46
Joined: 30 Sep 2010, 16:58

Re: YAMS installation problem

Post by fgillet »

It seems that there is some incompatibilities with the newest revisions of mmg.

- In your mmg clone directory could you revert to an old revision:
git checkout 6acfa9e7b20e41134d56af10eba1bb8fd1283f8f

- compile and install mmg from this revison
- and try again to install Elmer.

Please let me know if it works;
I will update the wiki page and try to keep-up with mmg developpers.

all the best

fabien
dolphin
Posts: 5
Joined: 13 Oct 2017, 15:17
Antispam: Yes

Re: YAMS installation problem

Post by dolphin »

Thank you Fabien,
I test the previous versions: 5.3.0. and 5.2.6. (https://github.com/MmgTools/mmg/releases).
The same error with the 5.3.0. (For the fPIC Flags issue I worked with cmake-gui)
The 5.26 do not cause any problem and the elmerice installed! OK!
fgillet
Posts: 46
Joined: 30 Sep 2010, 16:58

Re: YAMS installation problem

Post by fgillet »

ok; thanks for the report.
I will update the wiki page and try to sort out the errors for versions from 5.3.0

Hope you will find the examples in the Test directory usefull. If you need more details on the mesh adaptation; dont hesitate to ask.

best regards

fabien
dolphin
Posts: 5
Joined: 13 Oct 2017, 15:17
Antispam: Yes

Re: YAMS installation problem

Post by dolphin »

Thanks Fabien! yes the examples are very useful! I am still working to understand how to modify the mesh (refinement) to adapt a velocity field, and whether we could modify the surface/bottom of our 3D mesh based on surface and bed elevation respectively.
Post Reply