Re: [julia-users] Dataframe without column and row names ?

2016-10-16 Thread henri.gir...@gmail.com
In fact I don't know how to make the nice border but I noticed dataframe 
does it ...


I only need the nice border for the matrix, but I don't know how to do it ?

Maybe I should ask how to make a nice border in a matrix ?

Regards

Henri


Le 15/10/2016 à 22:32, Milan Bouchet-Valat a écrit :

Le vendredi 14 octobre 2016 à 19:59 -0700, Henri Girard a écrit :

Hi,
Is it possible to have a table with only the result ?
I don't want row /column names.

So why do you create a data frame? Isn't a Matrix enough?


Regards


using DataFrames
function iain_magic(n::Int)
 M = zeros(Int, n, n)
 for I = 1:n, J = 1:n
 @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + 1
 end
 return M
end
mm=iain_magic(3)
df=DataFrame(mm)




Re: [julia-users] Re: eachline() work with pmap() is slow

2016-10-16 Thread lovebufan
codes link 
 is the 
same link in my first reply. 

On Monday, October 17, 2016 at 12:47:15 AM UTC+8, Jeremy McNees wrote:
>
> Care to share the code you used?
>
> On Sun, Oct 16, 2016 at 9:24 AM  wrote:
>
>> Problem solved by hand writing an implementation of ``pmap`` & codes 
>> updated :)
>>
>>
At some point, I thought ``asyncmap(remote(process), iter)`` would solve 
the problem without handwriting a pmap (ref discussion here 
). However, when I test 
the code, it seems reading a lot of file contents without processing. That 
was confusing...


Re: [julia-users] Re: ImageView very slow

2016-10-16 Thread Tim Holy
Hmm, I fixed this on the images-next branch but forgot to fix it on master.
Will be fixed in https://github.com/timholy/Images.jl/pull/564.

If you're just getting started with Julia & Images, you might want to
consider using the upcoming version of Images. See
https://github.com/timholy/Images.jl/issues/542#issuecomment-254059092.

Best,
--Tim


Re: [julia-users] How to determine which functions to overload, or, who is at the bottom of the function chain?

2016-10-16 Thread Colin Bowers
This was a very helpful answer. Thank you very much for responding.

Cheers,

Colin

On 16 October 2016 at 20:23, Milan Bouchet-Valat  wrote:

> Le samedi 15 octobre 2016 à 20:36 -0700, colintbow...@gmail.com a
> écrit :
> > Hi all,
> >
> > Twice now I've thought I had overloaded the appropriate functions for
> > a new type, only to observe apparent inconsistencies in the way the
> > new type behaves. Of course, there were no inconsistencies. Instead,
> > the observed behaviour stemmed from overloading a function that is
> > not at the bottom of the function chain. The two examples where I
> > stuffed up were:
> >
> > 1) overloading Base.< instead of overloading Base.isless, and
> In this case, the help is quite explicit:
> help?> <
> search: < <= << <: .< .<= .<<
>
>   <(x, y)
>
>   Less-than comparison operator. New numeric types should implement this
>   function for two arguments of the new type. Because of the behavior of
>   floating-point NaN values, < implements a partial order. Types with a
>   canonical partial order should implement <, and types with a canonical
> total
>   order should implement isless.
>
> > 2) overloading Base.string(x) instead of overloading Base.show(io,
> > x).
> This one is a bit trickier, since the printing code is complex, and not
> completely stabilized yet. Though the help still gives some hints:
>
> help?> string
> search: string String stringmime Cstring Cwstring RevString RepString
> readstring
>
>   string(xs...)
>
>   Create a string from any values using the print function.
>
> So the more fundamental function to override is print(). The help for
> print() says it falls back to show() if there's no print() method for a
> given type. So if you don't have a special need for print(), override
> show().
>
> > My question is this: What is the communities best solution/resource
> > for knowing which functions are at the bottom of the chain and thus
> > are the ones that need to be overloaded for a new type?
> In general, look at the help for a function. If there's no answer
> (which is a most likely a lack in the documentation which should be
> reported), look for it in the manual. The latter can always be useful,
> even if the help already gives a reply.
>
> But documentation is perfectible, so do not hesitate to ask questions
> and suggest enhancements (ideally via pull requests when you have found
> out how it works).
>
>
> Regards
>
>
> > Cheers and thanks in advance to all repsonders,
> >
> > Colin
>


