Carlo,

I think the problem is that you are using SolutionTransfer instead of
parallel::distributed::SolutionTransfer see
http://dealii.org/8.5.0/doxygen/deal.II/classparallel_1_1distributed_1_1SolutionTransfer.html

Best,

Bruno

2017-10-18 8:31 GMT-04:00 Carlo Marcati <[email protected]>:

> Here's the error and stack trace. To replicate it, it should be sufficient
> to use the SolutionTrasfer::interpolate function on two
> PETScWrappers::MPI::Vector.
> --------------------------------------------------------
> An error occurred in line <104> of file </home/carlo/software/dealii/s
> ource/lac/petsc_parallel_vector.cc> in function
>     dealii::PETScWrappers::MPI::Vector& dealii::PETScWrappers::MPI::Vector
> ::operator=(const dealii::PETScWrappers::MPI::Vector&)
> The violated condition was:
>     v.last_action == VectorOperation::unknown
> Additional information:
>     You tried to do a ??? operation but the vector is currently in 'set'
> mode. You first have to call 'compress()'.
>
> Stacktrace:
> -----------
> #0  /usr/local/lib/libdeal_II.g.so.9.0.0-pre: dealii::PETScWrappers::MPI::
> Vector::operator=(dealii::PETScWrappers::MPI::Vector const&)
> #1  /usr/local/lib/libdeal_II.g.so.9.0.0-pre: dealii::SolutionTransfer<2,
> dealii::PETScWrappers::MPI::Vector, dealii::hp::DoFHandler<2, 2>
> >::interpolate(dealii::PETScWrappers::MPI::Vector const&,
> dealii::PETScWrappers::MPI::Vector&) const
> #2  ./linear: 
> Step27::LaplaceProblem<2>::setup_system(dealii::SolutionTransfer<2,
> dealii::PETScWrappers::MPI::Vector, dealii::hp::DoFHandler<2, 2> > const&)
> #3  ./linear: Step27::LaplaceProblem<2>::postprocess(unsigned int, bool,
> bool, unsigned int)
> #4  ./linear: Step27::LaplaceProblem<2>::run()
> #5  ./linear: main
> --------------------------------------------------------
>
>
>
> Il giorno mercoledì 18 ottobre 2017 14:20:52 UTC+2, Bruno Turcksin ha
> scritto:
>>
>> Carlo,
>>
>> what is the error that you get? The program crashes is too vague.
>>
>> Best,
>>
>> Bruno
>>
>> On Wednesday, October 18, 2017 at 6:46:11 AM UTC-4, Carlo Marcati wrote:
>>>
>>>
>>> Hi,
>>> I am trying to use a SolutionTrasfer object with
>>> PETScWrappers::MPI::Vector. When trying to do 
>>> solution_trasfer.interpolate(in,
>>> out), the program crashes at the last line of the
>>> void SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate
>>> (const VectorType &in,
>>>  VectorType       &out) const
>>> function, i.e., at
>>>     out=all_out[0];
>>> This happens because all_out[0] is in the wrong state.
>>>
>>> Writing
>>> all_out[0].compress (VectorOperation::insert);
>>> before that line would probably solve the issue, though it is obviously
>>> specific to PETSc vectors.
>>>
>>> The version of the interpolate function that takes vectors of vectors as
>>> input, i.e.,
>>> void SolutionTransfer<dim, VectorType, DoFHandlerType>::
>>> interpolate (const std::vector<VectorType> &all_in,
>>>              std::vector<VectorType>       &all_out) const
>>>  works fine.
>>>
>>> Best regards,
>>> Carlo
>>>
>>>
>>>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/dealii/SJeEE8HfNSs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to