Stream: brlcad

Topic: gqa plot multithreading error


view this post on Zulip starseeker (Dec 18 2020 at 17:33):

Well, looks like I was wrong about the gqa multithreaded plotting failure being a recent issue - just confirmed its presence in r73078 (2019-05-17)

view this post on Zulip starseeker (Dec 18 2020 at 17:37):

It DID work in r71532

view this post on Zulip starseeker (Dec 18 2020 at 17:39):

r72000 works

view this post on Zulip starseeker (Dec 18 2020 at 17:41):

r72500 works

view this post on Zulip starseeker (Dec 18 2020 at 17:45):

r73011 works

view this post on Zulip starseeker (Dec 18 2020 at 17:49):

r73012 doesn't work

view this post on Zulip starseeker (Dec 18 2020 at 18:02):

r73053 doesn't work, r73054 does, r73077 does, r73078 doesn't. So those correspond to:

r73012 - initial introduction of the new semaphore specification system
r73054 - revert to previous system due to Windows issues
r73078 - second introduction of new semaphore specification system

view this post on Zulip starseeker (Dec 18 2020 at 18:03):

Looks like the GQA multithreaded plotting was a causality of the semaphore changes. Now the question is why...

view this post on Zulip starseeker (Dec 18 2020 at 18:07):

@Sean Am I correct that 2019 semaphore changes are pretty thoroughly out of context? If so I'll try to dig into this, but I can't claim it's my forte...

view this post on Zulip Sean (Dec 18 2020 at 18:39):

No, they're not out of context. They're entangled with the threaded debugging I was working on. Let me take a stab at reproducing the issue -- what steps are you taking to observe the failure?

view this post on Zulip starseeker (Dec 18 2020 at 18:40):

I added a test in latest trunk... hang on, let me get the sequence

view this post on Zulip starseeker (Dec 18 2020 at 18:42):

Setup is running a gqa multi threaded plotting example:

./bin/gqa -Ao -p ovlp_ ../src/libged/tests/ged_tests.g ovlp
Trying initial grid spacing: 50 mm
Using grid spacing lower limit: 0.005 mm
Plotting overlaps to ovlp_overlaps.plot3
Processing with grid spacing 50 mm 44 x 48 x 39
Summary (50mm grid spacing):
list Overlaps:
/ovlp/r1 /ovlp/r2 count:2277 dist:1780.3mm @ (-248 350 -903.325)

Then the new utility to validate the plot file:

./src/libbn/tests/bn_plot3 -b ovlp_overlaps.plot3
INVALID: ovlp_overlaps.plot3

view this post on Zulip Sean (Dec 18 2020 at 18:43):

ok cool, i'll try that

view this post on Zulip starseeker (Dec 18 2020 at 18:43):

As a control, you can do the same thing but add -P 1 to the gqa line - in that mode I get:

./src/libbn/tests/bn_plot3 -b ovlp_overlaps.plot3
VALID:   ovlp_overlaps.plot3

view this post on Zulip starseeker (Dec 19 2020 at 03:15):

O.o
gqa test on bz:

gqa "-P" "1" "-Ao" "-p" "ovlp_" "/home/user/brlcad/src/gtools/tests/../../libged/tests/ged_tests.g" "ovlp"
878: Test timeout computed to be: 1500
878: Trying initial grid spacing: 50 mm
878: Using grid spacing lower limit: 0.005 mm
878: Plotting overlaps to ovlp_overlaps.plot3
878: Processing with grid spacing 50 mm 44 x 48 x 39
878: bu_semaphore_init(): could not initialize 11106121 semaphores, max is 1024
1/4 Test #878: gqa_plot .........................***Failed    0.09 sec

view this post on Zulip starseeker (Dec 19 2020 at 03:28):

78020 may fix that bit - gets the failure back down to just the multithreaded plot verification

view this post on Zulip starseeker (Feb 05 2021 at 18:51):

@Sean I added a semaphore guard for plotting specifically to the gqa code - on Linux, the multithreaded test is passing now. Don't know if that's the long term fix, but hopefully it will do for release.


Last updated: Oct 09 2024 at 00:44 UTC