Le 08/06/2021 ? 18:32, Martin Maechler a ?crit?:>>>>>> Dario Strbenac
>>>>>> on Tue, 8 Jun 2021 09:00:04 +0000 writes:
> > Good day, Indeed, changing the logical test is a
> > workaround to the problem. However, a segmentation fault
> > means that the software tried to access an invalid memory
> > location, so I think the original problem should be
> > addressed in Matrix package, regardless.
>
> Hmm, you maybe right or not ..
>
> Note we have the situation you (via R) ask your computer
> (i.e. the OS system memory allocation routines) to provide
> memory.
>
> In a reasonable setup, the OS routine returns, saying
> "I cannot provide the memory you asked for",
> and the R function stop() s. .. no segfault, all is fine.
>
> The problem that on some platforms that does not work, is a
> relatively deep problem and also has happened in base R in some
> cases on some platforms (possibly never on Linux based ones
> (Ubuntu, Debian, Fedora, CentOS..), but maybe I'm too
> optimistic there as well.
>
> Note: I now also tried on our oldish Windows (Terminal) Server,
> and it also just gave errors that it could not allocate so much
> memory but did not produce a seg.fault.
>
>
> Currently, I don't see what we should improve in the Matrix
> package here.
Is it possible (pure hypothesis) that when such a big piece of memory is
available, some int32 counter is out of bounds?
Here, we have almost 1.e10 non-zero elements. This number is greater
than 2**31-1 (int32 limit) and even greater than unit32 limit (2**32).
Just a thought.
Best,
Serguei.
>
> Martin Maechler
> (co-maintainer of 'Matrix')
>
> > --------------------------------------
> > Dario Strbenac University of Sydney Camperdown NSW 2050
> > Australia
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel