[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Compiling getfem with openmp

From: Prajjwal Jamdagni
Subject: Re: [Getfem-users] Compiling getfem with openmp
Date: Wed, 23 Jan 2019 07:58:29 -0600

Thank you  Andriy. I tried compiling the master branch but it gives me a different error during compiling.

./getfem/getfem_interpolation.h: In function ‘void getfem::interpolation(const getfem::mesh_fem&, const getfem::mesh_fem&, const VECTU&, VECTV&, int, double, getfem::mesh_region, getfem::mesh_region)’:
./getfem/getfem_omp.h:481:47: error: ‘parallel_execution’ is not a member of ‘getfem’
     #define GETFEM_OMP_PARALLEL(body) getfem::parallel_execution([&](){body;}, true);

The reason i am trying to use OpenMP is that my simulations are not completely independent and OpenMP threads can interact with each other easily.
My program works for single thread but gives segmentation fault for multiple threads when reading the mesh.
Do you think using open-mpi may be a better option as each process is more isolated ?


On Wed, Jan 23, 2019 at 4:00 AM Andriy Andreykiv <address@hidden> wrote:
Dear  Prajjwal,

Could you try the latest master branch? This issue with copying is solved there.

Regarding your motivation, to run several fem simulations simultaneously. It works a bit different. Open mp parallelization of getfem
primarily relates to parallel assembly for stiffness matrices and RHSs for a single simulation (not even the solver). 
If you really want to launch multiple independent simulations in parallel you don't need OpenMP.
You can launch them one by one through a command line or a script.

Best regards,

On Wed, 23 Jan 2019 at 05:57, Prajjwal Jamdagni <address@hidden> wrote:
Dear Getfem users,

I am trying to compile getfem 5.3 with --enable-openmp flag. During the build process i get the following error: In instantiation of ‘void bgeot::igeometric_trans<FUNC>::compute_grad_() const [with FUNC = bgeot::polynomial<double>]’:   required from ‘void bgeot::igeometric_trans<FUNC>::poly_vector_grad(const base_node&, bgeot::base_matrix&) const [with FUNC = bgeot::polynomial<double>; bgeot::base_node = bgeot::small_vector<double>; bgeot::base_matrix = gmm::dense_matrix<double>]’   required from here error: use of deleted function ‘getfem::omp_guard::omp_guard(getfem::omp_guard&&)’
       auto guard = getfem::omp_guard{};
In file included from getfem/dal_singleton.h:48:0,
getfem/getfem_omp.h:72:9: note: ‘getfem::omp_guard::omp_guard(getfem::omp_guard&&)’ is implicitly deleted because the default definition would be ill-formed:
   class omp_guard: public boost::lock_guard<boost::recursive_mutex>
I found a post on similar problem but there was no solution:

I want to run several fem simulations simultaneously, each in its own thread. My another question is do i need to include additional header files or some other openmp specific instructions in getfem or the usual openmp instructions will be sufficient?

Thank you for your help.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]