Hi Daniel,

I was able to sort this issue out. What I did was removed everything 
related to armadillo in the cmakelists.txt and just linked armadillo to my 
target using  the following line in the end of the file 
TARGET_LINK_LIBRARIES(${TARGET} armadillo)
I am able to run small programs using armadillo within dealii.

I have another question which might not be in the scope of this forum. 
However, since you and Jean have worked with armadillo (by looking at the 
Ceres code gallery program), I was wondering if any of you can help. 

My question is, I want to use the eigenvalue problem solving capability of 
armadillo in my code. However, my matrix type is of BlockSparseMatrix in 
dealii. How do I go about using my BlockSparseMatrix with the available 
armadillo functions that use sp_mat type matrices 
<http://arma.sourceforge.net/docs.html#SpMat>? One idea that I thought was 
to print my block_sparse_matrix using the function block_write() 
<https://www.dealii.org/current/doxygen/deal.II/classSparseMatrix.html#a8b32b99a054482f06fc026248c27bb74>
 
that prints the dealii Sparse_matrix in a binary format. However, I am not 
able to read that file using armadillo's functionality to load binary files 
<http://arma.sourceforge.net/docs.html#save_load_mat>.

Thanks!

Animesh

On Wednesday, December 23, 2020 at 2:22:38 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Daniel, 
>
> I also want to use armadillo for one of my projects. I did exactly as you 
> suggested in the link above. The cmake worked perfectly. However, on doing 
> make run, I am getting the following error. I installed armadillo using the 
> apt-get package manager - command was - *sudo apt-get install 
> libarmadillo-dev*
>
> Error:
>
> /usr/bin/ld.gold: error: /usr/include/armadillo:1:4: syntax error, 
> unexpected STRING
> /usr/bin/ld.gold: error: /usr/include/armadillo: not an object or archive
> collect2: error: ld returned 1 exit status
> CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.dir/build.make:122:
>  
> recipe for target 'Quasi_Static_Finite_Strain_Beam_Buckling_Analysis' failed
> make[3]: *** [Quasi_Static_Finite_Strain_Beam_Buckling_Analysis] Error 1
> CMakeFiles/Makefile2:163: recipe for target 
> 'CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.dir/all' 
> failed
> make[2]: *** 
> [CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.dir/all] 
> Error 2
> CMakeFiles/Makefile2:138: recipe for target 'CMakeFiles/run.dir/rule' 
> failed
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
> Makefile:144: recipe for target 'run' failed
> make: *** [run] Error 2
>
> I was wondering if you can help me with this issue!
>
> Thanks a lot!
>
> Animesh
>
> On Thursday, May 17, 2018 at 3:17:11 AM UTC+5:30 Daniel Arndt wrote:
>
>> Pal,
>>
>> We also just updated the CMakeLists.txt file for an example in our 
>> code-gallery that uses armadillo.
>> You might want to look at 
>> https://github.com/dealii/code-gallery/blob/master/CeresFE/CMakeLists.txt
>> .
>>
>> Best,
>> Daniel
>>
>

-- 
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/87d9b5dd-a635-4f6a-9c24-a39b6f0f0a2en%40googlegroups.com.

Reply via email to