Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL version 8

2025-01-21 Thread Ivan Krylov via R-help
В Mon, 20 Jan 2025 13:45:25 +
"Huseni, Sadamhusen"  пишет:

> Error in as.data.frame.default(x[[i]], optional = TRUE) :
>   cannot coerce class ‘"call"’ to a data.frame
> Calls: write.table ... data.frame -> as.data.frame ->
> as.data.frame.default

The underlying issue is that somehow the code gave a function call
instead of a data.frame or a matrix as an argument to write.table:

write.table(quote(any_function()))

It may help to run the script with options(error = recover) set or make
use of other debugging tips in the free book R Inferno
 to find out
how that happened.

-- 
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL version 8

2025-01-14 Thread Ivan Krylov via R-help
В Tue, 14 Jan 2025 14:23:54 +
"Huseni, Sadamhusen"  пишет:

> ###***Session information from Linux version 8
> R version 4.4.1 (2024-06-14)
> Platform: x86_64-redhat-linux-gnu
> Running under: Red Hat Enterprise Linux 8.10 (Ootpa)
>  
> Matrix products: default
> BLAS/LAPACK: /usr/lib64/libopenblaso-r0.3.15.so;  LAPACK version 3.9.0
 
> ###***Session information from Linux version 7
> 
> R version 3.6.0 (2019-04-26)
> Platform: x86_64-redhat-linux-gnu (64-bit)
> Running under: Red Hat Enterprise Linux
>  
> Matrix products: default
> BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

On RHEL 7, R was using the reference BLAS (linear algebra library).
On RHEL 8, R is using OpenBLAS compiled with OpenMP support. It is
probably creating its own threads, one per CPU, in every child process,
which gives you N^2 processes contending for N CPUs.

Try running your script with the environment variable
OPENBLAS_NUM_THREADS set to the string "1".

It might be possible to speed up the script by setting
OPENBLAS_NUM_THREADS=2 and dividing the number of child processes by
the same number.

-- 
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL version 8

2025-01-14 Thread Huseni, Sadamhusen
Hi Ivan,

I am sharing the session information as below. Also, I will be sharing the code 
which is utilized to do parallel computing.
Note: we are using different version of R on Linux version 7 & 8.

###***Session information from Linux version 8
R version 4.4.1 (2024-06-14)
Platform: x86_64-redhat-linux-gnu
Running under: Red Hat Enterprise Linux 8.10 (Ootpa)
 
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblaso-r0.3.15.so;  LAPACK version 3.9.0
 
locale:
[1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8   LC_NAME=C
[9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
 
time zone: America/New_York
tzcode source: system (glibc)
 
attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
 
loaded via a namespace (and not attached):
[1] compiler_4.4.1

###***Session information from Linux version 7

R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux
 
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
 
locale:
[1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8   LC_NAME=C
[9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
 
attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
 
loaded via a namespace (and not attached):
[1] compiler_3.6.0


Thanks,
Sadam

-Original Message-
From: Ivan Krylov  
Sent: Tuesday, January 14, 2025 1:53 PM
To: Huseni, Sadamhusen 
Cc: r-help@R-project.org
Subject: Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL 
version 8

>

Dear Sadam,

В Mon, 13 Jan 2025 14:34:20 +
"Huseni, Sadamhusen"  пишет:

> Issue Observed: The script hangs and does not complete execution 
> post-update. Previously, it took around two hours; now it runs for 
> over 17 hours without finishing.

Do you still have the RHEL 7 machine? Could you please share the
sessionInfo() output at least from the RHEL 8 machine but, if possible, also 
from the RHEL 7 machine?

>   library(foreach)
>   library(parallel)
>   library(parallelly)
>   library(forecast)
>   library(tseries)
>   library(prophet)
>   library(lubridate)
>   library(tis)
>   library(tsoutliers)

Could you identify and share the parts of the script that launch the 
computation in parallel?

--
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL version 8

2025-01-14 Thread akshay kulkarni
Dear Jan,
  Seems like it is. Can one search for posts without the 
posters name? Like in stack overflow?

THanking you,
Yours sincerely,
AKSHAY M KULKARNI

From: R-help  on behalf of Jan van der Laan 

Sent: Tuesday, January 14, 2025 3:09 PM
To: r-help@r-project.org 
Subject: Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL 
version 8


On 1/14/25 10:07, akshay kulkarni wrote:
> dear Ivan,
>THe present problem had been encountered by me also about 
> 1 and a half years ago. You had solved the issue then. Can't we search this 
> mail list according to some keywords? It helps people with problems already 
> solved in the mailing list.

Using a search engine and adding `site:stat.ethz.ch` (the mail archives
are hosted there) seems to work. For example:

https://duckduckgo.com/?q=AKSHAY++KULKARNI+parallel+site%3Astat.ethz.ch&t=ftsa&ia=web

Is any of these results what you are referring to?

Jan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL version 8

2025-01-14 Thread Jan van der Laan



On 1/14/25 10:07, akshay kulkarni wrote:

dear Ivan,
   THe present problem had been encountered by me also about 1 
and a half years ago. You had solved the issue then. Can't we search this mail 
list according to some keywords? It helps people with problems already solved 
in the mailing list.


Using a search engine and adding `site:stat.ethz.ch` (the mail archives 
are hosted there) seems to work. For example:


https://duckduckgo.com/?q=AKSHAY++KULKARNI+parallel+site%3Astat.ethz.ch&t=ftsa&ia=web

Is any of these results what you are referring to?

Jan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL version 8

2025-01-14 Thread akshay kulkarni
dear Ivan,
  THe present problem had been encountered by me also about 1 
and a half years ago. You had solved the issue then. Can't we search this mail 
list according to some keywords? It helps people with problems already solved 
in the mailing list.

THanking you,
Yours sincerely,
AKSHAY M KULKARNI


From: R-help  on behalf of Ivan Krylov via R-help 

Sent: Tuesday, January 14, 2025 1:52 PM
To: Huseni, Sadamhusen 
Cc: r-help@R-project.org 
Subject: Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL 
version 8

Dear Sadam,

� Mon, 13 Jan 2025 14:34:20 +
"Huseni, Sadamhusen"  �:

> Issue Observed: The script hangs and does not complete execution
> post-update. Previously, it took around two hours; now it runs for
> over 17 hours without finishing.

Do you still have the RHEL 7 machine? Could you please share the
sessionInfo() output at least from the RHEL 8 machine but, if possible,
also from the RHEL 7 machine?

>   library(foreach)
>   library(parallel)
>   library(parallelly)
>   library(forecast)
>   library(tseries)
>   library(prophet)
>   library(lubridate)
>   library(tis)
>   library(tsoutliers)

Could you identify and share the parts of the script that launch the
computation in parallel?

--
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
  
Virus-free.www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Regarding Issue Running Parallel Computing on Linux RHEL version 8

2025-01-14 Thread Ivan Krylov via R-help
Dear Sadam,

В Mon, 13 Jan 2025 14:34:20 +
"Huseni, Sadamhusen"  пишет:

> Issue Observed: The script hangs and does not complete execution
> post-update. Previously, it took around two hours; now it runs for
> over 17 hours without finishing.

Do you still have the RHEL 7 machine? Could you please share the
sessionInfo() output at least from the RHEL 8 machine but, if possible,
also from the RHEL 7 machine?

>   library(foreach)
>   library(parallel)
>   library(parallelly)
>   library(forecast)
>   library(tseries)
>   library(prophet)
>   library(lubridate)
>   library(tis)
>   library(tsoutliers)

Could you identify and share the parts of the script that launch the
computation in parallel?

-- 
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.