[petsc-users] Pthread support

Alexander Goncharov alexvg77 at gmail.com
Mon Jul 23 22:00:54 CDT 2012


Hi Jed,

thank you for a quick reply. If I run ex2 with -mat_type seqaijpthread
-nthreads 4, everything runs fine. I see 400% utilization.

The problem persists if I just start two instances of the ex2 from the
console without seqaijpthread/seqpthread options. Just two single
processor jobs. They show up as two 50% jobs in the "top" output and run
slower. I hope I made my problem more clear. 

Thank you,
Alexander.

On Mon, 2012-07-23 at 21:41 -0500, Jed Brown wrote:
> On Mon, Jul 23, 2012 at 9:08 PM, Alexander Goncharov
> <alexvg77 at gmail.com> wrote:
>         Hello!
>         
>         I have a question about pthread support in PETSC. I could not
>         find it in
>         the development version. Is it going to be supported in the
>         new release?
>         
>         The reason I tried development version is because in petsc-3.3
>         compiled
>         with pthreadclasses=1 all jobs would be sent to one core, if I
>         start
>         executables separately. Same for MPI, mpirun -np 4 would show
>         up as 4
>         processes with 25% CPU usage each, in the "top" output.
>         Without
>         pthreadclasses all is ok. I would have processes with each
>         utilizing
>         separate core at 100%. Have you come across such a behavior?
> 
> 
> Sounds like an affinity problem. When running with multiple MPI
> processes and threads, you generally have to specify the number of
> threads manually.
> 
> 
> The threading code is in the process of being overhauled to a cleaner
> and more flexible design. It's not ready for use yet, but should be in
> a couple months.




More information about the petsc-users mailing list