[Insight-developers] RE: SGI builds and libCio.a

Bill Hoffman bill.hoffman@kitware.com
Wed, 12 Mar 2003 14:16:26 -0500


OK, but we still have to change the CMakeLists.txt file,
to remove the -D_PTHREADS.   

I am going to add this to the top level cmake listfile:

SET(ITK_USE_SYSTEM_STDLIB ON)
IF(CMAKE_USE_PTHREADS) 
  IF(CMAKE_SYSTEM MATCHES "SunOS.*")
    SET(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -D_PTHREADS")
  ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*")
ENDIF(CMAKE_USE_PTHREADS)


This will require that all SGI's be cleaned.

Is this OK?

-Bill


At 01:27 PM 3/12/2003, Lorensen, William E (Research) wrote:
>Great. I'll change the nightly and continuous and we'll see what happens.
>
>
>-----Original Message-----
>From: Bill Hoffman [mailto:bill.hoffman@kitware.com]
>Sent: Wednesday, March 12, 2003 1:26 PM
>To: Lorensen, William E (Research); Lorensen, William E (Research);
>Insight-Developers
>Cc: James V. Miller
>Subject: RE: SGI builds and libCio.a
>
>
>Yes.
>
>At 01:22 PM 3/12/2003, Lorensen, William E (Research) wrote:
>>Did you run on a multi cpu sgi?
>>-----Original Message-----
>>From: Bill Hoffman [mailto:bill.hoffman@kitware.com]
>>Sent: Wednesday, March 12, 2003 1:20 PM
>>To: Lorensen, William E (Research); Insight-Developers
>>Cc: James V. Miller
>>Subject: SGI builds and libCio.a
>>
>>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
>
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers