[julia-users] Re: How to set JULIA_NUM_THREADS for remote workers?

2016-08-17 Thread Lyndon White
On a per machine basis, some `profile` initialisations files run even when your login shell is used (ie even if a command is specified in the SSH parameter, i.e. even when starting julia workers), where as others only run if you start a shell script or an interactive shell (rc) If your default

[julia-users] Re: Does Julia always need internet access when loading a package?

2016-08-17 Thread Jan Hlavacek
On Wednesday, August 17, 2016 at 12:37:58 AM UTC-4, Andreas Lobinger wrote: > > > http://docs.julialang.org/en/release-0.4/stdlib/pkg/#Base.Pkg.dir > > For improving the documentation it would be interesting, what information > you (or your admin, the 'they') had used for the setup. > One thing

[julia-users] Re: Help needed with excessive memory allocation for Tuples

2016-08-17 Thread vavasis
Just so you know, a similar issue exists in some of the Base types in Julia. For example "sub" (to extract a subarray from an array that does not copy the elements but rather provides a view of the original array) and "Ref" (to create a pointer that can be passed to a C subroutine) both

Re: [julia-users] Fast random access to Dict

2016-08-17 Thread Erik Schnetter
For the insertion stage, the Dict is likely ideal. For the second stage, a Dict that is based on hashing is a good data structure. Another data structure worth examining would be a sorted vector of `(Int64, Float64)` pairs (sorted by the `Int64` keys). Interpolation search

[julia-users] Fast random access to Dict

2016-08-17 Thread 'Greg Plowman' via julia-users
I need fast random access to a Dict{Int64,Float64}. My application has a first phase in which the Dict is populated, and a second phase where it accessed randomly (with no further additions or deletions). There are about 50,000 to 100,000 entries, with keys in the range 10^9 to 10^14. Firstly

[julia-users] Re: Error in `/usr/local/bin/julia': malloc(): smallbin double linked list corrupted

2016-08-17 Thread Jeffrey Sarnoff
moving this to be an issue #18098 On Wednesday, August 17, 2016 at 7:13:33 PM UTC-4, Jeffrey Sarnoff wrote: > > My code uses a stable C library's initialization and freeing (as a > finalizer) routines via ccall. I do not do anything with Julia

[julia-users] Re: Error in `/usr/local/bin/julia': malloc(): smallbin double linked list corrupted

2016-08-17 Thread Jeffrey Sarnoff
My code uses a stable C library's initialization and freeing (as a finalizer) routines via ccall. I do not do anything with Julia internals overtly. On Wednesday, August 17, 2016 at 6:43:36 PM UTC-4, Jeffrey Sarnoff wrote: > > Is this the fault of my code or does the fault lie elsewhere? > >

