Stream: brlcad

Topic: rt_shootrays


view this post on Zulip Sean (Jan 07 2020 at 07:01):

Sean Yes but I called shootrays and define parallel macros.So bu_parallel took as a function (shootrays_in_parallel). But the loop is returning false in shootrays_in_parallel. Tried with a for loop for nrays but got a memory stack error.Maybe got wrong with setup resource structure .

@scorp08 I understand what you did and what I'm saying is that you're using a non-public function that is NOT intended to be called by other codes. It should have a "static" label on it. In fact, I'm going to add one now because it's not public API and was never intended to be public API because of assumptions it has in it that would lead to exactly this sort of confusion. It (shootrays_in_parallel) will no longer be directly callable after the next release, only indirectly via rt_shootrays().

view this post on Zulip Sean (Jan 07 2020 at 07:02):

Is there a reason you cannot call rt_shootrays() or rt_shootray_bundle() ?

view this post on Zulip Sean (Jan 07 2020 at 07:07):

I would guess it's because rt_shootrays() currently isn't implemented in parallel and that's what you're trying to achieve? If so, that's current development that isn't finished (which is why the version that calls shootrays_in_parallel() is protected by a compile-time SHOOTRAYS_IN_PARALLEL ifdef check). As soon as someone get it working, parallel will either be the default or will at least be configurable.

view this post on Zulip scorp08 (Jan 07 2020 at 13:25):

Is there a reason you cannot call rt_shootrays() or rt_shootray_bundle() ?

I would guess it's because rt_shootrays() currently isn't implemented in parallel and that's what you're trying to achieve? If so, that's current development that isn't finished (which is why the version that calls shootrays_in_parallel() is protected by a compile-time SHOOTRAYS_IN_PARALLEL ifdef check). As soon as someone get it working, parallel will either be the default or will at least be configurable.

@Sean Yes, I wanted to see parallelism over serial shoot.

view this post on Zulip Erik (Jan 07 2020 at 20:22):

set ncpu to 1 for serial, >1 for parallel, and 0 for autodetect parallel

view this post on Zulip Sean (Jan 07 2020 at 22:26):

@scorp08 then you're probably going to want to implement your own callback function and call bu_parallel(), like rt does. or keep bugging me or others to finish the rt_shootrays() interface :)

view this post on Zulip Sean (Jan 07 2020 at 22:26):

(for parallel)

view this post on Zulip scorp08 (Jan 17 2020 at 08:38):

scorp08 then you're probably going to want to implement your own callback function and call bu_parallel(), like rt does. or keep bugging me or others to finish the rt_shootrays() interface :)

:)) @Sean Where can I start to study shootray_parallel? :)

view this post on Zulip Sean (Jan 17 2020 at 14:35):

@scorp08 I would study bu_parallel() first, figure out how you want to chop up work into sets/buckets, then use the ncpu key from bu_parallel to set up rt_shootray() calls for each bucket.

view this post on Zulip scorp08 (Jan 25 2020 at 11:58):

scorp08 I would study bu_parallel() first, figure out how you want to chop up work into sets/buckets, then use the ncpu key from bu_parallel to set up rt_shootray() calls for each bucket.

@Sean thnks. Do I need to setup a resource structure for each ray or for only one is enough ??

view this post on Zulip Sean (Jan 25 2020 at 21:25):

scorp08 I would study bu_parallel() first, figure out how you want to chop up work into sets/buckets, then use the ncpu key from bu_parallel to set up rt_shootray() calls for each bucket.

Sean thnks. Do I need to setup a resource structure for each ray or for only one is enough ??

No, you only need to setup a resource for each core that will be involved, which is typically the number of virtual cores your CPU has enabled


Last updated: Oct 09 2024 at 00:44 UTC