MPI & component_wise

36 views
Skip to first unread message

Joss G.

unread,
Feb 14, 2022, 10:50:27 AM2/14/22
to deal.II User Group
Dear all, 

I am having an error when running more than 1 core (with MPI) in a similar implementation to step-40 when using a component wise ordering: DoFRenumbering::component_wise(dof_handler) in the setup_syste() function.



Is ii possible to do what I am trying to do?

Thank you




Error:

An error occurred in line <236> of file </zhome/32/9/115503/dealii-candi/tmp/unpack/deal.II-v9.3.1/source/lac/petsc_parallel_vector.cc> in function

    void dealii::PETScWrappers::MPI::Vector::reinit(const dealii::IndexSet&, const dealii::IndexSet&, ompi_communicator_t* const&)

The violated condition was: 

    local.is_ascending_and_one_to_one(comm)

Additional information: 

    You are trying to use functionality in deal.II that is currently not

    implemented. In many cases, this indicates that there simply didn't

    appear much of a need for it, or that the author of the original code

    did not have the time to implement a particular case. If you hit this

    exception, it is therefore worth the time to look into the code to

    find out whether you may be able to implement the missing

    functionality. If you do, please consider providing a patch to the

    deal.II development sources (see the deal.II website on how to

    contribute).

Wolfgang Bangerth

unread,
Feb 14, 2022, 11:36:26 AM2/14/22
to dea...@googlegroups.com
On 2/14/22 08:50, Joss G. wrote:
>
> I am having an error when running more than 1 core (with MPI) in a similar
> implementation to step-40 when using a component wise ordering:
> DoFRenumbering::component_wise(dof_handler) in the setup_syste() function.
>
>
>
> Is ii possible to do what I am trying to do?

Yes, but then you also have to use block vectors and matrices. (You could also
use parallel::distributed::Vector or TrilinosWrappers::Vector, just not
PETScWrappers::Vector.) In general, if you want to renumber component wise,
then it's because you want to block vectors and matrices based on the physical
components of the solution vector.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Joss G.

unread,
Feb 14, 2022, 5:35:31 PM2/14/22
to deal.II User Group
Thank you for your answer. I am trying to substitute my PETScWrappers::MPI::Vector for  parallel::distributed::Vector (locally_relevant_solution and system_rhs) but my lac library does not contain the filee

deal.II/lac/parallel_vector.h. I even tried to get the latest version but is not there. Where can I find it?


Thank you

Regards

Wolfgang Bangerth

unread,
Feb 14, 2022, 6:55:41 PM2/14/22
to dea...@googlegroups.com
On 2/14/22 15:35, Joss G. wrote:
> **
>
> Thank you for your answer. I am trying to substitute my
> PETScWrappers::MPI::Vector
> for  parallel::distributed::Vector (locally_relevant_solution and
> system_rhs) but my lac library does not contain the filee
>
> *deal.II/lac/parallel_vector.h. *I even tried to get the latest version
> but is not there. Where can I find it?
>

Take a look at include/deal.II/lac/la_parallel_vector.h

Joss G.

unread,
Feb 15, 2022, 3:52:54 AM2/15/22
to deal.II User Group
Thank you again. It seems I am having bit of trouble.

I used: parallel::distributed:Vector<double> locally_relevant_solution;

In the documentation is written to call #include <deal.II/lac/parallel_vector.h> but the file is not there. Using #include <deal.II/lac/la_parallel_vector.h> I get the following error:

: error: Vector’ in namespace ‘dealii::parallel::distributed’ does not name a template type


What am I doing wrong?


Thank you



Wolfgang Bangerth

unread,
Feb 15, 2022, 10:11:08 AM2/15/22
to dea...@googlegroups.com
On 2/15/22 01:52, Joss G. wrote:
> *** Caution: EXTERNAL Sender ***
>
> Thank you again. It seems I am having bit of trouble.
>
> I used: parallel::distributed:Vector<double> locally_relevant_solution;
>
> In the documentation is written to call
> #include<deal.II/lac/parallel_vector.h> but the file is not there. Using
> #include<deal.II/lac/la_parallel_vector.h> I get the following error:
>
> *:* *error: *‘*Vector*’ in namespace ‘*dealii::parallel::distributed*’ does
> not name a template type
>
>
> What am I doing wrong?

I misspelled the name of the class. It is LinearAlgebra::distributed::Vector
and it is used in a number of tutorial programs (37, 48, 50, 59, 66, ...).
Reply all
Reply to author
Forward
Message has been deleted
0 new messages