pthreads and sproc

Miller, James V (CRD) millerjv at crd.ge.com
Wed Jan 26 09:00:46 EST 2000


To not use pthreads and instead use sproc, you need to have lines in your user.make file that look
similar to (what you really need is the -DVTK_USE_SPROC on the CFLAGS and CXXFLAGS and THREAD_LIBS
needs to be empty):

CFLAGS        = -DHAVE_SETMON  -DVTK_WORDS_BIGENDIAN \
                -DVTK_USE_SPROC -D_HP_NO_FAST_MACROS \
                -DHAVE_LIMITS_H -DHAVE_UNISTD_H 
CXXFLAGS      = -DHAVE_SETMON  -DVTK_WORDS_BIGENDIAN \
                -DVTK_USE_SPROC  \
                -D_HP_NO_FAST_MACROS -DHAVE_LIMITS_H -DHAVE_UNISTD_H
THREAD_LIBS   = 
 

If you have done this and still have problems, either do a "make clean", reconfigure, and rebuild; or
you can remove the .o files for anything that uses a vtkMultiThreader (grep pulls out these pretty
easily).

I use the above flags to build on an Octane running Irix 6.5 and using sproc.

Jim


-----Original Message-----
From: Blezek, Daniel J (CRD) 
Sent: Monday, January 24, 2000 7:02 AM
To: Dave Semeraro
Cc: vtkusers at gsao.med.ge.com
Subject: Re: pthreads and sproc


Dave,

  One suggestion:  Depending on your version of Mesa, it may be using the
pthreads library.  When I built the Linux RPM of VTK, I could not use both
Mesa and Java because Mesa used pthreads and Java is not compatable
w/pthreads.  I used Mesa 3.0.  One quickie way to tell if this is the
problem is to run 

nm /path/to/libMesaGL.so | grep pthread

if you get any hits, this is the problem.  I would suggest re-compiling
Mesa to avoid pthreads, or use OpenGL.

-dan


On Fri, 21 Jan 2000, Dave Semeraro wrote:

> 
> Hello users...
> 
> This message is addressed to the no doubt huge IRIX sproc user base. I have
> the following problem. I am using a vtk nightly release of Dec 9, on an IRIX
> 6.5 octane. Compilation goes fine. I am using MESA for the off screen
> capability.
> I compile vtk without tcl or python and with contrib and patented. The
> configure
> script finds the pthread stuff and wants to use that. However, I am interested
> in using John Shalf's threaded contour filter (on an onyx system). Therein
> lies
> the problem. John advised me that his code uses sproc rather than pthreads due
> to performance issues. I therefore change the -DVTK_USE_PTHREADS switch to 
> -DVTK_USE_SPROC and remove the -lpthreads library link in system.make.
> Everything
> compiles fine but there are problems at run time. 
> 
> vtkMesaRenderWindow segfaults in a malloc in vtkOSMesaCreateWindow if I
> compile
> the library with sproc instead of pthreads. the test code looks like this.
> 
> #include "vtkMesaRenderer.h"
> #include "vtkMesaRenderWindow.h"
> void main( int argc, char *argv[])
> {
> char a;
>      vtkMesaRenderer *ren=vtkMesaRenderer::New();
>      ren->DebugOn();
>      vtkMesaRenderWindow renWin=vtkMesaRenderWindow::New();
>      renWin->DebugOn();
>      renWin->SetOffScreenRendering(1);
>      renWin->AddRenderer(ren);
>      renWin->SetSize( 300, 300);
>      renWin->Print(cout);
> cout << "enter any key followed by <Enter> to exit >> ";
> cin >> a;
> }
> 
> This code works fine if I compile vtk with pthreads but is whacked with sproc.
> Does anyone know why? 
> 
> Best Regards,
> 
> Dave
> 
> 
> Dave Semeraro Ph.D.
> Site Scientific Visualization Lead
> ASC MSRC Wright Patterson Airforce Base
> 
> Visualization and Virtual Environments Group
> NCSA University of Illinois
> 605 E. Springfield Ave.
> Champaign, IL 61820
> semeraro at ncsa.uiuc.edu
> (217) 244-1852
> 
> 
> -----------------------------------------------------------------------------
> This is the private VTK discussion list.  Please keep messages on-topic.
> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at gsao.med.ge.com>.  For help, send message body containing
> "info vtkusers" to the same address.     Live long and prosper.
> -----------------------------------------------------------------------------
> 

--
Daniel Blezek, Ph.D.
blezek at crd.ge.com
Computer Graphics and Systems Program
Electronic Systems Lab
GE Corporate Research & Development



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list