[vtkusers] problem with POSIX threads
Praveen Bhaniramka
praveenb at gauri.engr.sgi.com
Tue Feb 5 15:42:26 EST 2002
Song,
I have not played with the VTK code much myself but, it seems that when
you run configure, it creates a file vtkConfigure.h in common/ where the
#define VTK_USE_SPROC is set to one. You could probably modify the file to
use #define VTK_USE_PTHREADS and recompile the source.
Also, after some more digging, I noticed that the script configure in
vtk's toplevel directory has a rule which sets VTK_USE_SPROC to be true on
IRIX. You could probably modify that, run configure again and then compile
the source.
Cheers,
Praveen
On Tue, 5 Feb 2002, Song Li wrote:
> Thanks for information!
> the problem is I only can find vtkMultiThreader.cxx under "common", there are many "#ifdef
> ....." there, so what you suggest is use #defines ..... in my code or directly in VTK's source
> code ?? Thanks a lot!
>
>
>
> Praveen Bhaniramka wrote:
>
> > Hi Berk and Song,
> >
> > The reason for these problems is probably that VTK uses sproc for the
> > multi-threading (see common/vtkMultiThreading.cxx) on SGIs. As far as I
> > know, on IRIX, pthreads are implemented using sproc in such a way that
> > they do not work with sprocs properly. So if your application uses
> > pthreads, you should disable the use of sproc and use pthreads instead.
> >
> > I haven't looked at the vtkMultiThreading source much, but it seems that
> > there are #defines for VTK_USE_SPROC and VTK_USE_PTHREADS which you could
> > use to make the appropriate changes.
> >
> > HTH,
> > Praveen
> >
> > On Mon, 4 Feb 2002, Berk Geveci wrote:
> >
> > > Even with Irix 6.5, there have been issues with pthreads.
> > > Random crashes and such. Whenever we compile on SGIs, we
> > > disable pthread support.
> > >
> > > -Berk
> > >
> > > >From: Song Li <lisong at vrac.iastate.edu>
> > > >Reply-To: lisong at vrac.iastate.edu
> > > >To: vtkusers at public.kitware.com
> > > >Subject: [vtkusers] problem with POSIX threads
> > > >Date: Mon, 04 Feb 2002 15:14:34 -0600
> > > >
> > > >Hi, gurus,
> > > > my program use VTK and other software libraries on SGI platform, it
> > > >works fine when I use libraries with sproc mode, but after I switch to
> > > >use POSIX-mode library, the program can not work, I doubt that VTK cause
> > > >the problem, anybody can tell me if VTK can also support these two modes
> > > >and how to switch between them ??(Makefile available??)
> > > > Thanks a lot!
> > > >
> > > >--
> > > >Song Li
> > > >VRAC(Virtual Reality Application Center),Iowa State University
> > > >Email: lisong at vrac.iastate.edu
> > > >Homepage: http://www.vrac.iastate.edu/~lisong
> > > >
> > > >
> > >
> > >
> > >
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > > Follow this link to subscribe/unsubscribe:
> > > http://public.kitware.com/mailman/listinfo/vtkusers
> > >
> >
> > -------------------------------------------------------------------
> > Praveen Bhaniramka Member of Technical Staff (MTS)
> > praveenb at sgi.com Advanced Graphics Division
> > (650)933-1785 Silicon Graphics, Inc.
> > -------------------------------------------------------------------
>
> --
> Song Li
> VRAC(Virtual Reality Application Center),Iowa State University
> Email: lisong at vrac.iastate.edu
> Homepage: http://www.vrac.iastate.edu/~lisong
>
>
>
-------------------------------------------------------------------
Praveen Bhaniramka Member of Technical Staff (MTS)
praveenb at sgi.com Advanced Graphics Division
(650)933-1785 Silicon Graphics, Inc.
-------------------------------------------------------------------
More information about the vtkusers
mailing list