LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can i optimize write of large data array into text file ?

I would caution that IIRC, parallelizing the For loop where you write your data can *NOT* be depended upon to write the data in the proper order.  The execution order of the parallel instances isn't prescribed and is probably unpredictable to mortals.

 

 

-Kevin P

 

<EDIT>  Dang, did it again.  Had a tab open to reply, didn't get around to it immediately, forgot to refresh before posting, found that I was just repeating what was already said.  Oh well, maybe two answers reinforces the point...

0 Kudos
Message 21 of 23
(629 Views)

@altenbach wrote:

@mcduff wrote:

 

I did not know writing to an ASCII file could be done in parallel. Did you check that everything is written in the right order?

 


I would expect that the right order is not guaranteed using a parallel FOR loop.


Yes, definite oversight. Smiley Embarassed

The code is still slightly faster even without the parallelism.


CLA CTA
Multics UK Ltd
Multics @ NI Week 2019: Learn about Architecting TestStand Framework for Noncoders Mon, May 20th, 3:15 PM - 4:15 PM. Room 19B
0 Kudos
Message 22 of 23
(625 Views)

Sorry, i've been a little busy these last days.

 

Thank you all for your answers and explanations. Your answers helped me a lot, and I was able to update my application and save time during its execution.

0 Kudos
Message 23 of 23
(571 Views)