[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Getfem-users] Compilation issues
From: |
Yves Renard |
Subject: |
Re: [Getfem-users] Compilation issues |
Date: |
Wed, 18 Dec 2013 09:48:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Dear Nasos Iliopoulos,
You are right, the make check is not working on the parallel version.
This is something we should work on. The fact is that only a few
examples have been parallelized. To be compatible with the mpi
parallelization, the program should initialize mpi and of course be
compatible with the fact that the matrices are distributed.
The two examples which are working for sure in parallel are
tests/elastostatic.cc
for C++ examples and
interface/tests/python/demo_parallel_laplacian.py
for python ones.
In particular, it seems not to be easy to make compatible the mpi
parallelization of Getfem with Matlab parallelization. So for the
moment, it is not possible to parallelize the matlab interface (may be
it could be possible with the multithreading parallellization which was
initiated by Andriy but I did not test).
The parallelization of python tests is quite easy. It is often
sufficient to add
import mpi4py.MPI as mpi
rank = mpi.COMM_WORLD.rank
at the begining of the program and possibly add some
if (rank == 0):
conditions before some commands that should be performed only once.
Yves.
Le 13/12/2013 15:54, Nasos Iliopoulos a écrit :
> Hello all,
> I am trying to compile getfem and I am having partial success. I have
> seen posts regarding similar issues in the past but I didn't find
> anything that works for me. I hope I can get some help with my
> specific issues.
>
> Here is my configuration:
> OS: Ubuntu 13.04 (raring)
> MATLAB 2013b (Release number 30 according to wikipedia)
> mpich2, muParser, par+seq mumps, metis (through
> libsuitesparse-metis-dev), python, numpy, scipy
> gcc v4.8.1
>
> For the moment I will be happy to have getfem running in SMP using
> python (at least with MUMPS) and single-core using MATLAB. I have to
> note that in all compilation cases I have to tweak the configure
> script to reflect the fact that the script cannot detect my version of
> MATLAB (basically I hard-wire MATLAB_RELEASE=30). Additionally I
> manually move the definition of mumps_error_check(MUMPS_STRUCT &id)
> in gmm/gmm_MUMPS_interface.h towards the beginning of the file since
> gcc 4.8 wants it declared before it is instantiated.
>
> In any case here are my attempts:
>
> 1. Parallel build
> $ ./configure --with-pic --enable-matlab
> MEX=/usr/local/MATLAB/R2013b/bin/mex --enable-par-mumps
> --enable-paralevel=2 --enable-python
> $ make -j 8
> $ sudo make install
>
> When I run a python example I get:
> $ mpirun -n 4 python demo_step_by_step.py
> Attempting to use an MPI routine before initializing MPICH
> Attempting to use an MPI routine before initializing MPICH
> ('1 - 3*x - 3*y + 2*x^2 + 9*x*y + 2*y^2 - 6*x^2*y - 6*x*y^2 +
> 4*x^2*y^2', '4*x - 4*x^2 - 12*x*y + 12*x^2*y + 8*x*y^2 - 8*x^2*y^2',
> '-x + 2*x^2 + 3*x*y - 6*x^2*y - 2*x*y^2 + 4*x^2*y^2', '4*y - 12*x*y -
> 4*y^2 + 8*x^2*y + 12*x*y^2 - 8*x^2*y^2', '16*x*y - 16*x^2*y - 16*x*y^2
> + 16*x^2*y^2', '-4*x*y + 8*x^2*y + 4*x*y^2 - 8*x^2*y^2', '-y + 3*x*y +
> 2*y^2 - 2*x^2*y - 6*x*y^2 + 4*x^2*y^2', '-4*x*y + 4*x^2*y + 8*x*y^2 -
> 8*x^2*y^2', 'x*y - 2*x^2*y - 2*x*y^2 + 4*x^2*y^2')
> ('1 - 3*x - 3*y + 2*x^2 + 9*x*y + 2*y^2 - 6*x^2*y - 6*x*y^2 +
> 4*x^2*y^2', '4*x - 4*x^2 - 12*x*y + 12*x^2*y + 8*x*y^2 - 8*x^2*y^2',
> '-x + 2*x^2 + 3*x*y - 6*x^2*y - 2*x*y^2 + 4*x^2*y^2', '4*y - 12*x*y -
> 4*y^2 + 8*x^2*y + 12*x*y^2 - 8*x^2*y^2', '16*x*y - 16*x^2*y - 16*x*y^2
> + 16*x^2*y^2', '-4*x*y + 8*x^2*y + 4*x*y^2 - 8*x^2*y^2', '-y + 3*x*y +
> 2*y^2 - 2*x^2*y - 6*x*y^2 + 4*x^2*y^2', '-4*x*y + 4*x^2*y + 8*x*y^2 -
> 8*x^2*y^2', 'x*y - 2*x^2*y - 2*x*y^2 + 4*x^2*y^2')
> Attempting to use an MPI routine before initializing MPICH
> Attempting to use an MPI routine before initializing MPICH
>
> I do not get any errors and the u.pos file is not generated
>
> I get a similar output when I run it without mpirun:
> $ python demo_step_by_step.py
>
> Additionally when I run the same example through matlab it crashes and
> it only reports:
> Attempting to use an MPI routine before initializing MPICH
> Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion
> `map->l_init_called' failed!
>
> 2. Non-parallel build:
> $ ./configure --with-pic --enable-matlab
> MEX=/usr/local/MATLAB/R2013b/bin/mex --enable-mumps --enable-python
> $ make -j 8
> $ sudo make install
>
> Running through the python interface gives the expected results (the
> python script runs and I get the proper answer. I tried both with
> demo_step_by_step and with demo_tripod)
>
> Running though:
> $ make check
> returns:
>
> PASS: ../tests/dynamic_array.pl
> PASS: ../tests/dynamic_tas.pl
> PASS: ../tests/test_int_set.pl
> PASS: ../tests/test_tree_sorted.pl
> PASS: ../tests/poly.pl
> PASS: ../tests/test_small_vector.pl
> PASS: ../tests/test_kdtree.pl
> PASS: ../tests/test_rtree.pl
> PASS: ../tests/geo_trans_inv.pl
> PASS: ../tests/test_norm.pl
> PASS: ../tests/test_mesh.pl
> PASS: ../tests/test_interpolation.pl
> .............
> PASS: ../tests/test_mat_elem.pl
> PASS: ../tests/test_slice.pl
> PASS: ../tests/integration.pl
> ...
> PASS: ../tests/test_assembly.pl
> PASS: ../tests/test_interpolated_fem.pl
> PASS: ../tests/test_range_basis.pl
> .............
> PASS: ../tests/laplacian.pl
> ./laplacian_with_bricks /tmp/laplacian.param_346 2>&1 failed
> FAIL: ../tests/laplacian_with_bricks.pl
> ./elastostatic /tmp/elas.param_309 2>&1 failed
> FAIL: ../tests/elastostatic.pl
> FAIL: ../tests/stokes.pl
> FAIL: ../tests/plate.pl
> PASS: ../tests/test_mesh_im_level_set.pl
> FAIL: ../tests/crack.pl
> FAIL: ../tests/nonlinear_elastostatic.pl
> FAIL: ../tests/nonlinear_membrane.pl
> FAIL: ../tests/dynamic_friction.pl
> PASS: ../tests/plasticity.pl
> FAIL: ../tests/plasticity_old_brick.pl
> FAIL: ../tests/helmholtz.pl
> PASS: ../tests/schwarz_additive.pl
> ./bilaplacian /tmp/elas.param_827 2>&1 failed
> FAIL: ../tests/bilaplacian.pl
> ./heat_equation /tmp/heat.param_267 2>&1 failed
> FAIL: ../tests/heat_equation.pl
> ./wave_equation /tmp/wave.param_757 2>&1 failed
> FAIL: ../tests/wave_equation.pl
> FAIL: ../tests/test_large_sliding_contact.pl
> PASS: ../tests/cyl_slicer.pl
>
> ....
> 50 effective experiments with no fault, size = 25 base type :
> St7complexIfE
> solver least square cg : 0 exp. with no fault
> solver bicgstab : 0 exp. with no fault
> solver gmres : 250 exp. with no fault, ratio = 0, average nb iter =
> 14.4
> solver qmr : 0 exp. with no fault
> solver cg : 200 exp. with no fault, ratio = 0, average nb iter = 21.9
> no precond : 100 exp. with no fault, ratio = 0, average nb iter = 29
> diag precond : 100 exp. with no fault, ratio = 0, average nb iter =
> 29.8
> mr precond : 0 exp. with no fault
> ilu precond : 50 exp. with no fault, ratio = 0, average nb iter = 14.6
> ilut precond : 50 exp. with no fault, ratio = 0, average nb iter =
> 6.14
> ilutp precond : 50 exp. with no fault, ratio = 0, average nb iter =
> 1.52
> ildlt precond : 50 exp. with no fault, ratio = 0, average nb iter = 1
> ildltt precond : 50 exp. with no fault, ratio = 0, average nb iter =
> 19.1
> PASS: ../tests/make_gmm_test.pl
> =====================
> 14 of 38 tests failed
> =====================
> make[2]: *** [check-TESTS] Error 1
> make[2]: Leaving directory `/home/nasos/tmp/getfem/getfem-4.2/tests'
> make[1]: *** [check-am] Error 2
> make[1]: Leaving directory `/home/nasos/tmp/getfem/getfem-4.2/tests'
> make: *** [check-recursive] Error 1
>
>
> In MATLAB I am getting this:
>
> plotting mesh...
> Trace 2 in getfem_models.cc, line 1827: Mass term assembly for
> Dirichlet condition
> logic_error exception caught
> Error using gf_matlab
> Error in ../../src/gmm/gmm_opt.h, line 87 T gmm::lu_inverse(const
> gmm::dense_matrix<T>&) [with T = double]:
> non invertible matrix
>
> Error in gf_model_get (line 183)
> gf_matlab('model_get', varargin{:});
>
> and in the command terminal:
> MKL ERROR: Parameter 8 was incorrect on entry to DGEMM .
>
> note: matlab does not crash at this point but it DOES if I run the
> script again.
>
> I tried to debug it and it seems that lu_inverse is being fed with a
> zero matrix.
>
> I also tried to PRELOAD my local c and std libs but I am getting the
> same error.
>
> So my questions are:
>
> A. Any suggestions/thoughts with respect to my build
> configuration/system?
> B. How can I enable a debug build so I can search it a little bit more?
>
> Thank you!
> Nasos Iliopoulos
>
>
> _______________________________________________
> Getfem-users mailing list
> address@hidden
> https://mail.gna.org/listinfo/getfem-users
--
Yves Renard (address@hidden) tel : (33) 04.72.43.87.08
Pole de Mathematiques, INSA-Lyon fax : (33) 04.72.43.85.29
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard
---------