Multiple CPUs and Write Images
Alistair Nicoll from New Zealand  [2 posts]
6 months
Hi Steven,
I'm using Write Images and Write_Variables. If I select one CPU, each time I run my pipeline I get one saved image and one entry in my CSV file. I'm also using a Flood fill, so it takes some time. If I increase the CPUs to 2 the total time to process the image halves,but I get 2 images and 2 entries in my log file. If I try 4 CPUs, I get 4 of each.
I have managed to fix the Write_Variables issue by ticking the "Only write when contents change" box.
My pipeline only runs once each time I trigger it from the API.
Is there a way I can run with multiple CPUs without getting multiple images saved?
Steven Gentner from United States  [1408 posts] 4 months

Using multiple CPU's isn't going to help much in your case. The way that works is to use a CPU for a single pipeline iteration. So while this effectively increases your throughput it still takes the SAME amount of time for a single image ... you just get 4x number of images being processed using more CPUs. Instead I'd focus on using some other module than flood fill or increase the speed by using its "fast mode" or reducing the image size (that will 4x decrease the processing time for a single image!) before using the flood fill. The trick is to look for ways to increase the processing using heuristics rather than brute force CPU processing.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index