[julia-users] Re: What is really "big data" for Julia (or otherwise), 1D or multi-dimensional?

2016-10-16 Thread Jeffrey Sarnoff
One fact about big data is it keeps getting bigger.

On Friday, October 14, 2016 at 1:00:35 PM UTC-4, Páll Haraldsson wrote:
>
> On Thursday, October 13, 2016 at 7:49:51 PM UTC, cdm wrote:
>>
>> from CloudArray.jl:
>>
>> "If you are dealing with big data, i.e., your RAM memory is not enough 
>> to store your data, you can create a CloudArray from a file."
>>
>>
>> https://github.com/gsd-ufal/CloudArray.jl#creating-a-cloudarray-from-a-file
>>
>
> Good to know, and seems cool.. (like CatViews.jl) indexes could need to be 
> bigger than 32-bit this way.. even for 2D.
>
> But has anyone worked with more than 70 terabyte arrays, that would 
> otherwise have been a limitation?
>
> Anyone know biggest (or just big over 2 GB) one-dimensional array people 
> are working with?
>


[julia-users] Re: ImageView very slow

2016-10-16 Thread Páll Haraldsson
On Sunday, October 16, 2016 at 4:45:00 PM UTC, Paul B. wrote: 

> into some issues with deprecated functionality
>

I think they can make slower, not sure if by this much. 

I see: "fix julia 0.5 deprecations   19 days ago"

Maybe if you update the package this will be ok?



[julia-users] Re: matrix multiplication in Matlab is much faster

2016-10-16 Thread majid . zamani150
thanks @chris ... thanks a lot ...

On Sunday, October 16, 2016 at 8:51:56 PM UTC+3:30, Chris Rackauckas wrote:
>
> Take a look at the performance tips 
> . The 
> first time you run it, the function will compile. Then the compiled 
> function is cached. On my computer I did:
>
> a = rand(1000,1000)
> y=similar(a)
> @time a*a 
> @time a*a 
> @time A_mul_B!(y,a,a)
> @time A_mul_B!(y,a,a)
>
> Which gives output:
>
>
>   0.435561 seconds (367.13 k allocations: 20.108 MB, 1.58% gc time)
>   0.019922 seconds (7 allocations: 7.630 MB)
>
>   0.027144 seconds (53 allocations: 2.875 KB)
>   0.016211 seconds (4 allocations: 160 bytes)
>
> Notice how after compiling, the allocations and the timings go way down. 
> For a more in-depth look at how Julia is looking to get the speed (and how 
> to make the most of it), take a look at this blog post 
> . Julia is a 
> little bit more complex than MATLAB, but the payoffs can be huge once you 
> take the time to understand it. Happy Julia-ing!
>
>
> On Sunday, October 16, 2016 at 9:45:00 AM UTC-7, majid.z...@gmail.com 
> wrote:
>>
>> i have run the same matrix multiplication  in both matlab and julia but 
>> matlab in much faster that julia, i have used both A_mul_B! and *() 
>> functions
>> my codes are :
>> in matlab : 
>> tic 
>> a = rand(1000,1000)
>> a*a
>> toc
>> the output is : Elapsed time is 0.193979 seconds
>>
>> in Julia :
>> a = rand(1000,1000)
>> y=similar(a)
>> @time a*a 
>> @time A_mul_B!(y,a,a)
>>
>> the output is:
>> 1.575159 seconds
>> 1.497884  seconds
>> Majid
>>
>

Re: [julia-users] Some questions on array comprehensions; e.g. disabling bounds checking possible? And correct way for non-1-based

2016-10-16 Thread Páll Haraldsson


