Re: fread multiple files
Re: fread multiple files
- Subject: Re: fread multiple files
- From: David Leimbach <email@hidden>
- Date: Fri, 25 Sep 2009 11:13:45 -0700
If most of the time is spent in a lock, during profiling, does that not just mean that the process is blocked?
This is better than polling and wasting the CPU. However I'm very confused by the fact that you said the post-processing is single threaded and stuck in a mutex lock at the same time.
Have you considered using MPI's File IO routines that are part of MPI2? You might be able to reorganize your whole program in to something that's fully parallel, but then you didn't give a lot of explanation as to what it is you're doing. :-)
Dave
On Fri, Sep 25, 2009 at 10:27 AM, Tomasz Koziara
<email@hidden> wrote:
Hi
An MPI code I use outputs 3 * N files, where N is the number of processors. Then I am using a serial code to post-process the results. The post-processor is single-threaded and for every time instant reads a chunk of data from each of 3 *N files. I noticed that most of the time (nearly 50%) is spent in:
__spin_lock
pthread_mutex_lock
fread
pthread_mutex_unlock
flockfile
funlockfile
I am wondering whether those of you who know more about optimizing IO could advice me on how to make this reading more efficient.
Regards
Tomek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden