Re: [julia-users] Re: How to deploy Julia

2015-06-23 Thread René Donner
Cross-linking this to the corresponding issue: 
https://github.com/JuliaLang/julia/issues/11816


Am 23.06.2015 um 12:17 schrieb Vladislav Falfushinsky 
vladislav.falfushin...@gmail.com:

 Recently I`ve tried to deploy julia application, but I recieved an error.
 
 The code is rather simple:
 
 function main()
 println(Hello world!!!)
 println(1 + 1)
 end
 main()
 
 I use command:
 
 julia julia-master/contrib/build_executable.jl testexec ./test2.jl --force
 
 However I recieve an error:
 
 LoadError(at sysimg.jl line 327: LoadError(at 
 /opt/emgs/projects/tmp/julia/julia-master/base/userimg.jl line 1: 
 LoadError(at /opt/emgs/projects/tmp/julia/test2.jl line 7: 
 UndefVarError(var=:STDOUT
 rec_backtrace at /opt/emgs/projects/tmp/julia/julia-master/src/task.c:649
 jl_throw at /opt/emgs/projects/tmp/julia/julia-master/src/task.c:809
 jl_undefined_var_error at 
 /opt/emgs/projects/tmp/julia/julia-master/src/builtins.c:124
 main at /opt/emgs/projects/tmp/julia/test2.jl:3
 jlcall_main_21949 at  (unknown line)
 jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1650
 jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:66
 eval at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:212
 jl_toplevel_eval_flex at 
 /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:517
 jl_parse_eval_all at 
 /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:567
 jl_load at /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:610
 include at boot.jl:254
 jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1625
 include_from_node1 at loading.jl:133
 jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1625
 jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:66
 eval at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:212
 jl_toplevel_eval_flex at 
 /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:517
 jl_parse_eval_all at 
 /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:567
 jl_load at /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:610
 include at boot.jl:254
 jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1625
 include_from_node1 at loading.jl:133
 jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1625
 jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:66
 eval at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:212
 eval_body at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:598
 jl_toplevel_eval_body at 
 /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:529
 jl_toplevel_eval_flex at 
 /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:511
 jl_parse_eval_all at 
 /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:567
 jl_load at /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:610
 unknown function (ip: 0x40249c)
 unknown function (ip: 0x4029a5)
 unknown function (ip: 0x402a5f)
 __libc_start_main at /lib64/libc.so.6 (unknown line)
 unknown function (ip: 0x401589)
 
 ERROR: LoadError: failed process: 
 Process(`/opt/emgs/projects/tmp/julia/julia-master/usr/bin/julia -C native 
 --build /opt/emgs/projects/tmp/julia/julia-master/usr/lib/libtestexec -J 
 /opt/emgs/projects/tmp/julia/julia-master/usr/lib/inference.ji -f sysimg.jl`, 
 ProcessExited(1)) [1]
  in run at ./process.jl:490
  in anonymous at 
 /opt/emgs/projects/tmp/julia/julia-master/contrib/build_sysimg.jl:66
  in cd at ./file.jl:22
  in build_sysimg at 
 /opt/emgs/projects/tmp/julia/julia-master/contrib/build_sysimg.jl:27
  in include at ./boot.jl:254
  in include_from_node1 at loading.jl:133
  in process_options at ./client.jl:304
  in _start at ./client.jl:404
 while loading 
 /opt/emgs/projects/tmp/julia/julia-master/contrib/build_sysimg.jl, in 
 expression starting on line 176
 
 ERROR: LoadError: failed process: 
 Process(`/opt/emgs/projects/tmp/julia/julia-master/usr/bin/julia 
 /opt/emgs/projects/tmp/julia/julia-master/contrib/build_sysimg.jl 
 /opt/emgs/projects/tmp/julia/julia-master/usr/lib/libtestexec native 
 /tmp/tmpyZPKz2/userimg.jl --force`, ProcessExited(1)) [1]
  in run at ./process.jl:490
  in build_executable at 
 /opt/emgs/projects/tmp/julia/julia-master/contrib/build_executable.jl:109
  in build_executable at 
 /opt/emgs/projects/tmp/julia/julia-master/contrib/build_executable.jl:58
  in include at ./boot.jl:254
  in include_from_node1 at loading.jl:133
  in process_options at ./client.jl:304
  in _start at ./client.jl:404
 while loading 
 /opt/emgs/projects/tmp/julia/julia-master/contrib/build_executable.jl, in 
 expression starting on line 277
 
 
 On Sunday, June 14, 2015 at 4:17:03 PM UTC+2, Daniel Carrera wrote:
 I never cease to be impressed by Julia's speed. I just wrote a test program 
 in Julia and Fortran 90 (it computes the gravitational force between some 
 planets). To my surprise, the Julia version was 7% faster than Fortran.
 
 So... apparently one can write N-body codes with Julia.
 

[julia-users] Re: How to deploy Julia

2015-06-23 Thread Vladislav Falfushinsky
Recently I`ve tried to deploy julia application, but I recieved an error.

