This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Base.FS | |
# Below constants are vaid for Ubuntu. May be different for OSX | |
const PROT_READ = 0x01 | |
const PROT_WRITE = 0x02 | |
const MAP_SHARED = 0x01 | |
type ShmemVar | |
v_name::Symbol | |
v_type::Type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==9578== Invalid write of size 8 | |
==9578== at 0xD54A1AD: dlasq2_ (in /home/amitm/Work/julia/julia/usr/lib/libopenblas.so) | |
==9578== by 0xD549A79: dlasq1_ (in /home/amitm/Work/julia/julia/usr/lib/libopenblas.so) | |
==9578== by 0xD52AD17: dbdsqr_ (in /home/amitm/Work/julia/julia/usr/lib/libopenblas.so) | |
==9578== by 0xD549018: dlasdq_ (in /home/amitm/Work/julia/julia/usr/lib/libopenblas.so) | |
==9578== by 0xD527B46: dbdsdc_ (in /home/amitm/Work/julia/julia/usr/lib/libopenblas.so) | |
==9578== by 0xD3ED52A: zgesdd_ (in /home/amitm/Work/julia/julia/usr/lib/libopenblas.so) | |
==9578== by 0x40B3726: ??? | |
==9578== by 0x40B2DBA: ??? | |
==9578== by 0x40B287A: ??? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Constants valid on Linux | |
const PROT_READ = 0x01 | |
const PROT_WRITE = 0x02 | |
const MAP_SHARED = 0x01 | |
@linux_only const MAP_ANONYMOUS = 0x20 | |
@osx_only const MAP_ANONYMOUS = 0x1000 | |
function anon_mmap(t::Type, n::Int) | |
x = ccall(:mmap, Ptr{Void}, (Ptr{Void}, Csize_t, Cint, Cint, Cint, FileOffset), C_NULL, sizeof(t) * n, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ | |
_ _ _(_)_ | A fresh approach to technical computing | |
(_) | (_) (_) | Documentation: http://docs.julialang.org | |
_ _ _| |_ __ _ | Type "help()" to list help topics | |
| | | | | | |/ _` | | | |
| | |_| | | | (_| | | Version 0.3.0-prerelease+1000 (2014-01-15 06:28 UTC) | |
_/ |\__'_|_|_|\__'_| | Commit 714fa07 (0 days old master) | |
|__/ | x86_64-linux-gnu | |
julia> function file_io(secs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
np = 8 | |
nt = 10000 | |
pids = addprocs(np) | |
using SyncObjects | |
ts = tspace() | |
#Launch processes on each worker that simulates CPU intensive / blocking stuff for a random amount of time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const A = randn(1000, 1000); | |
const numx = 10_000; | |
const v = randn(1000, numx); | |
addprocs(4) | |
@sync begin | |
let A2=A, v2=v, numx2=numx | |
for p in workers() | |
@spawnat p global const A = A2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type DArray{T,N,A} <: AbstractArray{T,N} | |
dims::NTuple{N,Int} | |
chunks::Array{RemoteRef,N} | |
pmap::Array{Int,N} # pmap[i]==p ⇒ processor p has piece i | |
indexes::Array{NTuple{N,UnitRange{Int}},N} # indexes held by piece i | |
cuts::Vector{Vector{Int}} # cuts[d][i] = first index of chunk i in dimension d | |
function DArray(dims, chunks, pmap, indexes, cuts) | |
# check invariants | |
if size(chunks) != size(indexes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type DArray{T,N,A} <: AbstractArray{T,N} | |
dims::NTuple{N,Int} | |
chunks::Array{RemoteRef,N} | |
pmap::Array{Int,N} # pmap[i]==p ⇒ processor p has piece i | |
indexes::Array{NTuple{N,UnitRange{Int}},N} # indexes held by piece i | |
cuts::Vector{Vector{Int}} # cuts[d][i] = first index of chunk i in dimension d | |
function DArray(dims, chunks, pmap, indexes, cuts) | |
# check invariants | |
if size(chunks) != size(indexes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
travis_fold:start:system_info | |
[0K[33;1mBuild system information[0m | |
Build language: cpp | |
travis_fold:end:system_info | |
[0K | |
travis_fold:start:git.checkout | |
[0Ktravis_time:start:21ded7df |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import MPI | |
function do_sendrecv(N) | |
comm = MPI.COMM_WORLD | |
MPI.Barrier(comm) | |
rank = MPI.Comm_rank(comm) | |
size = MPI.Comm_size(comm) |
OlderNewer