Skip to main content

Questions tagged [parallel-foreach]

this is a library in R which allows for easy parallel processing

parallel-foreach
0 votes
1 answer
76 views

R foreach does not improve speed

I am trying to use foreach to parallelize some matrix calculations. However, I found it gives similar performance to apply and for loop, despite I used 10 cores. library(microbenchmark) library(...
Taotao Tan's user avatar
0 votes
2 answers
58 views

Using timeout and parallel in operations with DB

I have implemented a code that does several operations on the DB. Now I have decided to parallelize it to improve performance. To do this I have changed all asynchronous operations to synchronous, and ...
Kenzo_Gilead's user avatar
  • 2,417
0 votes
1 answer
24 views

R crashes with segfault in doing keras::unserialize_model() in foreach loop from doParallel

I'm having a problem where R crashes when calling keras::unserialize_model() in a doParallel foreach loop. I have to sanitize this code, so hopefully I don't munge anything. And I'm not an R developer;...
MikeB's user avatar
  • 1,528
0 votes
1 answer
32 views

sf_distance within for within for each parallelisation

Overall, I have a data frame with buildings with a spatial variable connected. Then I have another file of e.g. forests, similarly Total_df: Id Variables SFC Point object Zip codes 1 10 POINT (...
user23675742's user avatar
0 votes
2 answers
100 views

StopIteration error in nested foreach/for loop

I've got a nasty error which only shows up when you ask R with geterrmessage() to actually display it. It also is no problem as long as you run the code in an interactive console session but when you ...
MarkH's user avatar
  • 320
1 vote
1 answer
65 views

foreach gives the expected output only if I put a print statement at the end of the loop

I am using foreach to parallelize my code. However, I found the result to be different whether I add print statement at the end of the loop or not. Here is with the print statement a the end (I get ...
umbe1987's user avatar
  • 3,304
-1 votes
2 answers
75 views

Parallel.ForEarch - iterating through files in folders/subfolders, some files are missing/skipped

Trying to get the CRC32 of all files in folder/subfolders and write the result in a simple text box, but in the process some files are skipped using the *Parallel.ForEach *loop. The code: Imports ...
Sinke's user avatar
  • 3
2 votes
1 answer
54 views

do.call() function within %do.par%, function arguments not found

I am implementing a Monte Carlo simulation to test several methods (many of them). The methods are implementented in a methods.R script. To illustrate, let's say that I have only implemented 2 methods....
Telmo Pérez Izquierdo's user avatar
0 votes
1 answer
91 views

C# Parallel.ForEach throw IndexOutOfBounds but foreach does not?

My program must check the state of all elements in array. When I use foreach it's ok, but in Parallel.ForEach and Parallel.For it throws index out of bounds exception. This code works: foreach (var p ...
Kay Altos's user avatar
0 votes
0 answers
12 views

can we modify an empty environment variable inside a parralled foreach?

I want to first pass an empty environment variable to a paralleled foreach in R and then modify the empty environment variable inside the paralleled foreach. I want the empty environment variable to ...
Mike Zhang's user avatar
0 votes
1 answer
61 views

Is it possible use foreach in parallel for all nests for a function using input from previous step in R?

I am running some heavy simulations in R. Hence, I have been trying to parallelize my computations to speed it up. I have figured out how to use the foreach package to run a loop in parallel. I have ...
RobertoAS's user avatar
0 votes
1 answer
80 views

Shared library is not recognized when using parallel foreach in R

I am using a shared library written in C in my R code. I load the compiled shared library using dyn.load command. I am going to call a shared library function in a parallelized foreach loop. Here is ...
m.taheri's user avatar
  • 329
0 votes
2 answers
116 views

Does not save file using foreach loop in R

I am encountering difficulties saving data related to "abc" into a file named "myResults.rds". My code is complex and involves multiple operations within a foreach loop. I wish to ...
BasicTex's user avatar
0 votes
1 answer
142 views

%dopar% is very slow when using iterators compared to loading the data from text file

%dopar% is phenomenally slower when using iterators, compared to loading the data from text file. I've compared 3 use cases using %dopar% without any iterators dopar1 using %dopar% with iterators ...
explorer's user avatar
0 votes
1 answer
246 views

Cancellation token in Parallel.ForEach loop not working

I can't seem to stop the Parallel.ForEach tasks below on CTRL-C, am I not catching the exceptions correctly? I have a long running operation in a while loop. Can anyone tell me what I'm not doing ...
Kristielingg's user avatar

15 30 50 per page
1
2 3 4 5
15