The code is rather simple:

function main()
println(Hello world!!!)
println(1 + 1)
end
main()

I use command:

julia julia-master/contrib/build_executable.jl testexec ./test2.jl --force

However I recieve an error:

LoadError(at sysimg.jl line 327: LoadError(at 
/opt/emgs/projects/tmp/julia/julia-master/base/userimg.jl line 1: 
LoadError(at /opt/emgs/projects/tmp/julia/test2.jl line 7: 
UndefVarError(var=:STDOUT
rec_backtrace at /opt/emgs/projects/tmp/julia/julia-master/src/task.c:649
jl_throw at /opt/emgs/projects/tmp/julia/julia-master/src/task.c:809
jl_undefined_var_error at 
/opt/emgs/projects/tmp/julia/julia-master/src/builtins.c:124
main at /opt/emgs/projects/tmp/julia/test2.jl:3
jlcall_main_21949 at  (unknown line)
jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1650
jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:66
eval at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:212
jl_toplevel_eval_flex at 
/opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:517
jl_parse_eval_all at 
/opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:567
jl_load at /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:610
include at boot.jl:254
jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1625
include_from_node1 at loading.jl:133
jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1625
jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:66
eval at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:212
jl_toplevel_eval_flex at 
/opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:517
jl_parse_eval_all at 
/opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:567
jl_load at /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:610
include at boot.jl:254
jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1625
include_from_node1 at loading.jl:133
jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/gf.c:1625
jl_apply at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:66
eval at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:212
eval_body at /opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:598
jl_toplevel_eval_body at 
/opt/emgs/projects/tmp/julia/julia-master/src/interpreter.c:529
jl_toplevel_eval_flex at 
/opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:511
jl_parse_eval_all at 
/opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:567
jl_load at /opt/emgs/projects/tmp/julia/julia-master/src/toplevel.c:610
unknown function (ip: 0x40249c)
unknown function (ip: 0x4029a5)
unknown function (ip: 0x402a5f)
__libc_start_main at /lib64/libc.so.6 (unknown line)
unknown function (ip: 0x401589)

ERROR: LoadError: failed process: 
Process(`/opt/emgs/projects/tmp/julia/julia-master/usr/bin/julia -C native 
--build /opt/emgs/projects/tmp/julia/julia-master/usr/lib/libtestexec -J 
/opt/emgs/projects/tmp/julia/julia-master/usr/lib/inference.ji -f sysimg.jl`, 
ProcessExited(1)) [1]
 in run at ./process.jl:490
 in anonymous at 
/opt/emgs/projects/tmp/julia/julia-master/contrib/build_sysimg.jl:66
 in cd at ./file.jl:22
 in build_sysimg at 
/opt/emgs/projects/tmp/julia/julia-master/contrib/build_sysimg.jl:27
 in include at ./boot.jl:254
 in include_from_node1 at loading.jl:133
 in process_options at ./client.jl:304
 in _start at ./client.jl:404
while loading 
/opt/emgs/projects/tmp/julia/julia-master/contrib/build_sysimg.jl, in 
expression starting on line 176

ERROR: LoadError: failed process: 
Process(`/opt/emgs/projects/tmp/julia/julia-master/usr/bin/julia 
/opt/emgs/projects/tmp/julia/julia-master/contrib/build_sysimg.jl 
/opt/emgs/projects/tmp/julia/julia-master/usr/lib/libtestexec native 
/tmp/tmpyZPKz2/userimg.jl --force`, ProcessExited(1)) [1]
 in run at ./process.jl:490
 in build_executable at 
/opt/emgs/projects/tmp/julia/julia-master/contrib/build_executable.jl:109
 in build_executable at 
/opt/emgs/projects/tmp/julia/julia-master/contrib/build_executable.jl:58
 in include at ./boot.jl:254
 in include_from_node1 at loading.jl:133
 in process_options at ./client.jl:304
 in _start at ./client.jl:404
while loading 
/opt/emgs/projects/tmp/julia/julia-master/contrib/build_executable.jl, in 
expression starting on line 277


On Sunday, June 14, 2015 at 4:17:03 PM UTC+2, Daniel Carrera wrote:

 I never cease to be impressed by Julia's speed. I just wrote a test 
 program in Julia and Fortran 90 (it computes the gravitational force 
 between some planets). To my surprise, the Julia version was 7% faster than 
 Fortran.

 So... apparently one can write N-body codes with Julia.

 Suppose I wrote a simulation in Julia. What would be the best way to 
 deploy it to a distant computer cluster where I do not have root access? 
 The cluster runs Linux. Can I get a single stand-alone Julia binary that I 
 can just push to the cluster so I can run Julia programs there? 

Re: [julia-users] Re: How to deploy Julia

2015-06-17 Thread Charles Novaes de Santana
Did I hear AstroJulia? :)

Best,

Charles

On 16 June 2015 at 14:38, Daniel Carrera dcarr...@gmail.com wrote:

 I would love to see the paper when it comes out. I cannot use your code
 directly because I need to do a direct NBody rather than a tree code (I am
 modelling planetary systems). But it's nice to see another astronomer using
 Julia.

 Cheers,
 Daniel.


 On 16 June 2015 at 08:28, Ariel Keselman skar...@gmail.com wrote:

 FYI just since NBody was mentioned -- I wrote a gravitational NBody tree
 code with parallel shared memory execution. I run it with many millions of
 particles and I'm very pleased with the results. They are comparable (or
 even faster) than some very popular C codes (e.g. Gadget2). I'm working on
 a paper currently, will publish a package once everything is cleaned up,
 documented, etc.




 --
 When an engineer says that something can't be done, it's a code phrase
 that means it's not fun to do.




-- 
Um axé! :)

--
Charles Novaes de Santana, PhD
http://www.imedea.uib-csic.es/~charles


Re: [julia-users] Re: How to deploy Julia

2015-06-17 Thread Kyle Barbary
... and we're always looking for new contributors to JuliaAstro
http://juliaastro.github.io/ for commonly-used functionality!

- Kyle

On Wed, Jun 17, 2015 at 4:56 AM, Tim Holy tim.h...@gmail.com wrote:

 On Wednesday, June 17, 2015 12:00:02 PM Charles Novaes de Santana wrote:
  Did I hear AstroJulia? :)

 There's already the reverse:
 https://github.com/JuliaAstro

 
  Best,
 
  Charles
 
  On 16 June 2015 at 14:38, Daniel Carrera dcarr...@gmail.com wrote:
   I would love to see the paper when it comes out. I cannot use your code
   directly because I need to do a direct NBody rather than a tree code
 (I am
   modelling planetary systems). But it's nice to see another astronomer
   using
   Julia.
  
   Cheers,
   Daniel.
  
   On 16 June 2015 at 08:28, Ariel Keselman skar...@gmail.com wrote:
   FYI just since NBody was mentioned -- I wrote a gravitational NBody
 tree
   code with parallel shared memory execution. I run it with many
 millions
   of
   particles and I'm very pleased with the results. They are comparable
 (or
   even faster) than some very popular C codes (e.g. Gadget2). I'm
 working
   on
   a paper currently, will publish a package once everything is cleaned
 up,
   documented, etc.
  
   --
   When an engineer says that something can't be done, it's a code phrase
   that means it's not fun to do.




