[Fwd: Re: Is JAMA thread-safe]


Sender: "Ray A. Conner" <raymond.a.conner@saic.com>
Subject: Re: Is JAMA thread-safe


True, in this respect Jama is thread-safe.  I did check and there are no 
static (i.e., "global") variables.  So as long as you don't share object 
instances between threads, there are no concurrency issues.

Sorry about the other long email, I seldom consider this kind of 
thread-safety since it's second nature after so many years.  After 
thinking about it, this is probably the kind that the original poster meant.

- Ray A. Conner

G. W. (Pete) Stewart wrote:
> If Jama was not designed with thread safety in mind, it probably is
> not.  But if the LAPACK experience is typical, it probably would not
> be hard to make it so.  LAPACK has few routines that SAVE information
> in static variables, which is thread dangerous.  It has no COMMON
> statements, so it does not modify global variables, another dangerous
> practice.  Since some vendors have offered thread-safe versions of
> LAPACK, its fair to conclude there are work-arounds for the few
> routines that have SAVE variables.
> 
> The reference implementation of the BLAS, which LAPACK uses, appears
> to be thread safe.  But that is no guarantee that vendor implemented
> BLAS are also thread safe.
> 
> I forget if Jama has random matrix generators, but those could be a
> problem, since they must save a seed.  A web search gave conflicting
> opinions on the thread safety of Java's random number generators.
> 
> Pete Stewart
> 
> On Mon, 9 Oct 2006, Cleve Moler wrote:
> 
>> Date: Mon, 9 Oct 2006 18:27:26 -0400 (EDT)
>> From: Cleve Moler <moler@mathworks.com>
>> Reply-To: jama@nist.gov
>> To: Multiple recipients of list <jama@nist.gov>
>> Subject: RE: Is JAMA thread-safe
>>
>> I certainly never considered that issue when I wrote much of the code a
>> few years ago.  What does it take to make it thread safe?
>>
>>   -- Cleve Moler
>>      The MathWorks
>>
>> -----Original Message-----
>> From: jama@nist.gov [mailto:jama@nist.gov] On Behalf Of Geri Wagner
>> Sent: Monday, October 09, 2006 10:27 AM
>> To: Multiple recipients of list
>> Subject: Is JAMA thread-safe
>>
>> Hi
>>
>> I wonder whether the JAMA implementation is thread-safe.
>>
>> I could not find a statetment on the website, but perhaps I have
>> overlooked it. Thank you for comments.
>>
>> -- 
>> ----------------------------------------
>> Dr. Geri Wagner
>> Quantitative Analyst
>> ----------------------------------------
>> Swissrisk AG
>> Raeffelstr. 32, 8045 Zuerich Switzerland
>> t: +41 44 455 70 00
>> f: +41 44 455 70 01
>> m: +41 79 706 72 33
>> www.swissrisk.com
>> ----------------------------------------
>>






Date Index | Thread Index | Problems or questions? Contact list-master@nist.gov