Installation with Spack and Docker

79 views
Skip to first unread message

tsah...@gmail.com

unread,
Aug 11, 2019, 5:11:59 PM8/11/19
to MoFEM Q&A
Hi Sir,

Here is Tarik Sahin. Master student at Ruhr Uni. Bochum.

I have tried to install Mofem to my computer by both methods Spack and Docker.

First with Spack.

During installation of Spack package "openblas", it gives such an error. I have tried to install couple of times but it did not work.

Error with Spack

************************************************************************
************************************************************************

Error: ProcessError: Command exited with status 2:
'make' 'CC=/home/tarik/spack/lib/spack/env/gcc/gcc' 'FC=/home/tarik/spack/lib/spack/env/gcc/gfortran' 'MAKE_NO_J=1' 'USE_OPENMP=0' 'USE_THREAD=0' 'libs' 'netlib' 'shared'

13 errors found in build log:
>> 6 getarch_2nd.c:12:35: error: 'SGEMM_DEFAULT_UNROLL_M' undeclared (first use in this fu
nction); did you mean 'XGEMM_DEFAULT_UNROLL_M'?
7 printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
8 ^~~~~~~~~~~~~~~~~~~~~~
9 XGEMM_DEFAULT_UNROLL_M
10 getarch_2nd.c:12:35: note: each undeclared identifier is reported only once for each
function it appears in
>> 11 getarch_2nd.c:13:35: error: 'SGEMM_DEFAULT_UNROLL_N' undeclared (first use in this fu
nction); did you mean 'SGEMM_DEFAULT_UNROLL_M'?
12 printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
13 ^~~~~~~~~~~~~~~~~~~~~~
14 SGEMM_DEFAULT_UNROLL_M
>> 15 getarch_2nd.c:14:35: error: 'DGEMM_DEFAULT_UNROLL_M' undeclared (first use in this fu
nction); did you mean 'SGEMM_DEFAULT_UNROLL_M'?
16 printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
17 ^~~~~~~~~~~~~~~~~~~~~~
18 SGEMM_DEFAULT_UNROLL_M
>> 19 getarch_2nd.c:15:35: error: 'DGEMM_DEFAULT_UNROLL_N' undeclared (first use in this fu
nction); did you mean 'DGEMM_DEFAULT_UNROLL_M'?
20 printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
21 ^~~~~~~~~~~~~~~~~~~~~~
22 DGEMM_DEFAULT_UNROLL_M
>> 23 getarch_2nd.c:19:35: error: 'CGEMM_DEFAULT_UNROLL_M' undeclared (first use in this fu
nction); did you mean 'DGEMM_DEFAULT_UNROLL_M'?
24 printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
25 ^~~~~~~~~~~~~~~~~~~~~~
26 DGEMM_DEFAULT_UNROLL_M
>> 27 getarch_2nd.c:20:35: error: 'CGEMM_DEFAULT_UNROLL_N' undeclared (first use in this fu
nction); did you mean 'CGEMM_DEFAULT_UNROLL_M'?
28 printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
29 ^~~~~~~~~~~~~~~~~~~~~~
30 CGEMM_DEFAULT_UNROLL_M
>> 31 getarch_2nd.c:21:35: error: 'ZGEMM_DEFAULT_UNROLL_M' undeclared (first use in this fu
nction); did you mean 'CGEMM_DEFAULT_UNROLL_M'?
32 printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
33 ^~~~~~~~~~~~~~~~~~~~~~
34 CGEMM_DEFAULT_UNROLL_M
>> 35 getarch_2nd.c:22:35: error: 'ZGEMM_DEFAULT_UNROLL_N' undeclared (first use in this fu
nction); did you mean 'ZGEMM_DEFAULT_UNROLL_M'?
36 printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
37 ^~~~~~~~~~~~~~~~~~~~~~
38 ZGEMM_DEFAULT_UNROLL_M
>> 39 getarch_2nd.c:69:50: error: 'SGEMM_DEFAULT_Q' undeclared (first use in this function)
; did you mean 'SGEMM_DEFAULT_UNROLL_N'?
40 printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNR
OLL_N * 4 * 1 * sizeof(float)));
41 ^~~~~~~~~~~~~~~
42 SGEMM_DEFAULT_UNROLL_N
>> 43 getarch_2nd.c:70:50: error: 'DGEMM_DEFAULT_Q' undeclared (first use in this function)
; did you mean 'SGEMM_DEFAULT_Q'?
44 printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNR
OLL_N * 2 * 1 * sizeof(double)));
45 ^~~~~~~~~~~~~~~
46 SGEMM_DEFAULT_Q
>> 47 getarch_2nd.c:71:50: error: 'CGEMM_DEFAULT_Q' undeclared (first use in this function)
; did you mean 'DGEMM_DEFAULT_Q'?
48 printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNR
OLL_N * 4 * 2 * sizeof(float)));
49 ^~~~~~~~~~~~~~~
50 DGEMM_DEFAULT_Q
>> 51 getarch_2nd.c:72:50: error: 'ZGEMM_DEFAULT_Q' undeclared (first use in this function)
; did you mean 'CGEMM_DEFAULT_Q'?
52 printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNR
OLL_N * 2 * 2 * sizeof(double)));
53 ^~~~~~~~~~~~~~~
54 CGEMM_DEFAULT_Q
>> 55 make: *** [getarch_2nd] Error 1
56 Makefile:135: *** OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g.
make TARGET=your_cpu_target. Please read README for the detail.. Stop.

