[Insight-developers] SGI builds and libCio.a

Bill Hoffman bill.hoffman@kitware.com
Wed, 12 Mar 2003 13:20:25 -0500


--=====================_533417078==.ALT
Content-Type: text/plain; charset="us-ascii"

The SGI builds are now failing.   It seems to be some conflict between the new vnl and the libCio.a that we provide.    I think it might be time to try and remove this library.   

SGI does not recommend that the _PTHREADS options be defined,
you can see that here:

http://www.sgi.com/tech/stl/thread_safety.html

Alloc.h uses three different locking primitives depending on the environment. In addition, it can be forced to perform no locking by defining _NOTHREADS. The three styles of locking are: 
    * Pthread mutexes. These are used if _PTHREADS is defined by the user. This may be done on SGI machines, but is not recommended in performance critical code with the currently (March 1997) released versions of the SGI Pthreads libraries. 
    * Win32 critical sections. These are used by default for win32 compilations with compiler options that request multi-threaded code. 
    * An SGI specific spin-lock implementation that is usable with both pthread and sproc threads. This could serve as a prototype implementation for other platforms. This is the default on SGI/MIPS platforms. 

I was able to build ITK without this library and the new vnl, and everything works.

I belive the problem may have come from a poorly configured gcc on a sun machine.
I really do not think it is a good idea for user code to add the -D_PTHREADS option on the command line.

-Bill

--=====================_533417078==.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<body>
The SGI builds are now failing.&nbsp;&nbsp; It seems to be some conflict
between the new vnl and the libCio.a that we provide.&nbsp;&nbsp;&nbsp; I
think it might be time to try and remove this library.&nbsp;&nbsp;
<br><br>
SGI does not recommend that the _PTHREADS options be defined,<br>
you can see that here:<br><br>
<a href="http://www.sgi.com/tech/stl/thread_safety.html" eudora="autourl">http://www.sgi.com/tech/stl/thread_safety.html</a><br><br>
Alloc.h uses three different locking primitives depending on the
environment. In addition, it can be forced to perform no locking by
defining <tt>_NOTHREADS</tt>. The three styles of locking are: 
<ul>
<li>Pthread mutexes. These are used if <tt>_PTHREADS</tt> is defined by
the user. This may be done on SGI machines, but is not recommended in
performance critical code with the currently (March 1997) released
versions of the SGI Pthreads libraries. 
<li>Win32 critical sections. These are used by default for win32
compilations with compiler options that request multi-threaded code. 
<li>An SGI specific spin-lock implementation that is usable with both
pthread and sproc threads. This could serve as a prototype implementation
for other platforms. This is the default on SGI/MIPS platforms. 
</ul><br>
I was able to build ITK without this library and the new vnl, and
everything works.<br><br>
I belive the problem may have come from a poorly configured gcc on a sun
machine.<br>
I really do not think it is a good idea for user code to add the
-D_PTHREADS option on the command line.<br><br>
-Bill<br>
</body>
</html>

--=====================_533417078==.ALT--