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 ?

Best,
Prajjwal

On Wed, Jan 23, 2019 at 4:00 AM Andriy Andreykiv <[email protected]>
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,
>                        Andriy
>
> On Wed, 23 Jan 2019 at 05:57, Prajjwal Jamdagni <[email protected]>
> 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:
>>
>> bgeot_geometric_trans.cc: In instantiation of ‘void
>> bgeot::igeometric_trans<FUNC>::compute_grad_() const [with FUNC =
>> bgeot::polynomial<double>]’:
>> bgeot_geometric_trans.cc:555:41:   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>]’
>> bgeot_geometric_trans.cc:1333:1:   required from here
>> bgeot_geometric_trans.cc:507:12: 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,
>>                  from bgeot_geometric_trans.cc:23:
>> 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:
>> https://www.mail-archive.com/[email protected]/msg00088.html
>>
>> 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.
>>
>> Best,
>> Prajjwal
>>
>

Reply via email to