On Sunday, October 16, 2016 at 4:54:45 PM UTC, Yichao Yu wrote:
>
>
>
> On Sun, Oct 16, 2016 at 12:01 PM, Páll Haraldsson  > wrote:
>
>>
>> I was prototyping:
>>
>> julia> a=[1,2,3,1,2]
>>
>> julia> b=[a[i]> 4-element Array{Bool,1}:
>>   true
>>   true
>>  false
>>   true
>>
>>
>> In the beginning when trying stuff out I used:
>>
>> for i in a[1:end-1]
>>
>> or
>>
>> for i in a[2:end]
>>
>> and it got me thinking, end-1 works for any kind of array, but 1 as the 
>> start (or 2) is not correct in general. For e.g. general (e.g. zero-based 
>> arrays now allowed), what do you do? [If I need all: for i in a just works]
>>
>>
> Not decided yet. Ref https://github.com/JuliaLang/julia/pull/15750
>

Thanks for answering. And from this I see: 
https://github.com/JuliaArrays/EndpointRanges.jl

[I'm not clear on (proposed?) "last" vs. "end"; maybe it's just for a demo, 
as it would else conflict, if "first" (or "ibegin") and "last" or "iend" 
ends up as decided then hopefully soon as a breaking change.. This could 
stay in a package forever, but not good as a replacement for "1" is 
needed..]


To get one thing clear, "end" continues to work, for the last element, but

since "1" should now be "considered harmful".. "end" may not be very useful 
("end:end" is still possible and "end-1:end" etc.. but not much else).

I know about eachindex (or ways for whole arrays/collections), but do not 
need each.. What works now to get the second (or first)?

Is something like

view(a, 2:length(a)) # for 1D..

a workaround?


> https://github.com/JuliaLang/julia/pull/15558 

> You can always use an assignment in a composite expression.

Not sure what you mean, but may not be important as @inbounds isn't a big 
deal [for me] as I think I'll always need a for loop anyway (no big 
problem).



[julia-users] Re: quadgk with 2 arguments

