Re: Is Volumizer thread safe

New Message Reply Date view Thread view Subject view Author view

Robert Grzeszczuk (rg)
Fri, 23 Apr 1999 11:27:27 -0700 (PDT)


Even,

Volumizer is not thread safe. However, that does not mean that you cannot use
it in a multi-treaded environment, but rather that you need to provide your own
synchronisation. Your problem is probably related to a problem with the O2
implementation under 1.0, and not MP related issues.

The decision not to make Volumizer tread safe was driven by portablilty. For
example, deciding on a specific MP model would exclude some types of impoartant
applications (e.g., Performer uses fork model, which is incompatibale with
ptheads or sprocks). On the other hand, implementing a fully functional
portable solution that would be MP-model agnostic would be beyond the scope of
the project (we deferred this to Fahrenheit, which does sprovide such
solution).

You can still, however, use Volumizer in a multi-threaded environment. For
example, consult Chikai Ohazama's monster examples (sproc based) distributed
with Volumizer 1.1 (freezing later today). If you want to multi-tread your
own application, in most cases you just need to identify the critical sections
and put suitable locking in. For example, to convert voglBasic from a single
thread to ACD (App/Cull/Draw) regime where your cull tread polygonizes while
the draw tread draws the resulting geometry, simply allocate two buffers of
FaceSets and have app switch between them within a critical section.

The biggest issue with this approach is data duplication. For example, every
time you create a Volumizer object (e.g., voIndexedFaceSet or voBrick), it will
be allocated within the main tread's address space. That makes it difficult to
share Volumizer data between processes (fork) but not threads. Voxel data is a
special case: you can allocate it anywere (e.g., in a shared arena) and share
it even in the fork model. Your only alternative in fork model is to override
the global new/delete operators.

-rg

On Apr 23, 2:22pm, even.andersen@oslo.pgs.com wrote:
> Subject: Is Volumizer thread safe
>
> Is Volumizer thread safe
>
> I have a core dump in voAppearanceActions::texgenSetEquation.
> All data is created for each process, but it seems both
> processes are accessing the same vo2DtexMgr at the same time.
>
>
> HW: O2, R5000, 128MB, 1MBSC 32KBIC, 32KBDC
> IRIX 6.5.3
> I dev 04/23/1999 Development System, 7.2.1
>
> Is there any info available as to how volumizer can be used
> in a multithreaded environment ?
>
>
> Sincerely
>
>
> Even Oscar Andersen
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Nov 01 1999 - 12:06:41 PST