Re: [julia-users] Re: How to deploy Julia

2015-06-16 Thread Daniel Carrera
I would love to see the paper when it comes out. I cannot use your code
directly because I need to do a direct NBody rather than a tree code (I am
modelling planetary systems). But it's nice to see another astronomer using
Julia.

Cheers,
Daniel.


On 16 June 2015 at 08:28, Ariel Keselman skar...@gmail.com wrote:

 FYI just since NBody was mentioned -- I wrote a gravitational NBody tree
 code with parallel shared memory execution. I run it with many millions of
 particles and I'm very pleased with the results. They are comparable (or
 even faster) than some very popular C codes (e.g. Gadget2). I'm working on
 a paper currently, will publish a package once everything is cleaned up,
 documented, etc.




-- 
When an engineer says that something can't be done, it's a code phrase that
means it's not fun to do.


Re: [julia-users] Re: How to deploy Julia

2015-06-16 Thread Kristoffer Carlsson
How did you use shared memory parallelism in Julia?

Re: [julia-users] Re: How to deploy Julia

2015-06-16 Thread Ariel Keselman
I use a SharedArray for the tree and another for the particles. Each 
process then traverses the tree for its share of particles. There is no 
communication overhead.

As long as you can represent you data structures as a bits array this 
method is good




Re: [julia-users] Re: How to deploy Julia