2016-10-16 Thread Steven G. Johnson
quadgk is fine for vector-valued functions (and in fact any integrand type 
supporting +, -, *real, and norm, and can also integrate over infinite 
intervals and contours in the complex plane. 

 But for multidimensional integrals you should use Cuba.jl or Cubature.jl or 
GSL.jl or similar. 

[julia-users] Re: eachline() work with pmap() is slow

2016-10-16 Thread Páll Haraldsson
On Sunday, October 16, 2016 at 5:57:49 PM UTC, Páll Haraldsson wrote:
>
>
>
> On Saturday, October 15, 2016 at 2:54:53 AM UTC, love...@gmail.com wrote:
>>
>> @Páll, do you mean that pmap will first do a ``collect`` operation,
>>
>
> yes and no..
>

Should have said here, just no.

I meant, yes, collect seems to be used, just not first.


[julia-users] Re: eachline() work with pmap() is slow

2016-10-16 Thread Páll Haraldsson


On Saturday, October 15, 2016 at 2:54:53 AM UTC, love...@gmail.com wrote:
>
> I have change the code to parallel on files rather than lines. codes are 
> available here 
>  if 
> anyone have interests.
> However, the speed is not satisfactory still (total processing speed 
> approx. 10M/s, ideally it should be 100M/s, the network speed). 
> CPU not full, IO not full, and I cannot find the bottleneck...
>
> @Jeremy, thanks for the reply. The bottleneck is IO. You need days just to 
> stream all files at full speed. Thus waiting to load the whole file will 
> waste a lot of time. Ideally it will be that when I streamed the data one 
> pass, the processing is also done without extra time.
> @Páll, do you mean that pmap will first do a ``collect`` operation,
>

yes and no..
 

> then processing? So even you give pmap an iterator, it will not benefit 
> from it? That will be sad.
>

I was thinking what needs to happen, I'm still learning Julia and if I 
understand collect or what you think, then you mean does Julia first have 
to get a collection (DenseArray) of everything before starting processing?


I find it very cool to learn, to prepend @edit, to see what Julia does so I 
took a look (and I think this all means that it can start applying your 
function as you go):

 if batch_size == 1
[..]
return collect(AsyncGenerator(f, c; ntasks=()->nworkers(p)))
else
batches = batchsplit(c, min_batch_count = length(p) * 3,
max_batch_size = batch_size)

results = collect(flatten(AsyncGenerator(f, batches; 
ntasks=()->nworkers(p


Yes, collect is used, but while the doc says:

Transform collection c by applying f


help?> Base.AsyncGenerator
  AsyncGenerator(f, c...; ntasks=0) -> iterator

  Apply f to each element of c using at most ntasks asynchronous tasks. If 
ntasks is unspecified, uses max(100, nworkers()) tasks. [..]




[julia-users] Re: Status of Plots.jl?

2016-10-16 Thread Chris Rackauckas
using Plots
#Pkg.add("GR")
gr() # Change the backend
plot(rand(4,4))

There's a bug with the plot pane where you might need to hit it twice. If 
that's not working, then it's not setup correctly.


On Sunday, October 16, 2016 at 9:45:07 AM UTC-7, missp...@gmail.com wrote:
>
> Hi folks,
>
> I don't seem to be able to have the display of a graph in GR. I'm calling 
> the instructions using Atom. 
>
> could someone post a Hello World example?
>
> thanks, 
>
> On Thursday, March 10, 2016 at 5:11:57 AM UTC-8, Daniel Carrera wrote:
>>
>> Hello,
>>
>> Does anyone know the status of Plots.jl? It seems to have come a long 
>> way. At least the documentation makes it look pretty complete:
>>
>> http://plots.readthedocs.org/en/latest/
>>
>> I'm looking at the backends. Does anyone know what "Gr", "Qwt", and 
>> "unicodeplots" are? Apparently support for Winston was dropped?
>>
>> https://github.com/tbreloff/Plots.jl/issues/152
>>
>> I don't use Winston, but I'm curious to know what happened. Was Winston 
>> hard to support?
>>
>> I am currently using PyPlot because I need the maturity of Matplotlib, 
>> but I am happy to see all the effort that's going into making a native 
>> plotting library for Julia.
>>
>> Cheers,
>> Daniel.
>>
>

[julia-users] Re: matrix multiplication in Matlab is much faster

2016-10-16 Thread Chris Rackauckas
Take a look at the performance tips 
. The 
first time you run it, the function will compile. Then the compiled 
function is cached. On my computer I did:

a = rand(1000,1000)
y=similar(a)
@time a*a 
@time a*a 
@time A_mul_B!(y,a,a)
@time A_mul_B!(y,a,a)

Which gives output:


  0.435561 seconds (367.13 k allocations: 20.108 MB, 1.58% gc time)
  0.019922 seconds (7 allocations: 7.630 MB)

  0.027144 seconds (53 allocations: 2.875 KB)
  0.016211 seconds (4 allocations: 160 bytes)

Notice how after compiling, the allocations and the timings go way down. 
For a more in-depth look at how Julia is looking to get the speed (and how 
to make the most of it), take a look at this blog post 
. Julia is a 
little bit more complex than MATLAB, but the payoffs can be huge once you 
take the time to understand it. Happy Julia-ing!


On Sunday, October 16, 2016 at 9:45:00 AM UTC-7, majid.z...@gmail.com wrote:
>
> i have run the same matrix multiplication  in both matlab and julia but 
> matlab in much faster that julia, i have used both A_mul_B! and *() 
> functions
> my codes are :
> in matlab : 
> tic 
> a = rand(1000,1000)
> a*a
> toc
> the output is : Elapsed time is 0.193979 seconds
>
> in Julia :
> a = rand(1000,1000)
> y=similar(a)
> @time a*a 
> @time A_mul_B!(y,a,a)
>
> the output is:
> 1.575159 seconds
> 1.497884  seconds
> Majid
>


[julia-users] gathering advice on types

2016-10-16 Thread Jeffrey Sarnoff
Do you have words of wisdom, style, technique, efficiency or pragmatism 
regarding types in any of their forms (concrete, abstract, aliased, bits 
and parameters).

We are gathering advice on types on gitter at JuliaPraxis 
.   



[julia-users] Julia(Box) on GPU cloud

2016-10-16 Thread Pavel Klimchitsky
Hi guys,

Does anybody have experience with getting Julia, with JuliaBox in 
particular, running on the GPU cloud? How can it be done? There seems to be 
no documented way. What is the best host?


Re: [julia-users] Some questions on array comprehensions; e.g. disabling bounds checking possible? And correct way for non-1-based

2016-10-16 Thread Yichao Yu
On Sun, Oct 16, 2016 at 12:01 PM, Páll Haraldsson  wrote:

>
> I was prototyping:
>
> julia> a=[1,2,3,1,2]
>
> julia> b=[a[i] 4-element Array{Bool,1}:
>   true
>   true
>  false
>   true
>
>
> In the beginning when trying stuff out I used:
>
> for i in a[1:end-1]
>
> or
>
> for i in a[2:end]
>
> and it got me thinking, end-1 works for any kind of array, but 1 as the
> start (or 2) is not correct in general. For e.g. general (e.g. zero-based
> arrays now allowed), what do you do? [If I need all: for i in a just works]
>
>
Not decided yet. Ref https://github.com/JuliaLang/julia/pull/15750


>
> In the beginning, because of error, there seemed to be no bounds checking,
> but since it's there, is there a way do disable?
>
>
> julia> b=[@inbounds a[i] 4-element Array{Void,1}:
>  nothing
>  nothing
>  nothing
>  nothing
>
> julia> b=[(@inbounds (a[i] 1-element Array{Base.Generator{UnitRange{Int64},##59#60},1}:
>  Base.Generator{UnitRange{Int64},##59#60}(#59,1:4)
>
>
>
https://github.com/JuliaLang/julia/pull/15558
You can always use an assignment in a composite expression.


>
> Eventually I want something different, the points where, increasing turn
> to decreasing (or vice versa), at most n/2 points. Array comprehension is
> probably not the right way, as I need to know how many point.
>
> I'll change to a loop (that will be itself in a loop), that uses a
> preallocated array for result, I want to reuse that in each iteration of
> the outer loop; I assume that isn't possible with an array comprehension.
>
>


Re: [julia-users] Re: eachline() work with pmap() is slow

2016-10-16 Thread Jeremy McNees
Care to share the code you used?

On Sun, Oct 16, 2016 at 9:24 AM  wrote:

> Problem solved by hand writing an implementation of ``pmap`` & codes
> updated :)
>
>


[julia-users] Re: Status of Plots.jl?

2016-10-16 Thread missperovaz
Hi folks,

I don't seem to be able to have the display of a graph in GR. I'm calling 
the instructions using Atom. 

could someone post a Hello World example?

thanks, 

On Thursday, March 10, 2016 at 5:11:57 AM UTC-8, Daniel Carrera wrote:
>
> Hello,
>
> Does anyone know the status of Plots.jl? It seems to have come a long way. 
> At least the documentation makes it look pretty complete:
>
> http://plots.readthedocs.org/en/latest/
>
> I'm looking at the backends. Does anyone know what "Gr", "Qwt", and 
> "unicodeplots" are? Apparently support for Winston was dropped?
>
> https://github.com/tbreloff/Plots.jl/issues/152
>
> I don't use Winston, but I'm curious to know what happened. Was Winston 
> hard to support?
>
> I am currently using PyPlot because I need the maturity of Matplotlib, but 
> I am happy to see all the effort that's going into making a native plotting 
> library for Julia.
>
> Cheers,
> Daniel.
>


[julia-users] matrix multiplication in Matlab is much faster

2016-10-16 Thread majid . zamani150
i have run the same matrix multiplication  in both matlab and julia but 
matlab in much faster that julia, i have used both A_mul_B! and *() 
functions
my codes are :
in matlab : 
tic 
a = rand(1000,1000)
a*a
toc
the output is : Elapsed time is 0.193979 seconds

in Julia :
a = rand(1000,1000)
y=similar(a)
@time a*a 
@time A_mul_B!(y,a,a)

the output is:
1.575159 seconds
1.497884  seconds
Majid


[julia-users] ImageView very slow

2016-10-16 Thread Paul B.
Hello, all.  Starting out with Julia.

I need to display some pseudo-color images so I'm playing around with the 
ImageView package.  It seems to be running very slowly.  Displaying one of 
the images from TestImages can take nearly a minute:
img = testimage( "cameraman" )
Gray Images.Image with:
  data: 512×512 Array{ColorTypes.Gray{FixedPointNumbers.UFixed{UInt8,8}},2}
  properties:
colorspace: Gray
spatialorder:  x y

julia> tic(); ImageView.view( img ); toc();
elapsed time: 50.552471225 seconds
Zooming and other interaction with the mouse is similarly sluggish.

I didn't expect this for a 512x512 grayscale image.  I am running Julia 
version 0.5.1-pre+2 and ImageView is running into some issues with 
deprecated functionality and namespace conflicts.  However, the above did 
not generate any warnings at all but still took 50 seconds to display.  
This is all under Linux.  Any ideas why this is happening or if I could be 
doing something wrong?


Re: [julia-users] How to determine which functions to overload, or, who is at the bottom of the function chain?

2016-10-16 Thread Milan Bouchet-Valat
Le samedi 15 octobre 2016 à 20:36 -0700, colintbow...@gmail.com a
écrit :
> Hi all,
> 
> Twice now I've thought I had overloaded the appropriate functions for
> a new type, only to observe apparent inconsistencies in the way the
> new type behaves. Of course, there were no inconsistencies. Instead,
> the observed behaviour stemmed from overloading a function that is
> not at the bottom of the function chain. The two examples where I
> stuffed up were:
> 
> 1) overloading Base.< instead of overloading Base.isless, and
In this case, the help is quite explicit:
help?> <
search: < <= << <: .< .<= .<<

  <(x, y)

  Less-than comparison operator. New numeric types should implement this
  function for two arguments of the new type. Because of the behavior of
  floating-point NaN values, < implements a partial order. Types with a
  canonical partial order should implement <, and types with a canonical total
  order should implement isless.

> 2) overloading Base.string(x) instead of overloading Base.show(io,
> x).
This one is a bit trickier, since the printing code is complex, and not
completely stabilized yet. Though the help still gives some hints:

help?> string
search: string String stringmime Cstring Cwstring RevString RepString
readstring

  string(xs...)

  Create a string from any values using the print function.

So the more fundamental function to override is print(). The help for
print() says it falls back to show() if there's no print() method for a
given type. So if you don't have a special need for print(), override
show().

> My question is this: What is the communities best solution/resource
> for knowing which functions are at the bottom of the chain and thus
> are the ones that need to be overloaded for a new type?
In general, look at the help for a function. If there's no answer
(which is a most likely a lack in the documentation which should be
reported), look for it in the manual. The latter can always be useful,
even if the help already gives a reply.

But documentation is perfectible, so do not hesitate to ask questions
and suggest enhancements (ideally via pull requests when you have found
out how it works).


Regards


> Cheers and thanks in advance to all repsonders,
> 
> Colin


Re: [julia-users] Dataframe without column and row names ?

2016-10-16 Thread Milan Bouchet-Valat
Le vendredi 14 octobre 2016 à 19:59 -0700, Henri Girard a écrit :
> Hi,
> Is it possible to have a table with only the result ?
> I don't want row /column names.
So why do you create a data frame? Isn't a Matrix enough?


Regards

> using DataFrames
> function iain_magic(n::Int)
>     M = zeros(Int, n, n)
>     for I = 1:n, J = 1:n
>     @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + 1
>     end
>     return M
> end
> mm=iain_magic(3)
> df=DataFrame(mm) 


[julia-users] Some questions on array comprehensions; e.g. disabling bounds checking possible? And correct way for non-1-based

2016-10-16 Thread Páll Haraldsson

I was prototyping:

julia> a=[1,2,3,1,2]

julia> b=[a[i] b=[@inbounds a[i] b=[(@inbounds (a[i]

[julia-users] How to install JuMP without SSL errors?

2016-10-16 Thread Rick Graham
Ref:  https://github.com/JuliaOpt/JuMP.jl/issues/864

I can't seem to add package JuMP.  Other packages seem to be added fine.

How can I fix this?

OS: Fedora 24

julia> versioninfo()
Julia Version 0.6.0-dev.986
Commit 6c9f5af (2016-10-16 05:19 UTC)
Platform Info:
  OS: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, broadwell)



julia> Pkg.add("JuMP")
INFO: Cloning cache of Calculus from 
https://github.com/johnmyleswhite/Calculus.jl.git
INFO: Cloning cache of DataStructures from 
https://github.com/JuliaLang/DataStructures.jl.git
INFO: Cloning cache of ForwardDiff from 
https://github.com/JuliaDiff/ForwardDiff.jl.git
INFO: Cloning cache of JuMP from https://github.com/JuliaOpt/JuMP.jl.git
ERROR: Cannot clone JuMP from https://github.com/JuliaOpt/JuMP.jl.git. SSL 
error:  - UNKNOWN ERROR CODE (0001)
 in prefetch(::String, ::String, ::Array{String,1}) at ./pkg/cache.jl:56
 in resolve(::Dict{String,Base.Pkg.Types.VersionSet}, 
::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, 
::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}, 
::Dict{String,VersionNumber}, ::Set{String}) at ./pkg/entry.jl:512
 in resolve(::Dict{String,Base.Pkg.Types.VersionSet}, 
::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, 
::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}) 
at ./pkg/entry.jl:476
 in edit(::Function, ::String, ::Base.Pkg.Types.VersionSet, 
::Vararg{Base.Pkg.Types.VersionSet,N}) at ./pkg/entry.jl:30
 in (::Base.Pkg.Entry.##2#5{String,Base.Pkg.Types.VersionSet})() at 
./task.jl:363
 in sync_end() at ./task.jl:314
 in macro expansion at ./task.jl:330 [inlined]
 in add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:50
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at 
./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, 
::String) at ./file.jl:69
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at 
./pkg/dir.jl:31
 in add(::String) at ./pkg/pkg.jl:100



[julia-users] Re: eachline() work with pmap() is slow

2016-10-16 Thread lovebufan
Problem solved by hand writing an implementation of ``pmap`` & codes 
updated :)



[julia-users] Re: Parallel file access

2016-10-16 Thread Steven Sagaert
that because SQLLite isn't a multi-user DB server but a single user 
embedded (desktop) db. Use the right tool for the job.

On Saturday, October 15, 2016 at 7:02:58 PM UTC+2, Ralph Smith wrote:
>
> How are the processes supposed to interact with the database?  Without 
> extra synchronization logic, SQLite.jl gives (occasionally)
> ERROR: LoadError: On worker 2:
> SQLite.SQLiteException("database is locked")
> which on the face of it suggests that all workers are using the same 
> connection, although I opened the DB separately in each process.
> (I think we should get "busy" instead of "locked", but then still have no 
> good way to test for this and wait for a wake-up signal.)
> So we seem to be at least as badly off as the original post, except with 
> DB calls instead of simple writes.
>
> We shouldn't have to stand up a separate multithreaded DB server just for 
> this. Would you be kind enough to give us an example of simple (i.e. not 
> client-server) multiprocess DB access in Julia?
>
> On Saturday, October 15, 2016 at 9:40:17 AM UTC-4, Steven Sagaert wrote:
>>
>> It still surprises me how in the scientific computing field people still 
>> refuse to learn about databases and then replicate database functionality 
>> in files in a complicated and probably buggy way. HDF5  is one example, 
>> there are many others. If you want to to fancy search (i.e. speedup search 
>> via indices) or do things like parallel writes/concurrency you REALLY 
>> should use databases. That's what they were invented for decades ago. 
>> Nowadays there a bigger choice than ever: Relational or non-relational 
>> (NOSQL), single host or distributed, web interface or not,  disk-based or 
>> in-memory,... There really is no excuse anymore not to use a database if 
>> you want to go beyond just reading in a bunch of data in one go in memory.
>>
>> On Monday, October 10, 2016 at 5:09:39 PM UTC+2, Zachary Roth wrote:
>>>
>>> Hi, everyone,
>>>
>>> I'm trying to save to a single file from multiple worker processes, but 
>>> don't know of a nice way to coordinate this.  When I don't coordinate, 
>>> saving works fine much of the time.  But I sometimes get errors with 
>>> reading/writing of files, which I'm assuming is happening because multiple 
>>> processes are trying to use the same file simultaneously.
>>>
>>> I tried to coordinate this with a queue/channel of `Condition`s managed 
>>> by a task running in process 1, but this isn't working for me.  I've tried 
>>> to simiplify this to track down the problem.  At least part of the issue 
>>> seems to be writing to the channel from process 2.  Specifically, when I 
>>> `put!` something onto a channel (or `push!` onto an array) from process 2, 
>>> the channel/array is still empty back on process 1.  I feel like I'm 
>>> missing something simple.  Is there an easier way to go about coordinating 
>>> multiple processes that are trying to access the same file?  If not, does 
>>> anyone have any tips?
>>>
>>> Thanks for any help you can offer.
>>>
>>> Cheers,
>>> ---Zachary
>>>
>>