[R] mclapply enters into an infinite loop....

akshay kulkarni @k@h@y_e4 @end|ng |rom hotm@||@com
Wed May 17 15:55:59 CEST 2023


Dear Jeff,
                There was a problem in LYGH and lapply threw an error, but mclapply got stuck in an infinite loop. The doc for mclapply says that mclapply runs under try() with silent = TRUE. So that means mclapply should run properly, i.e output a try class object and exit. But it didn't. Can you shed some light on why this happened?

THanking you,
Yours sincerely,
AKSHAY M KULKARNI
________________________________
From: R-help <r-help-bounces using r-project.org> on behalf of Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
Sent: Wednesday, May 17, 2023 5:24 AM
To: r-help using r-project.org <r-help using r-project.org>
Subject: Re: [R] mclapply enters into an infinite loop....

It does not look to me like you are providing the necessary arguments to arfima.

Try making this work with lapply first... then try mclapply.

On May 16, 2023 3:10:45 PM PDT, akshay kulkarni <akshay_e4 using hotmail.com> wrote:
>Dear members,
>                         I am using arfima in an mclapply construction (from the parallel package):
>
>Browse[2]> LYG <- mclapply(LYGH, FUN = arfima, mc.cores = detectCores())
>^C
>Browse[2]> LYG <- mclapply(LYGH[1:10], FUN = arfima, mc.cores = detectCores())
>^C
>Browse[2]> LYG <- mclapply(LYGH[1:2], FUN = arfima, mc.cores = detectCores())
>^C
>
>You can see that I am aborting the execution of mclapply. It doesn't finish even if I reduce the elements to be iterated over to 2. Why is it entering an infinite loop?
>
>Please exhort me if this is to be posted in HPC list.
>
>THanking you,
>Yours sincerely,
>ALSHAY M KULKARNI
>
>       [[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.

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

	[[alternative HTML version deleted]]



More information about the R-help mailing list