Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread John Peterson
On Mon, Jun 4, 2012 at 11:52 AM, Roy Stogner wrote: > > On Mon, 4 Jun 2012, John Peterson wrote: > >> BTW, since Metis is using OpenMP (no raw pthreads that I can see) the >> proper TLS mechanism is probably something like >> >> #pragma omp threadprivate(var) > > > OpenMP uses pthreads under the h

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread Roy Stogner
On Mon, 4 Jun 2012, John Peterson wrote: > BTW, since Metis is using OpenMP (no raw pthreads that I can see) the > proper TLS mechanism is probably something like > > #pragma omp threadprivate(var) OpenMP uses pthreads under the hood on POSIX systems, IIRC, so thread local storage variables ough

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread John Peterson
On Mon, Jun 4, 2012 at 10:56 AM, John Peterson wrote: > On Mon, Jun 4, 2012 at 10:36 AM, Kirk, Benjamin (JSC-EG311) > wrote: Probably not a coincidence that it dies in a call to the Partitioner? I'm compiling in DEBUG mode to get more information, but perhaps we should just re

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread Roy Stogner
On Mon, 4 Jun 2012, Kirk, Benjamin (JSC-EG311) wrote: > ParallelMesh& pmesh = dynamic_cast(mesh); > pmesh.libmesh_assert_valid_parallel_ids(); > > Of course that will fail if you're not running with a parallel mesh. I'm > guessing Roy tested it with a parallel mesh and all was happy. Oh hell, y

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread John Peterson
On Mon, Jun 4, 2012 at 10:36 AM, Kirk, Benjamin (JSC-EG311) wrote: >>> Probably not a coincidence that it dies in a call to the Partitioner? >>> >>> I'm compiling in DEBUG mode to get more information, but perhaps we >>> should just revert r5654 (or move it to an unstable branch) if it >>> didn't

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread Kirk, Benjamin (JSC-EG311)
>> Probably not a coincidence that it dies in a call to the Partitioner? >> >> I'm compiling in DEBUG mode to get more information, but perhaps we >> should just revert r5654 (or move it to an unstable branch) if it >> didn't actually fix the problem of partitioning small meshes? > > I'm getting

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread Kirk, Benjamin (JSC-EG311)
> Probably not a coincidence that it dies in a call to the Partitioner? > > I'm compiling in DEBUG mode to get more information, but perhaps we > should just revert r5654 (or move it to an unstable branch) if it > didn't actually fix the problem of partitioning small meshes? I'm getting the same

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread John Peterson
On Mon, Jun 4, 2012 at 8:22 AM, Kirk, Benjamin (JSC-EG311) wrote: >>> OK, I'll see about making that change.  But does this imply Metis runs >>> threaded by default and/or requires TLS to work correctly? >> >> I'll poke around - it is possible it is using OpenMP parallelism now, but if >> so then

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread Kirk, Benjamin (JSC-EG311)
>> OK, I'll see about making that change. But does this imply Metis runs >> threaded by default and/or requires TLS to work correctly? > > I'll poke around - it is possible it is using OpenMP parallelism now, but if > so then I would expect to have a __thread or similar function defined > wheneve

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread Kirk, Benjamin (JSC-EG311)
> OK, I'll see about making that change. But does this imply Metis runs > threaded by default and/or requires TLS to work correctly? I'll poke around - it is possible it is using OpenMP parallelism now, but if so then I would expect to have a __thread or similar function defined whenever OpenMP w

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread John Peterson
On Mon, Jun 4, 2012 at 8:08 AM, Kirk, Benjamin (JSC-EG311) wrote: >>> Sadly, we seem to be getting the very same failure pattern with the >>> current ParMETIS. >> >> Another sad thing: new Metis apparently doesn't build on Macs?  Maybe >> it's just my Mac? >> >> I'm looking into this, but before I

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread Kirk, Benjamin (JSC-EG311)
>> Sadly, we seem to be getting the very same failure pattern with the >> current ParMETIS. > > Another sad thing: new Metis apparently doesn't build on Macs? Maybe > it's just my Mac? > > I'm looking into this, but before I waste too much time, has anyone > seen this error before? > > --- Buil

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread Kirk, Benjamin (JSC-EG311)
>> We already serialize and fall back on Metis when we have more elements >> than processors, and according to our code comments N_e> an unsupported configuration for Parmetis... but I'm seeing crashes >> (segfaults and/or double-frees) in quite a few other cases. Running >> adaptivity_ex1 with 1

Re: [Libmesh-devel] Parmetis segfaults

2012-06-04 Thread John Peterson
On Sat, Jun 2, 2012 at 11:31 PM, Roy Stogner wrote: > > On Wed, 30 May 2012, Roy Stogner wrote: > >> While trying to track down a bug in my next ParallelMesh patch, I ran >> into an apparent bug in our Parmetis support that dates back for I >> don't know how far. >> >> We already serialize and fal

Re: [Libmesh-devel] Parmetis segfaults

2012-06-02 Thread Roy Stogner
On Wed, 30 May 2012, Roy Stogner wrote: > While trying to track down a bug in my next ParallelMesh patch, I ran > into an apparent bug in our Parmetis support that dates back for I > don't know how far. > > We already serialize and fall back on Metis when we have more elements > than processors,

Re: [Libmesh-devel] Parmetis segfaults

2012-05-30 Thread Roy Stogner
On Wed, 30 May 2012, Kirk, Benjamin (JSC-EG311) wrote: > I do know enough to say our bundled parmetis is quite crusty, and it > may be worth upgrading that before getting too far inside it... We're using 3.1 from 2003, the latest stable version is 4.0.2 from 2011... yeah, I'll try bumping us up

Re: [Libmesh-devel] Parmetis segfaults

2012-05-30 Thread Kirk, Benjamin (JSC-EG311)
I do know enough to say our bundled parmetis is quite crusty, and it may be worth upgrading that before getting too far inside it... -Ben On May 30, 2012, at 7:33 PM, "Roy Stogner" wrote: > > While trying to track down a bug in my next ParallelMesh patch, I ran > into an apparent bug in our