[julia-users] Error in `/usr/local/bin/julia': malloc(): smallbin double linked list corrupted

2016-08-17 Thread Jeffrey Sarnoff
Is this the fault of my code or does the fault lie elsewhere? v0.5rc2, the log is available: error.txt

[julia-users] Re: Wrapping an array from C

2016-08-17 Thread Kiran Pamnany
On Wednesday, August 17, 2016 at 11:49:14 AM UTC-7, Steven G. Johnson wrote: > > Will simply overwrite the Bar that's at array[i]? >> > > Yes. > > I verified this. Fantastic, thanks! > Is there a way to assert that a type is immutable? >> > > You declare it as > > immutable MyType >

Re: [julia-users] Could I start multiple workers for parallel processing from the program without starting from terminal ?

2016-08-17 Thread Stefan Karpinski
http://docs.julialang.org/en/release-0.4/stdlib/parallel/#Base.addprocs On Wed, Aug 17, 2016 at 3:50 PM, Rishabh Raghunath wrote: > Hello Julia Users ! > I am a beginner in Julia .. > I was wondering if there is a way to start multiple workers for parallel > processing

[julia-users] Could I start multiple workers for parallel processing from the program without starting from terminal ?

2016-08-17 Thread Rishabh Raghunath
Hello Julia Users ! I am a beginner in Julia .. I was wondering if there is a way to start multiple workers for parallel processing from the Julia program rather than starting Julia from terminal with " julia -p n " ? Is there a way that I can increase the number of workers right from the

Re: [julia-users] How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread jonathan . bieler
Note also that using a range to loop through a string is not a good idea if it might contain unicode characters. s = "a°sd2β2" for i=1:length(s) print(s[i]) end LoadError: UnicodeError: invalid character index Last time I checked there was still some functions in Base like findlast that

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread 'Bill Hart' via julia-users
I created [1] to make specific note of this issue. Bill. [1] https://github.com/JuliaLang/julia/issues/18084

[julia-users] Code coverage and multi-line expressions

2016-08-17 Thread Brandon Taylor
I like using chaining macros a lot, but it tanks my code coverage. For example, if I did something like this, the three lines in the middle would be marked as not covered. Is this a bug? Should I raise an issue somewhere? This seems like it's a general issue with multi-line expressions (for

Re: [julia-users] Parent type of a parametric type

2016-08-17 Thread Cedric St-Jean
Thank you, that works. I suppose I will have to use a generated function to make this type-stable. On Wed, Aug 17, 2016 at 1:02 AM, Mauro wrote: > > On Wed, 2016-08-17 at 05:04, Cedric St-Jean > wrote: > > Hi, I'm writing a function to recursively

[julia-users] Re: What exactly triggers a package recompile?

2016-08-17 Thread Steven G. Johnson
On Wednesday, August 17, 2016 at 12:01:31 PM UTC-4, Jan Hlavacek wrote: > > I am working on a system that has a number of packages installed system > wide in /usr/local/share/julia/site/. The problem is, when trying to load > a package, Julia tries to recompile it, and cannot do so since >

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread 'Bill Hart' via julia-users
On Wednesday, 17 August 2016 20:22:56 UTC+2, Kristoffer Carlsson wrote: > > See pr 8134. I dont think you have any worse cache locality than with your > original tuple. You are right. I just have more memory usage. The heap will in fact have better cache locality. I'll just have exp

[julia-users] Re: Wrapping an array from C

2016-08-17 Thread Steven G. Johnson
On Wednesday, August 17, 2016 at 12:08:12 PM UTC-4, Kiran Pamnany wrote: > > On Wednesday, August 17, 2016 at 5:46:34 AM UTC-7, Steven G. Johnson wrote: >> >> An array of immutables is just an array of structs. Replacing an element >> just overwrites that memory in an array, it doesn't involve

Re: [julia-users] Julia eval(text) function

2016-08-17 Thread Steven G. Johnson
On Wednesday, August 17, 2016 at 12:59:54 PM UTC-4, Erik Schnetter wrote: > > In Julia, you would not map a string, but map a function instead: > Even in Matlab these days you should really pass functions around. Matlab has perfectly okay lexically scoped anonymous functions @(args...) expr.

Re: [julia-users] How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread Steven G. Johnson
On Wednesday, August 17, 2016 at 1:52:47 PM UTC-4, Rishabh Raghunath wrote: > > For Example: Writing a Encrypting program requires me to modify the > characters in the string.. > This is a pretty bad example, because encryption almost always (a) doesn't work in-place and (b) only looks at raw

Re: [julia-users] How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread 'Bill Hart' via julia-users
Since strings are immutable in Julia, and immutable means you can't change them, you can't change the characters in a string whilst keeping them of type string. If you want to be able to change the characters directly, you need to use something other than a string, e.g. an array of characters

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
See pr 8134. I dont think you have any worse cache locality than with your original tuple.

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Erik Schnetter
Since the pointer to the symbol's value does not change over time, you can simply store the pointer (i.e. essentially the object id) as an integer value. There is no need to choose an offset. The advantage of storing the pointer instead of the object id is that you can use the pointer to

Re: [julia-users] Determining L1 cache size?

2016-08-17 Thread Erik Schnetter
On Wed, Aug 17, 2016 at 1:31 PM, Páll Haraldsson wrote: > On Tuesday, August 16, 2016 at 1:41:54 PM UTC, Erik Schnetter wrote: >> >> ```Julia >> Pkg.add("Hwloc") >> using Hwloc >> topo = load_topology() >> print(topo) >> ``` >> >> I just see that Hwloc has problems

Re: [julia-users] How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread Rishabh Raghunath
Thank you for the immense support from this amazing group !!.. I am a beginner in Julia and I am more familiar with the C language.. Now.. I understand strings are immutable.. I am actually learning Julia for use in a programming contest and love the experience so far.. There are often questions

[julia-users] Re: Determining L1 cache size?

2016-08-17 Thread Páll Haraldsson
On Tuesday, August 16, 2016 at 9:12:51 AM UTC, Oliver Schulz wrote: > > I'd like to determine the optimal block size(s) for an array algorithm. > That is done, as I said, e.g. with BLAS. But is it still relevant? Are cache-oblivious algorithms supposed to not need to know sizes and details and

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread 'Bill Hart' via julia-users
I basically extended the heap_s struct to also include the exp field. This uses twice the memory, but gets rid of the massive number of heap allocations. Unfortunately I lose the cache efficiency of the original solution, so it's still about 20-50% slower than it should be. It'll have to do for

Re: [julia-users] How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread Stefan Karpinski
Indeed. Don't do this – your code will definitely break in the future if you do this. On Wed, Aug 17, 2016 at 1:18 PM, g wrote: > Isn't it a red herring to say that strings lack setindex because they are > immutable? I think strings don't have setindex! because it is

Re: [julia-users] Julia eval(text) function

2016-08-17 Thread Stefan Karpinski
See also the mapslices function which is very close to your function but more general. On Wed, Aug 17, 2016 at 12:59 PM, Erik Schnetter wrote: > In Julia, you would not map a string, but map a function

Re: [julia-users] Determining L1 cache size?

2016-08-17 Thread Páll Haraldsson
On Tuesday, August 16, 2016 at 1:41:54 PM UTC, Erik Schnetter wrote: > > ```Julia > Pkg.add("Hwloc") > using Hwloc > topo = load_topology() > print(topo) > ``` > > I just see that Hwloc has problems with Julia 0.5; I'll tag a new release. > Great to know about the hwloc package and its wrapper (I

Re: [julia-users] How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread ggggg
Isn't it a red herring to say that strings lack setindex because they are immutable? I think strings don't have setindex! because it is considered to be a bad API choice, at least partially because you can't do O(1) indexing for many string encodings. I can easily define a setindex! method*

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
Just make a new type instead of the tuple and directly set the fields of it?

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread 'Bill Hart' via julia-users
Wowsers! That's one hell of a serious issue. On 17 August 2016 at 18:33, Kristoffer Carlsson wrote: > Immutables and tuples that contain references to heap allocated objects > are currently themselves allocated on the heap. There is an issue about it. > >

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Jameson
We could change the implementation of Symbol to be an opaque offset instead of being and opaque value pointer, but then passing around Symbols in generic contexts would require boxing that offset. So six of one, half dozen of the other. Fixing the issue that all immutable objects can't be

Re: [julia-users] Julia eval(text) function

2016-08-17 Thread Erik Schnetter
In Julia, you would not map a string, but map a function instead: ```Julia function mapcol(f, p0) M,N = size(p0) y = similar(p0) for i in 1:N x = view(p0, :,i) y[:,i] = f(x) end y end ``` You would call it e.g. as `mapcol(v -> v+1, p0)`. Parsing and

Re: [julia-users] Re: How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread Erik Schnetter
Alternatively, convert the string to an array of characters, which is mutable: ```Julia a = Vector{Char}("abcd") for i in 1:length(a) a[i] += 1 end ``` -erik On Wed, Aug 17, 2016 at 3:59 AM, 'Greg Plowman' via julia-users < julia-users@googlegroups.com> wrote: > I think Jacob meant: > >

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Erik Schnetter
See for what I had in mind. -erik On Wed, Aug 17, 2016 at 10:32 AM, Yichao Yu wrote: > > > On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz < > oliver.sch...@tu-dortmund.de> wrote: > >> Hi Yichao >> >> I get that - I was just

[julia-users] Julia eval(text) function

2016-08-17 Thread Nicholas Hausch
Hello all. I am attempting to translate a MATLAB file that evaluates a string column by column. The function is simple, pasted below: function y = mapcol(text,p0,p1,p2) %MAPCOL % mapcol(STRING,A,B,C) will execute the command % contained

[julia-users] Memory allocations when accessing tuple fields

2016-08-17 Thread Kristoffer Carlsson
Dont benchmark in global scope.

[julia-users] Memory allocations when accessing tuple fields

2016-08-17 Thread Uri Patish
Hi, Consider the following code, type TestType a::Int b::Array{Int, 1} c::Tuple{Int, Int} end a = 1 b = [2,3] c = (4,5) t = TestType(a, b, c) println(@allocated a) println(@allocated t.a) println(@allocated b) println(@allocated t.b) println(@allocated c) println(@allocated t.c)

[julia-users] Re: Performance tips for network data transfer?

2016-08-17 Thread Matthew Pearce
Thanks for the thoughts people, much appreciated, gives me some ideas to work with. I'm going to play around with pure Julia solutions first as my prior experience trying to get MPI.jl running on my cluster in a REPL was painful. This could be the wrong attitude and I may have to change it.

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
Immutables and tuples that contain references to heap allocated objects are currently themselves allocated on the heap. There is an issue about it.

Re: [julia-users] Wrapping an array from C

2016-08-17 Thread Kiran Pamnany
On Wednesday, August 17, 2016 at 12:49:58 AM UTC-7, Bart Janssens wrote: > > It looks like ptr is actually an array of pointers? If so, you could > access the first element using: > unsafe_load(convert(Ptr{atyp}, p[1])) > > ptr is a pointer to the beginning of an array of structs. Steve has

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread 'Bill Hart' via julia-users
Wait, I understand why heap_s would be allocated on the heap. But why would a tuple involving a heap_s need to be allocated on the heap assuming the heap_s already exists? The tuple should just have the NTuple and one pointer (to a heap_s) at the machine level. This is clearly the problem, but I

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
Unless heap_s is a bitstype then the tuple will be allocated on the heap. But you are saying it is getting allocated twice?

[julia-users] Re: Wrapping an array from C

2016-08-17 Thread Kiran Pamnany
On Wednesday, August 17, 2016 at 5:46:34 AM UTC-7, Steven G. Johnson wrote: > > An array of immutables is just an array of structs. Replacing an element > just overwrites that memory in an array, it doesn't involve any allocation. > So the line of code you posted: array[i] = Bar(x, y, ...)

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread 'Bill Hart' via julia-users
It's very, very hard to produce working code that illustrates a problem when working on a very large system like ours. There's nearly 1000 lines of code just to set up the data! If you want to take a look, it's here, though I'm not sure how enlightening it will be:

[julia-users] What exactly triggers a package recompile?

2016-08-17 Thread Jan Hlavacek
I am working on a system that has a number of packages installed system wide in /usr/local/share/julia/site/. The problem is, when trying to load a package, Julia tries to recompile it, and cannot do so since /usr/local/share/julia/site/lib/v0.4/ is not writable. I would not expect the

[julia-users] Re: Hang generating sys-all.o

2016-08-17 Thread Jared Crean
Done: https://github.com/JuliaLang/julia/issues/18080 On Wednesday, August 17, 2016 at 12:28:25 AM UTC-4, Jameson wrote: > > Please open a bug on Github. That counter often has had issues with > over-counting when other code around it changes, but usually its a minor > fix to get it to

[julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
As always, it is very helpful if there is some code that is actually runnable in the post that contains the problem. It is easier to run Julia code in Julia than in your brain :)

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread 'Bill Hart' via julia-users
N = 1 in the case I'm profiling/timing. It's typically < 10 in applications, usually much less. Bil. On 17 August 2016 at 17:50, Kristoffer Carlsson wrote: > What is N typically?

[julia-users] Re: Does Julia always need internet access when loading a package?

2016-08-17 Thread Jan Hlavacek
On Wednesday, August 17, 2016 at 12:37:58 AM UTC-4, Andreas Lobinger wrote: > > > http://docs.julialang.org/en/release-0.4/stdlib/pkg/#Base.Pkg.dir > > For improving the documentation it would be interesting, what information > you (or your admin, the 'they') had used for the setup. > > The

[julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
What is N typically?

[julia-users] Re: unable to connect to FTP using IP address

2016-08-17 Thread Samuel Massinon
Hi Yared, Okay, since it worked with you and not me I won't be able to tests my solutions. You don't specify that you want to download in binary when you make the connection. I'm not sure what version of FTPClient.jl you are using, but binary downloads did not work on the first version of

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Oliver Schulz
Thanks for the explanation, Yichao! On Wednesday, August 17, 2016 at 4:33:43 PM UTC+2, Yichao Yu wrote: > > > > On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz > wrote: > >> Hi Yichao >> >> I get that - I was just curious why (and I guess there's likely a very >>

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Yichao Yu
On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz < oliver.sch...@tu-dortmund.de> wrote: > Hi Yichao > > I get that - I was just curious why (and I guess there's likely a very > good reason for it). My intuition would be that a non-GCed interned string > type could be represented by a bitstype

[julia-users] Re: unable to connect to FTP using IP address

2016-08-17 Thread Yared Melese
Hi Samuel, Thanks The following worked ftp = FTP(host="192.168.255.69") However, if I want the transfer to be in binary mode then it won't work Thanks Yared On Tuesday, August 9, 2016 at 2:26:30 PM UTC-5, Samuel Massinon wrote: > Hi Yared > > Sorry, I got side tracked by other things and

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Oliver Schulz
Hi Yichao I get that - I was just curious why (and I guess there's likely a very good reason for it). My intuition would be that a non-GCed interned string type could be represented by a bitstype (i.e. a pointer or index to the string table). So I was surprised that Symbol is an object

[julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-17 Thread Henri Girard
Ok, I did it again : 0.5 julia> tic(); using PyPlot; toc(); elapsed time: 8.14015376 seconds julia> tic(); using PyPlot; toc(); elapsed time: 0.000152792 seconds julia> 0.4.5 julia> tic(); using PyPlot; toc(); elapsed time: 5.030407122 seconds julia> tic(); using PyPlot; toc(); elapsed time:

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Andreas Lobinger
Hello colleague, On Wednesday, August 17, 2016 at 3:01:37 PM UTC+2, Oliver Schulz wrote: > > > unless they just became numbers to index into a global array somewhere > > I had assumed that this is basically what Symbols (being interned strings) > are. > I might write something stupid here, but

Re: [julia-users] Determining L1 cache size?

2016-08-17 Thread Erik Schnetter
On Wed, Aug 17, 2016 at 5:43 AM, Oliver Schulz wrote: > Great - thanks, Eric! > > Would it be possible to enable precompilation for SIMD.jl (so that another > precompiled packages can have it as a dependency)? > Sure. Of course, you probably won't see any speed

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Yichao Yu
> PS: Yes, symbols in Julia should be bitstypes. No, it's a object reference and isn't a `isbits()` type. > > On Wed, Aug 17, 2016 at 8:26 AM, Cedric St-Jean > wrote: > >> Good points. >> >> Given that symbols have a name which is a string, I don't see how they >>

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Erik Schnetter
You could create your own immutable type that holds a `Ptr`, and then define respective `unsafe` functions that convert from `Symbol` to `Ptr` and back: ```Julia # Take a symbol, convert to a bitstype: sym = :car ptr = Cstring(sym) isbits(ptr) # Convert back to a symbol sym2 =

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Oliver Schulz
> unless they just became numbers to index into a global array somewhere I had assumed that this is basically what Symbols (being interned strings) are. > Maybe you can solve the CategorizedPoint problem by using an @enum. For a fixed set of categories, of course, but not otherwise. >