2015-06-15 Thread Stefan Karpinski
On Mon, Jun 15, 2015 at 1:34 AM, Daniel Carrera dcarr...@gmail.com wrote:

 In the end, Julia seems to be competitive with Fortran.


Always wonderful to hear this :-)


[julia-users] Re: How to deploy Julia

2015-06-14 Thread Kristoffer Carlsson
I think this is the issue you want to keep track of regarding static 
compilation: https://github.com/JuliaLang/julia/pull/8745

On Sunday, June 14, 2015 at 4:17:03 PM UTC+2, Daniel Carrera wrote:

 I never cease to be impressed by Julia's speed. I just wrote a test 
 program in Julia and Fortran 90 (it computes the gravitational force 
 between some planets). To my surprise, the Julia version was 7% faster than 
 Fortran.

 So... apparently one can write N-body codes with Julia.

 Suppose I wrote a simulation in Julia. What would be the best way to 
 deploy it to a distant computer cluster where I do not have root access? 
 The cluster runs Linux. Can I get a single stand-alone Julia binary that I 
 can just push to the cluster so I can run Julia programs there? The 
 advantage of a stand-alone binary is that I could include it in a zip file 
 and give it to my colleagues to try my program.

 Let me know if you have any suggestions.

 Cheers,
 Daniel.
 -- 
 When an engineer says that something can't be done, it's a code phrase 
 that means it's not fun to do.
  


[julia-users] Re: How to deploy Julia

2015-06-14 Thread Daniel Høegh
You can build an binary executable with this script: 
https://github.com/JuliaLang/julia/blob/master/contrib/build_executable.jl. It 
compiles the scripts main function into Julia's sysimg. I have used it myself 
to distribute a small program.

[julia-users] Re: How to deploy Julia

2015-06-14 Thread Andreas Lobinger
Hello colleague,

On Sunday, June 14, 2015 at 4:17:03 PM UTC+2, Daniel Carrera wrote:

 I never cease to be impressed by Julia's speed. I just wrote a test 
 program in Julia and Fortran 90 (it computes the gravitational force 
 between some planets). To my surprise, the Julia version was 7% faster than 
 Fortran.

 So... apparently one can write N-body codes with Julia.

 Suppose I wrote a simulation in Julia. What would be the best way to 
 deploy it to a distant computer cluster where I do not have root access? 
 The cluster runs Linux. Can I get a single stand-alone Julia binary that I 
 can just push to the cluster so I can run Julia programs there? The 
 advantage of a stand-alone binary is that I could include it in a zip file 
 and give it to my colleagues to try my program.

 Let me know if you have any suggestions.


