signal (15): Terminated
while loading /home/tan/.julia/v0.6/AMQPClient/test/test_throughput.jl, in expression starting on line 13
subtype at /data/Work/julia/sources/julia/src/subtype.c:687
exists_subtype at /data/Work/julia/sources/julia/src/subtype.c:867 [inlined]
forall_exists_subtype at /data/Work/julia/sources/julia/src/subtype.c:895
jl_subtype_env at /data/Work/julia/sources/julia/src/subtype.c:948
simple_join at /data/Work/julia/sources/julia/src/subtype.c:261
simple_join at /data/Work/julia/sources/julia/src/subtype.c:247 [inlined]
var_gt at /data/Work/julia/sources/julia/src/subtype.c:396
Julia packages go through a process called compilation on their first use, where the Julia code is compiled to llvm bytecode. The bytecode is cached, and re-used thus making subsequent use faster. Package bundles are special disk volumes that hold Julia packages. They help prepare packages once and use them uniformly across many many containers. They are pre-compiled by a special PkgBuilder
job and are mounted as read only volumes to containers that use them. That ensures that when your code starts to use them they are alerady compiled. They are mounted read-only to ensure that they are not modified inadvertendly by some user code.
Preparing a package bundle involves the exact same steps as installaing and loading a package in the Julia REPL, essentially - Pkg.add(...)
, Pkg.build(...)
, and using ...
.
Let's say you wish to build a package bundle with these packages: JSON and Distributions. And you wish to call your package bundle mypkg
.
- Create a volume for it: `~/.julia/v0.5/JuliaRun/scripts/loc
# context: http://stackoverflow.com/questions/39448808/julia-tcp-server-and-connection | |
# Use fn to process messages from sock. | |
# Loop till sock is open and fn returns true. | |
function processor(fn, sock) | |
proc = true | |
try | |
while proc && ((nb_available(sock) > 0) || isopen(sock)) | |
proc = fn(sock) | |
end |
using Base.Dates | |
const DEFREQ = 250. | |
const DEFGAIN = 200. | |
immutable Record | |
name::AbstractString | |
nsegments::Int | |
nsignals::Int | |
sampfreq::Float64 |
#const ENDPOINT = "tcp://localhost:9875" | |
const ENDPOINT = "ipc:///tmp/testZMQ"; | |
const pid = getpid(); | |
const MSG = "abcdefghijklmnopqrstuvwxyz"; | |
vsz() = parse(Int, split(open(readstring,`ps -p $pid -o vsz`),"\n")[2]); | |
vsz(s) = println(s, vsz()) | |
vsz("Initial VSZ="); | |
using ZMQ |
Packages:
- https://github.com/tanmaykm/Clustering.jl/tree/tanmaykm
- https://github.com/tanmaykm/DistributedDistances.jl
kddcup dataset (clusters network intrusion data)
size: 5,000,000 observations, each with 40 features
import scala.util._ | |
import java.io._ | |
import breeze.linalg._ | |
import breeze.numerics._ | |
import breeze.stats._ | |
import breeze.math._ | |
object PerfBreeze { | |
final val NITER = 5 |
using Elly | |
using HadoopBlocks | |
@everywhere begin | |
#const INP = "hdfs://root@" * string(getipaddr()) * ":9000/twitter_rv.net" | |
#const COLSEP = '\t' | |
const INP = "hdfs://root@" * string(getipaddr()) * ":9000/twitter_small.csv" | |
# const YARNHOST = string(getipaddr() | |
#const INP = "hdfs://tan@localhost:9000/twitter_small.csv" | |
const COLSEP = ',' |
using Images, Color, FixedPointNumbers, ImageView | |
impath = joinpath(Pkg.dir("TestImages"), "images/lena_gray_512.tif") | |
img = imread(impath); | |
mask = copy(img); | |
mask.data[1:end] = 1; | |
marks = falses(size(img.data)); | |
#view(img) | |
#view(mask) |
function buffon_one() | |
mp = rand() | |
phi = (rand() * pi) - pi / 2 | |
xrechts = mp + cos(phi)/2 | |
xlinks = mp - cos(phi)/2 | |
xrechts >= 1 || xlinks <= 0 | |
end | |
function buffon(m) | |
hit = 0 |