[julia-users] Re: Wrapping an array from C

2016-08-17 Thread Steven G. Johnson
On Wednesday, August 17, 2016 at 12:39:51 AM UTC-4, Kiran Pamnany wrote: > > The memory underlying this array needs to be managed by the C library (it > must be pinned and its location published to allow remote memory access). > I'd have to provide a specialized allocator, but even that

[julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-17 Thread Uwe Fechner
Well, your test with 0.4.5 includes the time of the precompilation, your test with 0.5 rc2 not, so this is not a valid comparison. I compared only the time without precompilation, the second time of using the module, but after restarting julia. Uwe On Wednesday, August 17, 2016 at 2:32:42 PM

[julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-17 Thread Henri Girard
Thank you... The first one is my mistake when I copy it I started by the second line for the second one I will look further in the doc. (By the way I did your regression test : First is first time runing in julia second is straight after 0.4.5 julia> tic();using PyPlot;toc() INFO:

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Cedric St-Jean
Good points. Given that symbols have a name which is a string, I don't see how they could be a bits-type unless they just became numbers to index into a global array somewhere.. i.e. a pointer. Stack-allocating non-bits-type immutables is on the roadmap to 1.0, so that should solve your

Re: [julia-users] Re: How to set JULIA_NUM_THREADS for remote workers?

2016-08-17 Thread Oliver Schulz
Hi Bart, ~/.ssh/environment could work, but it's a bit too global for my taste. :-) Cheers, Oliver On Wednesday, August 17, 2016 at 1:11:43 PM UTC+2, Bart Janssens wrote: > > > > On Wed, Aug 17, 2016 at 12:53 PM Oliver Schulz > wrote: > >> Sure, but *how* do I

Re: [julia-users] Re: How to set JULIA_NUM_THREADS for remote workers?

2016-08-17 Thread Oliver Schulz
Yup: https://github.com/JuliaLang/julia/issues/18074 On Wednesday, August 17, 2016 at 12:54:51 PM UTC+2, Jeffrey Sarnoff wrote: > > yep -- that sums it up, you could open an issue (on your issue). > > On Wed, Aug 17, 2016 at 6:52 AM, Oliver Schulz > wrote: > >> Sure,

Re: [julia-users] Re: How to set JULIA_NUM_THREADS for remote workers?

2016-08-17 Thread Bart Janssens
On Wed, Aug 17, 2016 at 12:53 PM Oliver Schulz wrote: > Sure, but *how* do I preset JULIA_NUM_THREADS in the environment of the > workers? It'll still be application dependent, so it can be in a .profile > or so (which probably won't be run anyway for the worker

Re: [julia-users] Re: How to set JULIA_NUM_THREADS for remote workers?

2016-08-17 Thread Jeffrey Sarnoff
yep -- that sums it up, you could open an issue (on your issue). On Wed, Aug 17, 2016 at 6:52 AM, Oliver Schulz wrote: > Sure, but *how* do I preset JULIA_NUM_THREADS in the environment of the > workers? It'll still be application dependent, so it can be in a

[julia-users] Re: How to set JULIA_NUM_THREADS for remote workers?

2016-08-17 Thread Oliver Schulz
Sure, but *how* do I preset JULIA_NUM_THREADS in the environment of the workers? It'll still be application dependent, so it can be in a .profile or so (which probably won't be run anyway for the worker processes). On Wednesday, August 17, 2016 at 12:00:16 PM UTC+2, Jeffrey Sarnoff wrote: > >

[julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Oliver Schulz
Hello Andreas, consider iterating over a Dict{Symbol,Int64}: d = Dict(:foo => 42, :bar => 77) for x in d println("$(typeof(x)), $(isbits(x))") end During iteration, a lot of stack allocated "Pair{Symbol,Int64}" objects are created. That is very bad for performance. immutable CategorizedPoint

[julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-17 Thread Uwe Fechner
Hello, first, I had to move the line: gangoffourplot(P,tf(1)) after the line, where you define P. This plot works fine. Next, I can reproduce that stepplot(CLs) doesn't work. But it does not work on Julia 0.4.6 either, so this problem is not related to Julia 5.0 RC2. Uwe, Ubuntu 14.04, 64 bit

[julia-users] Re: How to set JULIA_NUM_THREADS for remote workers?

2016-08-17 Thread Jeffrey Sarnoff
Hi Oliver, I omitted two letters "the environment" should have been "their environment": "and in [each of] *their* [remote] enviroment[s] JULIA_NUM_THREADS had been preset [in each remote environment before each remote Julia had been started].. from in the REPL ?addprocs " Note that workers

[julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Andreas Lobinger
Hello colleague, On Wednesday, August 17, 2016 at 11:12:51 AM UTC+2, Oliver Schulz wrote: > > Sure - I was assuming that as Symbol (as an interned string) is basically > just a pointer. So comparisons are O(1), etc. What I'd like to understand > is, why can't it be a bitstype? Currently, it's

Re: [julia-users] Determining L1 cache size?

2016-08-17 Thread Oliver Schulz
Great - thanks, Eric! Would it be possible to enable precompilation for SIMD.jl (so that another precompiled packages can have it as a dependency)? Uh, and can I ask another question regarding SIMD.jl? Is it possible to shift SIMD vectors by one element? Ideally, I'd like to shift one element

[julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-17 Thread Henri Girard
Using 0.5 RC2, this morning I couldn't get the second plot, the first is ok, but the second doesn't display, and worse even in julia console. I will try the regression test using ControlSystems, Plots gangoffourplot(P,tf(1)) J = 2.0 b = 0.04 K = 1.0 R = 0.08 L = 1e-4 # Create the model

[julia-users] Re: How to set JULIA_NUM_THREADS for remote workers?

2016-08-17 Thread Oliver Schulz
Hi Jeff, > If your remote workers are remotely local invocations of Julia and in the environment JULIA_NUM_THREADS has been preset, then the remote workers will be using that many threads I tried it, and at least when the workers are started via SSH (using addprocs([host1, ...])), that

[julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-17 Thread Oliver Schulz
Sure - I was assuming that as Symbol (as an interned string) is basically just a pointer. So comparisons are O(1), etc. What I'd like to understand is, why can't it be a bitstype? Currently, it's not, so Symbol cannot be used in a lightweight (i.e. stack-allocated) immutable type. I assume

[julia-users] Re: How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread 'Greg Plowman' via julia-users
I think Jacob meant: for char in a write(io, char + 1) end

Re: [julia-users] Wrapping an array from C

2016-08-17 Thread Bart Janssens
On Tue, Aug 16, 2016 at 10:29 PM Kiran Pamnany > If I use a composite type, Bar, instead of a bits type, then I get back an > array of Bar, but each element is #undef. The memory for the elements of > the array is present (sizeof(Bar) was used to allocate the space), but the > array isn't set up

Re: [julia-users] DataFrame inline IO with csv in variable

2016-08-17 Thread Tamas Papp
Listing various combinations of functions in the help docs is neither necessary nor feasible IMO, you learn idiomatic use of Julia by reading code (especially see libraries by core team members), writing code, and asking on the list. I agree that it is hard to search when you don't know what you

[julia-users] Re: How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread Rishabh Raghunath
Hello Jacob !!.. I get this error while trying to run your code: Error evaluating cyclic.jl LoadError: MethodError: `+` has no method matching +(::ASCIIString, ::Int64) Closest candidates are: +(::Any, ::Any, !Matched::Any, !Matched::Any...) +(!Matched::Int64, ::Int64)

Re: [julia-users] How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread Jacob Quinn
Strings are immutable (similar to other languages). There are several different ways to get what you want, but I tend to utilize IOBuffer a lot: a = "abcd" io = IOBuffer() for char in a write(io, a + 1) end println(takebuf_string(io)) -Jacob On Wed, Aug 17, 2016 at 12:30 AM, Rishabh

Re: [julia-users] DataFrame inline IO with csv in variable

2016-08-17 Thread Colin Beckingham
Many thanks, works perfectly. I see the question was asked before; I did do a search but I guess my criteria were poor. Might be a good entry in the help docs. On Tuesday, 16 August 2016 08:10:10 UTC-4, Tamas Papp wrote: > > readtable(IOBuffer(string)) > > On Tue, Aug 16 2016, Colin Beckingham

[julia-users] How to Manipulate each character in of a string using a for loop in Julia ?

2016-08-17 Thread Rishabh Raghunath
Hello fellow Julia Users!! How do you manipulate the individual characters comprising a string in Julia using a for loop ? For example: ### a = "abcd" for i in length(a) a[i]+=1 end print(a) I am expecting to get my EXPECTED OUTPUT as"