pthreads and sproc

Daniel J. Blezek, Ph.D. blezek at crd.ge.com
Mon Jan 24 07:02:01 EST 2000


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.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list