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

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


No, that is not how it happened.

1. we had a crash on the Sun with multiprocessors
2. we added -D_PTHREADS to the compiler line for all UNIX compilers
3. it caused a crash on the SGI, because the iostream library that
comes with the compiler is not compiled with -D_PTHREADS.

It you remove the -D_PTHREADS, and remove the use of the library it all works
on the SGI.

-Bill


At 01:36 PM 3/12/2003, Lorensen, William E (Research) wrote:
>No. Multiprocessor sgi. Any test that had I/O would crash. Multiprocessor suns work fine.
>Don't change anything that will affect them please.
>
>-----Original Message-----
>From: Bill Hoffman [mailto:bill.hoffman@kitware.com]
>Sent: Wednesday, March 12, 2003 1:32 PM
>To: Lorensen, William E (Research); Lorensen, William E (Research);
>Insight-Developers
>Cc: James V. Miller
>Subject: Re: [Insight-developers] RE: SGI builds and libCio.a
>
>
>The original problem can from a multiprocessor Sun didn't it?
>
>
>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