After digging into the source file, it looks like the error arises when the
owned DoFs of a partition is empty.
Some more digging looks like I had an off by one error while constructing
the linear system which introduced an extra partitioning with range [0, 0)
tacked on the end. This partition contained no DoFs and led to the later
error. I am not sure if the error message could be more clear. I suspect it
was a series of silly events that led me here.
-Aiden
On Monday, July 29, 2024 at 11:35:56 AM UTC-4 Aiden Huffman wrote:
> Hi Everyone,
>
> I am trying to debug an error with my output function. I have an
> Trilinos::MPI::BlockVector and I am using a relatively simple output
> function
>
> template <int dim> void ChannelDropletSolver<dim>::output_solution(uint
> index) {
> std::vector<DataComponentInterpretation::DataComponentInterpretation>
> data_interp(dim,
>
> DataComponentInterpretation::component_is_part_of_vector);
> data_interp.push_back(DataComponentInterpretation::component_is_scalar);
> data_interp.push_back(DataComponentInterpretation::component_is_scalar);
> data_interp.push_back(DataComponentInterpretation::component_is_scalar);
>
> std::vector<std::string> component_names(dim, "velocity");
> component_names.emplace_back("pressure");
> component_names.emplace_back("concentration_A");
> component_names.emplace_back("concentration_B");
>
> DataOut<dim> data_out;
> data_out.attach_dof_handler(this->system_handler.dof_handler);
> data_out.add_data_vector(this->system_handler.dof_handler,
> this->system_handler.solution, component_names,
> data_interp);
>
> data_out.build_patches();
>
> data_out.write_vtu_with_pvtu_record("data/", "solution", index,
> mpi_comm, 3);
> }
>
> but it produces a strange error I've never seen before
>
> An error occurred in line <441> of file
> </home/ahuffman/dealii-candi/tmp/unpack/deal.II-v9.5.1/source/base/mpi_compute_index_owner_internal.cc>
>
> in function
> void
> dealii::Utilities::MPI::internal::ComputeIndexOwner::Dictionary::partition(const
>
> dealii::IndexSet&, MPI_Comm)
> The violated condition was:
> size > 0
> 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).
>
> Has anyone run into this before using MPI with Trilinos vectors and the
> DataOut object? I've included the stack trace, I am trying to come up with
> a minimal reproducible example now.
>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/dab46a73-0b29-420f-9eaa-147b6735783cn%40googlegroups.com.