Re: [R-pkg-devel] Issue with flang-new (segfault from C stack overflow)

2023-12-18 Thread Tomas Kalibera
On 12/18/23 16:41, Jisca Huisman wrote: Hello Ivan & Tomas, Thank you for your time and helpful suggestions! The finer details of memory use and heap vs stack are still outside my comfort zone, but some trial and error shows that using an allocatable does indeed solve the issue. When using

Re: [R-pkg-devel] Issue with flang-new (segfault from C stack overflow)

2023-12-18 Thread Jisca Huisman
Hello Ivan & Tomas, Thank you for your time and helpful suggestions! The finer details of memory use and heap vs stack are still outside my comfort zone, but some trial and error shows that using an allocatable does indeed solve the issue. When using the largest value I expect users to use

Re: [R-pkg-devel] Issue with flang-new (segfault from C stack overflow)

2023-12-18 Thread Tomas Kalibera
On 12/18/23 15:09, Ivan Krylov wrote: В Mon, 18 Dec 2023 11:06:16 +0100 Jisca Huisman пишет: I isolated the problem in a minimal working example available here: https://github.com/JiscaH/flang_segfault_min_example . All that does is pass a vector of length N*N back and forth between R and

Re: [R-pkg-devel] Issue with flang-new (segfault from C stack overflow)

2023-12-18 Thread Ivan Krylov
В Mon, 18 Dec 2023 11:06:16 +0100 Jisca Huisman пишет: > I isolated the problem in a minimal working example available here: > https://github.com/JiscaH/flang_segfault_min_example . All that does > is pass a vector of length N*N back and forth between R and Fortran. > It works fine for very

Re: [Rd] [External] Re: zapsmall(x) for scalar x

2023-12-18 Thread Steve Martin
Does mFUN() really need to be a function of x and the NA values of x? I can't think of a case where it would be used on anything but the non-NA values of x. I think it would be easier to specify a different mFUN() (and document this new argument) if the function has one argument and is applied to

[R-pkg-devel] Issue with flang-new (segfault from C stack overflow)

2023-12-18 Thread Jisca Huisman
Hello, My package sequoia contains Fortran code, and failed to pass the pre-test on Debian with the new flang-new compiler. I was able to reproduce the issue, but strongly suspect it is an issue with flang-new-17 rather than with my code. However, since in the past when I thought the problem

Re: [Rd] [External] Re: zapsmall(x) for scalar x

2023-12-18 Thread Serguei Sokol via R-devel
Le 18/12/2023 à 11:24, Martin Maechler a écrit : Serguei Sokol via R-devel on Mon, 18 Dec 2023 10:29:02 +0100 writes: > Le 17/12/2023 à 18:26, Barry Rowlingson a écrit : >> I think what's been missed is that zapsmall works relative to the absolute >> largest value in the

Re: [Rd] [External] Re: zapsmall(x) for scalar x

2023-12-18 Thread Martin Maechler
> Serguei Sokol via R-devel > on Mon, 18 Dec 2023 10:29:02 +0100 writes: > Le 17/12/2023 à 18:26, Barry Rowlingson a écrit : >> I think what's been missed is that zapsmall works relative to the absolute >> largest value in the vector. Hence if there's only one >>

Re: [Rd] [External] Re: zapsmall(x) for scalar x

2023-12-18 Thread Serguei Sokol via R-devel
Le 17/12/2023 à 18:26, Barry Rowlingson a écrit : I think what's been missed is that zapsmall works relative to the absolute largest value in the vector. Hence if there's only one item in the vector, it is the largest, so its not zapped. The function's raison d'etre isn't to replace absolutely

Re: [R-pkg-devel] CRAN submission struggle

2023-12-18 Thread Ivan Krylov
On Sun, 17 Dec 2023 21:48:51 +0200 Christiaan Pieterse wrote: > Warning in complexity_measures(Mbin, method = "reflections", > iterations = iterCompl) : > 'iterations' was changed to 'iterations + 1' to work with an even > number of iterations > Killed If this is happening on Linux, this