<div dir="ltr"><div>Hi Oliver,</div><div><br></div><div>The calls to storeMatrixMarket are easily fixed with the following template<br></div><div>template<><br>struct MatrixMarketImpl::mm_numeric_type<precise> {<br>  enum {<br>    is_numeric=true<br>  };<br>  static std::string str()  {<br>    return "GMPField";<br>  }<br>};<br></div><div><br></div><div>But other errors require more effort.</div><div><br>dune-istl-2.7.1/dune/istl/ilu.hh:203:30: error: invalid cast from type ‘__gmp_expr<__mpf_struct [1], __gmp_unary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_abs_function> >’ to type ‘int’<br>             int generation = (int) Simd::lane(0,abs( firstmatrixelement(*kj) ));</div><div><br></div><div>dune-istl-2.7.1/dune/istl/solver.hh:481:26: error: invalid static_cast from type ‘Dune::Simd::Scalar<__gmp_expr<__mpf_struct [1], __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides> > >’ {aka ‘__gmp_expr<__mpf_struct [1], __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides> >’} to type ‘double’<br>         _res.reduction = static_cast<double>(Simd::max(_def/_def0));</div><div><br></div><div>dune/common/simd/defaults.hh:134:15: error: use of deleted function ‘__gmp_expr<__mpf_struct [1], __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides> >& __gmp_expr<__mpf_struct [1], __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides> >::operator=(const __gmp_expr<__mpf_struct [1], __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides> >&)’<br>             m = Simd::lane(l, v);</div><div><br></div><div>/usr/local/include/gmpxx.h:2391:7: note: ‘__gmp_expr<__mpf_struct [1], __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides> >& __gmp_expr<__mpf_struct [1], __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides> >::operator=(const __gmp_expr<__mpf_struct [1], __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides> >&)’ is implicitly deleted because the default definition would be ill-formed:<br> class __gmp_expr<br>       ^~~~~~~~~~<br> <T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<T, T>, Op> ></div><div><br></div><div></div><div>/usr/local/include/gmpxx.h:2391:7: error: use of deleted function ‘__gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides>& __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides>::operator=(const __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides>&)’<br>/usr/local/include/gmpxx.h:1470:8: note: ‘__gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides>& __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides>::operator=(const __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides>&)’ is implicitly deleted because the default definition would be ill-formed:<br> struct __gmp_binary_expr<br>        ^~~~~~~~~~~~~~~~~<br>/usr/local/include/gmpxx.h:1470:8: error: non-static reference member ‘const __gmp_expr<__mpf_struct [1], __mpf_struct [1]>& __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides>::val1’, can’t use default assignment operator<br>/usr/local/include/gmpxx.h:1470:8: error: non-static reference member ‘const __gmp_expr<__mpf_struct [1], __mpf_struct [1]>& __gmp_binary_expr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_expr<__mpf_struct [1], __mpf_struct [1]>, __gmp_binary_divides>::val2’, can’t use default assignment operator</div><div><br></div><div>Best,</div><div>Kirill<br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 10 июн. 2021 г. в 06:44, Oliver Sander <<a href="mailto:oliver.sander@tu-dresden.de">oliver.sander@tu-dresden.de</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Kirill,<br>
<br>
so the problem are the calls to storeMatrixMarket?  They are not needed<br>
for the example program to work, and you can simply remove them.<br>
<br>
The example program has these calls because later examples in the book<br>
need the Poisson matrix and rhs as MatrixMarket files, and I wanted to<br>
show the readers how to write such files.<br>
<br>
Best,<br>
Oliver<br>
<br>
On 10.06.21 00:12, Dedner, Andreas wrote:<br>
> Not sure which solver package might work 'out of the box'. The issue you encountered in dune-istl seems quite small -<br>
> I'm not an expert but probably the issue with the missing 'str' can be easily fixed. Perhaps someone with more insight can<br>
> give a hint. Of course there might be more difficult issues later in the code.<br>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
> *From:* Kirill Volyanskiy <<a href="mailto:vol.kirill@gmail.com" target="_blank">vol.kirill@gmail.com</a>><br>
> *Sent:* 09 June 2021 12:07<br>
> *To:* Dedner, Andreas <<a href="mailto:A.S.Dedner@warwick.ac.uk" target="_blank">A.S.Dedner@warwick.ac.uk</a>><br>
> *Subject:* Re: [Dune] GMPField use<br>
> Thank you. Could you recommend another solver library compatible with GMPField?<br>
> <br>
> ср, 9 июн. 2021 г. в 12:54, Dedner, Andreas <<a href="mailto:A.S.Dedner@warwick.ac.uk" target="_blank">A.S.Dedner@warwick.ac.uk</a> <mailto:<a href="mailto:A.S.Dedner@warwick.ac.uk" target="_blank">A.S.Dedner@warwick.ac.uk</a>>>:<br>
> <br>
>     The issue is that the class<br>
>     `mm_numeric_type` in dune/istl/matrixmarket.hh is overloaded for a number of types, i.e., int/double etc. There is no overload for GMPField and default implementation of the class doesn't have a 'str' method.<br>
>     ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
>     *From:* Kirill Volyanskiy <<a href="mailto:vol.kirill@gmail.com" target="_blank">vol.kirill@gmail.com</a> <mailto:<a href="mailto:vol.kirill@gmail.com" target="_blank">vol.kirill@gmail.com</a>>><br>
>     *Sent:* 09 June 2021 10:17<br>
>     *To:* Dedner, Andreas <<a href="mailto:A.S.Dedner@warwick.ac.uk" target="_blank">A.S.Dedner@warwick.ac.uk</a> <mailto:<a href="mailto:A.S.Dedner@warwick.ac.uk" target="_blank">A.S.Dedner@warwick.ac.uk</a>>><br>
>     *Subject:* Re: [Dune] GMPField use<br>
>     Hi.<br>
>     Thank you for your reply.<br>
>     I am using DUNE 2.7.1, GMP 6.2.1.<br>
>     I've taken the program from sander-getting-started-with-dune-2-7.pdf and changed some types to GMPField<128> (see in the attached file).<br>
>     The compilation results are in the errors.txt file.<br>
> <br>
>     Best<br>
>     Kirill<br>
> <br>
>     ср, 9 июн. 2021 г. в 10:41, Dedner, Andreas <<a href="mailto:A.S.Dedner@warwick.ac.uk" target="_blank">A.S.Dedner@warwick.ac.uk</a> <mailto:<a href="mailto:A.S.Dedner@warwick.ac.uk" target="_blank">A.S.Dedner@warwick.ac.uk</a>>>:<br>
> <br>
>         Hi.<br>
>         Happy to help but we need a bit more information about what you <br>
are trying to do.<br>
>         Where are you using the GMPField, perhaps you could provide a bit of code showing the errors or at least attach the errors you are getting. I don't have any idea why a 'str' function would be needed for a 'Field' class.<br>
> <br>
>         The GMPField has been used in a very specific context so far and I would imaging that using it in for example the istl AMG solver will cause problems with some missing functionality.<br>
>         Best<br>
>         Andreas<br>
>         ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
>         *From:* Dune <<a href="mailto:dune-bounces@lists.dune-project.org" target="_blank">dune-bounces@lists.dune-project.org</a> <mailto:<a href="mailto:dune-bounces@lists.dune-project.org" target="_blank">dune-bounces@lists.dune-project.org</a>>> on behalf of Kirill Volyanskiy <<a href="mailto:vol.kirill@gmail.com" target="_blank">vol.kirill@gmail.com</a> <mailto:<a href="mailto:vol.kirill@gmail.com" target="_blank">vol.kirill@gmail.com</a>>><br>
>         *Sent:* 08 June 2021 08:39<br>
>         *To:* <a href="mailto:dune@lists.dune-project.org" target="_blank">dune@lists.dune-project.org</a> <mailto:<a href="mailto:dune@lists.dune-project.org" target="_blank">dune@lists.dune-project.org</a>> <<a href="mailto:dune@lists.dune-project.org" target="_blank">dune@lists.dune-project.org</a> <mailto:<a href="mailto:dune@lists.dune-project.org" target="_blank">dune@lists.dune-project.org</a>>><br>
>         *Subject:* [Dune] GMPField use<br>
>         Hello,<br>
>         Is there any guide on using the GMPField? I've tried to use it but got many errors in some modules like absence of str() function etc.<br>
> <br>
>         Best regards,<br>
>         Kirill<br>
> <br>
> <br>
> _______________________________________________<br>
> Dune mailing list<br>
> <a href="mailto:Dune@lists.dune-project.org" target="_blank">Dune@lists.dune-project.org</a><br>
> <a href="https://lists.dune-project.org/mailman/listinfo/dune" rel="noreferrer" target="_blank">https://lists.dune-project.org/mailman/listinfo/dune</a><br>
> <br>
<br>
</blockquote></div></div>