PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

How to reduce CPU time in file IO operations in OpenMP

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
karthi_selvam



Joined: 24 Jan 2006
Posts: 4

PostPosted: Wed Feb 15, 2006 6:08 am    Post subject: How to reduce CPU time in file IO operations in OpenMP Reply with quote

Basically I get the same performance for both sereial and parallel computation. I do certian file read operations in the parallel processing.
Will the file reading be parallel or will the file be read serially eventhough it is in the parallel region.
Note: The same file is read by both the threads(processors).
Back to top
View user's profile
brentl



Joined: 20 Jul 2004
Posts: 132

PostPosted: Mon Feb 20, 2006 10:14 am    Post subject: Reply with quote

It doesn't sound to me like what you are doing is valid. OpenMP programs have a single address space. Each thread is doing the same i/o operations, so at a process level, you are doubling the amount of i/o. I would move the i/o operations out of the parallel regions. Or, manually break up the i/o using conditionals based on thread num, but then you may introduce race conditions on stdin/stdout, etc.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group