[deal.II] PETScWrappers::MPI::SparseMatrix vmult error

2023-12-22 Thread Laryssa Abdala
Dear all, 

I am getting a PETSc error when trying to multiply a sparse matrix by a 
vector and am not sure how to get around it. I initialize my 2x284 
PETScWrappers::MPI::SparseMatrix like this: 
  m_myocardial_dof_volume_matrix.reinit(
i_myocardial_dof_handler.locally_owned_dofs(),
i_network_dof_handler.locally_owned_dofs(),
m_dynamic_sparsity_pattern,
m_comm);
its entries are:
(1,123) 0.00155383
(1,125) 0.000841909
(1,129) 0.00125203

then, I create a vector of ones and try to multiple the matrix by such 
vector:
 PETScWrappers::MPI::Vector ones(
i_myocardial_dof_handler.locally_owned_dofs(), m_comm);
  ones = 1;
  ones.compress(VectorOperation::insert);
  PETScWrappers::MPI::Vector temp(
i_network_dof_handler.locally_owned_dofs(), m_comm);
  m_myocardial_dof_volume_matrix.vmult(temp, ones);

This is the error I get:
[0]PETSC ERROR: - Error Message 
--
[0]PETSC ERROR: Corrupted Petsc object
[0]PETSC ERROR: Missing Inode Structure
[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html 
for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
[0]PETSC ERROR: ./Coupling1DTo3D on a linux-debug named LAPTOP-B3AHATNL by 
labdala Fri Dec 22 17:51:49 2023
[0]PETSC ERROR: Configure options --with-mpicc=/usr/bin/mpicc 
--with-mpicxx=/usr/bin/mpicxx --with-mpifc=/usr/bin/mpif90 
--with-debugging=1 --download-hypre=1 --download-mumps=1 
--download-scalapack=1 --download-blacs=1 --download-hdf5=1 --with-x=0 
--download-fblaslapack=1
[0]PETSC ERROR: #1 MatMult_SeqAIJ_Inode() line 383 in 
/home/labdala/sfw/petsc/3.13.2/src/mat/impls/aij/seq/inode.c
[0]PETSC ERROR: #2 MatMult() line 2401 in 
/home/labdala/sfw/petsc/3.13.2/src/mat/interface/matrix.c
terminate called after throwing an instance of 
'dealii::LACExceptions::ExcPETScError'
  what():

An error occurred in line <526> of file 
 in 
function
void 
dealii::PETScWrappers::MatrixBase::vmult(dealii::PETScWrappers::VectorBase&, 
const dealii::PETScWrappers::VectorBase&) const
The violated condition was:
ierr == 0
Additional information:
deal.II encountered an error while calling a PETSc function.
The description of the error provided by PETSc is "Corrupted Petsc
object".
The numerical value of the original error code is 74.

I think this is related to the fact that the first row of the matrix does 
not have any nonzero entries. Is that it? Either way, any suggestions on 
how to go about this issue would be very helpful. 

Thank you, 
Laryssa

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/e029436f-478b-496d-9dca-229321f98d2dn%40googlegroups.com.


[deal.II] Re: How to get a vector graphic (like SVG) in dealii?

2023-12-14 Thread Laryssa Abdala
Hey Masoud, 

You can open vtk and vtu files using Paraview and export them using "Export 
Scene". You can find more information here: 
https://www.paraview.org/Wiki/ParaView/Vector_Graphics_Export

I hope this helps, 
Laryssa
On Wednesday, December 13, 2023 at 7:36:06 PM UTC-5 masou...@gmail.com 
wrote:

> @WB
>
> Thanks for the reply.
> I meant the mesh with the results. Yes, GridOut works perfectly for just 
> mesh, but I want to show the solution too.
> Yes, I have already tried and can confirm that it is not fun work as you 
> said.
>
> @Marc
> Thanks for the links, I will give them a try.
> I had seen the second link, but the problem was with the higher-order 
> nodes.
>
> Regards,
> Masoud
> On Wednesday 13 December 2023 at 21:39:05 UTC mafe...@gmail.com wrote:
>
>> On Tuesday, December 12, 2023 at 6:39:31 AM UTC-7 masou...@gmail.com 
>> wrote:
>>
>> I also tried to write a Python code for this purpose using vtk and 
>> matplotlib libraries. It works almost fine, but when I want to plot the 
>> mesh too, there are problems.
>>
>> A while ago I used matplotlib to create vector graphics out of VTK files. 
>> As a reference I used this resource:
>> https://perso.univ-rennes1.fr/pierre.navaro/read-vtk-with-python.html
>>  
>>
>> I used Triangulation from matplotlib.tri, but it only supports triangles 
>> mesh, while my mesh type is quadrilaterals.
>>
>> Workarounds exist for this, see:
>>
>> https://stackoverflow.com/questions/52202014/how-can-i-plot-2d-fem-results-using-matplotlib
>>  
>> Hope this helps!
>> Marc
>>
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/9a61dea9-a9d7-4e60-b171-a858f577232cn%40googlegroups.com.


[deal.II] Re: How to transpose a distributed PETScWrappers::MPI::SparseMatrix

2023-07-22 Thread Laryssa Abdala
Never mind, I have been using version 9.4.2. There are a couple of extra 
features implemented in the newest versions that will help me, e.g., there 
is a PETScWrappers::MatrixBase constructor that takes a Mat as input
(https://github.com/dealii/dealii/commit/97911ba3839d7a06c3fb0cd06f7574ea0849103b).
 
Thanks to the developers :)


On Friday, July 21, 2023 at 7:07:22 PM UTC-4 Laryssa Abdala wrote:

> Hello everyone, 
>
> It seems like PETScWrappers::MatrixBase::transpose()  
> <https://www.dealii.org/current/doxygen/deal.II/classPETScWrappers_1_1MatrixBase.html#aacd76b6ce3247735964836a82eedff6d>
>  only 
> works in serial. Is there a way to transpose a distributed 
> PETScWrappers::MPI::SparseMatrix in place? It seems like the way to do this 
> is to:
> Mat temp;
> MatTranspose( petsc_wrapper_matrix,  MAT_INITIAL_MATRIX, );
>  
> From there, is there a way to copy a Mat into a 
> PETScWrappers::MPI::SparseMatrix? Please let me know if I am 
> missing something or if you have other suggestions.
>
> Thank you, 
> Laryssa
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/1897a935-af08-4e75-a3d6-201b79a25314n%40googlegroups.com.


[deal.II] How to transpose a distributed PETScWrappers::MPI::SparseMatrix

2023-07-21 Thread Laryssa Abdala
Hello everyone,

It seems like PETScWrappers::MatrixBase::transpose()

only
works in serial. Is there a way to transpose a distributed
PETScWrappers::MPI::SparseMatrix in place? It seems like the way to do this
is to:
Mat temp;
MatTranspose( petsc_wrapper_matrix,  MAT_INITIAL_MATRIX, );

>From there, is there a way to copy a Mat into a
PETScWrappers::MPI::SparseMatrix? Please let me know if I am
missing something or if you have other suggestions.

Thank you,
Laryssa

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAGtr4iBT5iQ-c0cJMa6AQWFVbahTONWUjzmE1yfdT52BvRcj_w%40mail.gmail.com.


Re: [deal.II] Linking error when compiling examples: undefined reference to 'boost::archive::archive_exception::archive_exception(boost::archive::archive_exception const&)'

2023-03-21 Thread Laryssa Abdala

Great, that solved the problem. Thank you.
The problem was that I had extracted the boost headers locally and had not 
built/installed it. David Wells (thanks David!) reported the issue 
here: https://github.com/dealii/dealii/issues/14925. Since then, I have 
been trying to link one of my projects against deal.ii (copy with bundled 
boost) and I get this error:

c++: error: unrecognized command line option ‘-fopenmp-simd’
make[2]: *** [Tests/CodimHeatEquation/CMakeFiles/demo.dir/demo.cc.o] Error 1
make[1]: *** [Tests/CodimHeatEquation/CMakeFiles/demo.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs
[  6%] Building CXX object CMakeFiles/fchep.dir/src/Datafile.cpp.o
[ 13%] Building CXX object CMakeFiles/fchep.dir/src/EPSolver.cpp.o
[ 13%] Building CXX object 
CMakeFiles/fchep.dir/src/IonicModels/FentonKarma4v.cpp.o
[ 16%] Building CXX object 
CMakeFiles/fchep.dir/src/IonicModels/IonicModel.cpp.o
[ 20%] Building CXX object 
CMakeFiles/fchep.dir/src/IonicModels/MinimalModel.cpp.o
[ 23%] Building CXX object 
CMakeFiles/fchep.dir/src/IonicModels/NashPanfilov.cpp.o
[ 26%] Building CXX object 
CMakeFiles/fchep.dir/src/IonicModels/Passive.cpp.o
[ 30%] Building CXX object CMakeFiles/fchep.dir/src/IonicModels/Ryzhii.cpp.o
[ 40%] Building CXX object CMakeFiles/fchep.dir/src/Timer.cpp.o
[ 40%] Building CXX object CMakeFiles/fchep.dir/src/TimeData.cpp.o
[ 40%] Building CXX object 
CMakeFiles/fchep.dir/src/IonicModels/vanderPolDuffing.cpp.o
In file included from 
/nas/longleaf/home/laryssa/dogwood/sfw/dealii/install-dbg/include/deal.II/bundled/boost/fusion/support/tag_of.hpp:14:0,
 from 
/nas/longleaf/home/laryssa/dogwood/sfw/dealii/install-dbg/include/deal.II/bundled/boost/fusion/support/category_of.hpp:11,
 from 
/nas/longleaf/home/laryssa/dogwood/sfw/dealii/install-dbg/include/deal.II/bundled/boost/fusion/adapted/struct/detail/extension.hpp:14,
 from 
/nas/longleaf/home/laryssa/dogwood/sfw/dealii/install-dbg/include/deal.II/bundled/boost/fusion/adapted/struct/adapt_struct.hpp:22,
 from 
/nas/longleaf/home/laryssa/dogwood/sfw/dealii/install-dbg/include/deal.II/bundled/boost/fusion/adapted/std_pair.hpp:14,
 from 
/nas/longleaf/home/laryssa/dogwood/sfw/dealii/install-dbg/include/deal.II/bundled/boost/fusion/include/std_pair.hpp:11,
 from /nas/longleaf/home/laryssa/fch-ep/src/Datafile.h:11,
 from /nas/longleaf/home/laryssa/fch-ep/src/Datafile.cpp:8:
/nas/longleaf/home/laryssa/dogwood/sfw/dealii/install-dbg/include/deal.II/bundled/boost/fusion/support/detail/is_mpl_sequence.hpp:12:69:
 
fatal error: boost/fusion/support/detail/is_native_fusion_sequence.hpp: No 
such file or directory
 #include 
 ^
compilation terminated.

Shouldn't fusion be available once I use the bundled version of boost? I am 
not sure what to get out of this error message.

Thanks again, 
Laryssa
 

On Monday, March 20, 2023 at 1:51:24 PM UTC-4 Wolfgang Bangerth wrote:

> On 3/19/23 15:47, Laryssa Abdala wrote:
> > 
> > I've tried using different versions of boost, but have not been 
> > successful with any. I've attached the detailed.log if anyone could help 
> > me.
>
> Laryssa, I don't know specifically what causes this error, but you can 
> almost certainly avoid it if you use the bundled version of deal.II. I 
> believe that you can achieve that by passing
> -DEAL_II_FORCE_BUNDLED_BOOST=ON
> to cmake when you configure. In the output, cmake currently reports 
> (based on the file you had attached) this:
> # DEAL_II_WITH_BOOST set up with external dependencies
> With the flag above, it should then say that it is using the 'bundled' 
> version of BOOST instead.
>
> Best
> W.
>
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/261cbc2d-7920-4000-8cc3-154d148b32a4n%40googlegroups.com.


[deal.II] Linking error when compiling examples: undefined reference to 'boost::archive::archive_exception::archive_exception(boost::archive::archive_exception const&)'

2023-03-19 Thread Laryssa Abdala
Hello everyone,

I am currently building dealii on a cluster and am getting a linking error
when compiling some of the examples. This is what I get:

../lib/libdeal_II.g.so.9.4.1: error: undefined reference to
'boost::archive::archive_exception::archive_exception(boost::archive::archive_exception
const&)'
../lib/libdeal_II.g.so.9.4.1: error: undefined reference to
'boost::archive::basic_binary_iarchive::load_override(boost::archive::class_name_type&)'
../lib/libdeal_II.g.so.9.4.1: error: undefined reference to
'boost::archive::basic_binary_oprimitive >::save(std::__cxx11::basic_string, std::allocator > const&)'
collect2: error: ld returned 1 exit status

I've tried using different versions of boost, but have not been successful
with any. I've attached the detailed.log if anyone could help me.

Thanks,
Laryssa

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAGtr4iDRFzFjZaPEdnzBVUhKzyA6NAQas7ytWJKB9RLJ96_Qpg%40mail.gmail.com.


detailed.log
Description: Binary data


[deal.II] returning ArrayView in a function

2022-11-25 Thread Laryssa Abdala
Hi,

I am trying to create a function that returns an ArrayView to a Tensor,
like this:
const ArrayView> function{
return make_array_view(table, row, start_col, size_view;
}
This gives me a segmentation fault.

I looked through some of the ArrayView tests and at the function
get_properties() defined on line 53

of
file property_pool.cc
,
which helped me understand the pointer-like-nature of ArrayView. However,
none of them seem to allocate dynamic memory for the ArrayView object
before returning it. Should I allocate dynamic memory to avoid the
segfault? If so, how?

Thanks,
Laryssa

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAGtr4iDHh8Fp2-GvSaSwmqTGbcxoGuf4_wovqr88ea%3DxKNa8%2Bw%40mail.gmail.com.