************************************************************************
************************************************************************



-------------------------------------------------------------------------------
Second with docker.
I have installed and managed to make examples. But when I run a test case with docker, it says that

Error with Docker
************************************************************************
************************************************************************

[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: mesh.h5m: No such file or directory!
[0]MOAB ERROR: serial_load_file() line 567 in src/Core.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Failed in step PARALLEL READ PART!
[0]MOAB ERROR: load_file() line 612 in src/ReadParallel.cpp
[0]MOAB ERROR: load_file() line 263 in src/ReadParallel.cpp
[0]MOAB ERROR: load_file() line 503 in src/Core.cpp
[0]MoFEM ERROR: --------------------- MoFEM Error Message ---------------------------------------------------
[0]MoFEM ERROR: MoFEM version 0.8.23 (MOAB 5.0.1 Petsc Release Version 3.7.7, unknown )
[0]MoFEM ERROR: MoFEM git commit id GITDIR-NOTFOUND
[0]MoFEM ERROR: See http://mofem.eng.gla.ac.uk/mofem/html/guidelines_bug_reporting.html for bug reporting.
[0]MoFEM ERROR: Write to https://groups.google.com/forum/#!forum/mofem-group to seek help.
[0]MoFEM ERROR: MOAB error (16) MB_FAILURE at line 86 : /mofem/src/interfaces/impl/Simple.cpp
[0]MoFEM ERROR: #1 loadFile() line 86 in /mofem/src/interfaces/impl/Simple.cpp
[0]MoFEM ERROR: #2 main() line 159 in /mofem_build/um/users_modules/basic_finite_elements/poisson/analytical_poisson.cpp

[1]PETSC ERROR: ------------------------------------------------------------------------
[1]PETSC ERROR: Caught signal number 15 Terminate: Some process (or the batch system) has told this process to end
[1]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[1]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
[1]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[1]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[1]PETSC ERROR: to get more information on the crash.
[1]MoFEM ERROR: --------------------- MoFEM Error Message ---------------------------------------------------
[1]MoFEM ERROR: MoFEM version 0.8.23 (MOAB 5.0.1 Petsc Release Version 3.7.7, unknown )
[1]MoFEM ERROR: MoFEM git commit id GITDIR-NOTFOUND
[1]MoFEM ERROR: See http://mofem.eng.gla.ac.uk/mofem/html/guidelines_bug_reporting.html for bug reporting.
[1]MoFEM ERROR: Write to https://groups.google.com/forum/#!forum/mofem-group to seek help.
[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[1]PETSC ERROR: Signal received
[1]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[1]PETSC ERROR: Petsc Release Version 3.7.7, unknown
[1]PETSC ERROR: ./analytical_poisson on a arch-linux2-c-opt named c8e1814499c3 by Unknown Sun Aug 11 21:01:41 2019
[1]PETSC ERROR: Configure options --with-debugging=0 --with-mpi=1 --download-metis=1 --download-parmetis=1 --download-hypre=1 --download-mumps=1 --download-superlu_dist=1 --download-blacs=1 --download-hdf5=1 --download-netcdf=/opt/petsc/netcdf-4.3.3.1.tar.gz --download-scalapack=1 --with-shared-libraries=1
[1]PETSC ERROR: #1 User provided function() line 0 in unknown file
[c8e1814499c3:00015] 1 more process has sent help message help-mpi-api.txt / mpi-abort
[c8e1814499c3:00015] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

************************************************************************
************************************************************************

It is looking for mesh.h5m but it does not exist inside of the folder. I tried with also other tests. It is the same error also.
-

Karol Lewandowski

unread,
Aug 11, 2019, 5:13:55 PM8/11/19
to mofem...@googlegroups.com
It looks like your mofem installation is working with docker. Can you send your command line? Are you sure that the path to the mesh file is correct?

I also recommend running 

make install

in users_modules build folder.



tsah...@gmail.com

unread,
Aug 11, 2019, 5:34:13 PM8/11/19
to MoFEM Q&A
Thank you for answer sir.

I have done cmake install, but it is still the same error

root@449b5053c5f5:/mofem_build/um/basic_finite_elements/poisson# ls
CMakeFiles CTestTestfile.cmake Makefile analytical_nonlinear_poisson analytical_poisson analytical_poisson_field_split cmake_install.cmake cube_1part.h5m cube_2part.h5m out_vol.h5m
root@449b5053c5f5:/mofem_build/um/basic_finite_elements/poisson# mpirun -np 2 ./analytical_poisson -my_file cube_1part.h5m -ksp_type gmres -pc_type lu -pc_factor_mat_solver_package mumps -ksp_monitor -my_order 2

tsahin069

unread,
Aug 11, 2019, 5:46:28 PM8/11/19
to MoFEM Q&A
Sir,
Also i realized that in elasticity I dont have the file LShape.h5m. It is just out.h5m .

root@97feff621b8e:/mofem_build/um# ls
CMakeCache.txt       DartConfiguration.tcl      MoFEMConfig.cmake      bin                  include               libusers_modules.so  users_modules
CMakeFiles           Makefile                   Testing                cmake_install.cmake  install_manifest.txt  third_party
CTestTestfile.cmake  MoFEMConfig-version.cmake  basic_finite_elements  external             lib                   tools
root@97feff621b8e:/mofem_build/um# cd basic_finite_elements/
root@97feff621b8e:/mofem_build/um/basic_finite_elements# ls
CMakeFiles           Makefile    cmake_install.cmake  elasticity                    hello_world                 magnetostatic  nonlinear_elasticity  simple_elasticity  thermal
CTestTestfile.cmake  atom_tests  cohesive_interface   elasticity_mixed_formulation  hierarchical_approximation  mix_transport  poisson               src
root@97feff621b8e:/mofem_build/um/basic_finite_elements# cd elasticity
root@97feff621b8e:/mofem_build/um/basic_finite_elements/elasticity# ls
CMakeFiles  CTestTestfile.cmake  Makefile  README  cmake_install.cmake  elasticity  out.h5m
root@97feff621b8e:/mofem_build/um/basic_finite_elements/elasticity# 

Karol Lewandowski

unread,
Aug 11, 2019, 5:49:36 PM8/11/19
to mofem...@googlegroups.com
run 
make install

in ~/mofem_build/um/users_modules

not `cmake install`

The only problem is with the paths here. You can find the files you are looking for in source directories. 

tsahin069

unread,
Aug 12, 2019, 1:30:19 AM8/12/19
to MoFEM Q&A
Hi sir,
it does not work.

tarik@tarik-Lenovo-V130-15IGM:~/mofem-cephas$ ls
bitbucket-pipelines.yml  Dockerfile-build      Dockerfile-build-min-env  Dockerfile-spack-mofem-dependencies  joss     media  README.md
CONTRIBUTING.md          Dockerfile-build-env  Dockerfile-build-um       Dockerfile-spack-mofem-testing       LICENSE  mofem
tarik@tarik-Lenovo-V130-15IGM:~/mofem-cephas$ docker run --rm=true -it --volumes-from mofem_build mofem_build /bin/bash
root@fe2b06c83905:/mofem_build# cd um/users_modules
root@fe2b06c83905:/mofem_build/um/users_modules# ls
CMakeLists.txt  CTestConfig.cmake  ModulesList.cmake  basic_finite_elements  cmake  doc  scripts  tools
root@fe2b06c83905:/mofem_build/um/users_modules# make install
make: *** No rule to make target 'install'.  Stop.
root@fe2b06c83905:/mofem_build/um/users_modules# 

tsahin069

unread,
Aug 14, 2019, 4:33:59 PM8/14/19
to MoFEM Q&A
Issue is solved by Mr. Kaczmraczyk by following commands,


docker pull likask/mofem_build_core:develop

docker run --name mofem_build likask/mofem_build_core:develop

docker run --rm=true -it --volumes-from mofem_build -v $HOME:$HOME -e HOSTHOME=$HOME likask/mofem_build_core:develop /bin/bash

cd /mofem_build/um/basic_finite_elements/elasticity && make 

mpirun -np 2 ./elasticity -my_file LShape.h5m -ksp_type gmres -pc_type lu -pc_factor_mat_solver_package mumps -ksp_monitor -my_order 2

mbconvert out.h5m out.vtk
cp out.h5m $HOSTHOME/Downloads/


Thanks in advance,

Best regards,
Tarik Sahin

Lukasz Kaczmraczyk

unread,
Aug 19, 2019, 8:48:27 AM8/19/19
to MoFEM Q&A
Hello,

I made for you docker container with fracture module installed,

docker pull likask/mofem_build_fracture:latest

docker run --name mofem_build likask/mofem_build_fracture:latest

docker run --rm=true -it --volumes-from mofem_build_fracture -v $HOME:$HOME -e HOSTHOME=$HOME likask/mofem_build_fracture:latest /bin/bash

cd um/fracture_mechanics/

make -j2
ctest

Let us know what example you would like to solve.

Kind regards,
Lukasz

Reply all
Reply to author
Forward
0 new messages