as julia can be built from the source without root access and installs in a 
local directory, you could technically just package that folder.




[julia-users] Re: How to deploy Julia

2015-06-14 Thread Daniel Carrera
Thanks!

On Sunday, 14 June 2015 16:31:50 UTC+2, Kristoffer Carlsson wrote:

 I think this is the issue you want to keep track of regarding static 
 compilation: https://github.com/JuliaLang/julia/pull/8745

 On Sunday, June 14, 2015 at 4:17:03 PM UTC+2, Daniel Carrera wrote:

 I never cease to be impressed by Julia's speed. I just wrote a test 
 program in Julia and Fortran 90 (it computes the gravitational force 
 between some planets). To my surprise, the Julia version was 7% faster than 
 Fortran.

 So... apparently one can write N-body codes with Julia.

 Suppose I wrote a simulation in Julia. What would be the best way to 
 deploy it to a distant computer cluster where I do not have root access? 
 The cluster runs Linux. Can I get a single stand-alone Julia binary that I 
 can just push to the cluster so I can run Julia programs there? The 
 advantage of a stand-alone binary is that I could include it in a zip file 
 and give it to my colleagues to try my program.

 Let me know if you have any suggestions.

 Cheers,
 Daniel.
 -- 
 When an engineer says that something can't be done, it's a code phrase 
 that means it's not fun to do.
  


[julia-users] Re: How to deploy Julia

2015-06-14 Thread Daniel Carrera
Thanks. I'll give it a try.


On Sunday, 14 June 2015 16:51:40 UTC+2, Daniel Høegh wrote:

 You can build an binary executable with this script: 
 https://github.com/JuliaLang/julia/blob/master/contrib/build_executable.jl. 
 It compiles the scripts main function into Julia's sysimg. I have used it 
 myself to distribute a small program.



[julia-users] Re: How to deploy Julia

2015-06-14 Thread Daniel Carrera
Hi David,

On Monday, 15 June 2015 00:30:40 UTC+2, David P. Sanders wrote:

 Out of interest, does your code use arrays (for positions if the particles 
 etc?) If so, does it use standard Julia arrays? 

 David



Yes, I use standard Julia arrays. To get Fortran-like performance I have to 
code carefully to ensure sequential memory access and to avoid garbage 
collection. My main data structure is a 7xN matrix, where N is the number 
of particles and each column contains everything I need for one particle 
(x,y,z position, u,v,w velocity, mass).

When I rewrote my program to avoid memory allocation and garbage collection 
I saw a 35% speed improvement. This optimized version is about 40% faster 
than the unoptimized Fortran version. But if I add aggressive optimization 
flags, the Fortran program becomes 40% faster.

In the end, Julia seems to be competitive with Fortran.

Cheers,
Daniel.



[julia-users] Re: How to deploy Julia

2015-06-14 Thread Peter Simon
You can install Julia on that cluster from the gzipped tar 
ball: 
https://julialang.s3.amazonaws.com/bin/linux/x64/0.3/julia-0.3.9-linux-x86_64.tar.gz

into any directory for which you have write access.

--Pete

On Sunday, June 14, 2015 at 7:17:03 AM UTC-7, Daniel Carrera wrote:

 I never cease to be impressed by Julia's speed. I just wrote a test 
 program in Julia and Fortran 90 (it computes the gravitational force 
 between some planets). To my surprise, the Julia version was 7% faster than 
 Fortran.

 So... apparently one can write N-body codes with Julia.

 Suppose I wrote a simulation in Julia. What would be the best way to 
 deploy it to a distant computer cluster where I do not have root access? 
 The cluster runs Linux. Can I get a single stand-alone Julia binary that I 
 can just push to the cluster so I can run Julia programs there? The 
 advantage of a stand-alone binary is that I could include it in a zip file 
 and give it to my colleagues to try my program.

 Let me know if you have any suggestions.

 Cheers,
 Daniel.
 -- 
 When an engineer says that something can't be done, it's a code phrase 
 that means it's not fun to do.