I have found cholfact to behave differently (erroneously?) under parallel 
processing contexts than under standard settings.  What I mean by "parallel 
processing" is simply having previously called addprocs().  Here is some 
example code that I am running on my mid-2009 MacBook Pro using a somewhat 
recent brew of @staticfloat's homebrew distribution:

addprocs(8)

N = 1000

x = 10 * randn(N)

X = zeros(N,N)


for i = 1:N

    for j = 1:N

X[i,j] = exp(-.5 * (x[i]-x[j])^2)

    end

end


X = X + diagm(.5 * ones(N))


C = cholfact(X)

iC = inv(C)

CiC = cholfact(iC)

I believe this code generates an X which is positive definite by 
construction.

If I run this code as-is, I get the following error (or something similar, 
the PosDefException sometimes changes):

*ERROR: PosDefException(12)*

* in cholfact! at linalg/factorization.jl:36*

* in cholfact at linalg/factorization.jl:39*

*while loading /Users/tcovert/path_to_code.jl, in expression starting on 
line 16*
 
However, if I comment out the "addprocs(8)" line, everything works fine. 
 Also, for smaller values of N the problem goes away (N=100,200 is fine, 
N=400 is not).  Here is my versioninfo() if that helps:

*julia> **versioninfo()*

Julia Version 0.3.0-prerelease+3868

Commit e7a9a7d* (2014-06-24 19:39 UTC)

Platform Info:

  System: Darwin (x86_64-apple-darwin13.2.0)

  CPU: Intel(R) Core(TM)2 Duo CPU     P8700  @ 2.53GHz

  WORD_SIZE: 64

  BLAS: libopenblas (USE64BITINT NO_AFFINITY)

  LAPACK: libopenblas

  LIBM: libopenlibm

Reply via email to