This file contains hidden or 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
# execute by running `➜ mpiexec -n $NUM_PROCS julia mpi_pagerank_kernel0.jl` | |
import MPI | |
MPI.Init() | |
###################### | |
# KronGraph500NoPerm # | |
###################### |
This file contains hidden or 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
@everywhere module A | |
immutable Foo{T} | |
x::T | |
end | |
cross(a::Foo, b::Foo) = Foo(a.x * b.x) | |
function reload_cross(a, b) | |
include(joinpath(pwd(), "parallel-reload-bug.jl")) | |
return A.cross(a, b) |
This file contains hidden or 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
# This file is a naive implementation of numbers of the form x + y*i where i^2 = p | |
####################### | |
# GeneralComplex type # | |
####################### | |
immutable GeneralComplex{p,T} <: Number | |
x::T | |
y::T | |
end |
This file contains hidden or 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 ForwardDiff | |
function check_failure_ratio(test_hessf::Function, input::Array, original::Array, max_iter=10e6) | |
bad_versions = 0 | |
for iter = 1:max_iter | |
if maximum(abs(test_hessf(input) - original)) > 1 | |
bad_versions += 1; | |
end | |
end |
This file contains hidden or 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
params{T}(::Type{T}) = T.parameters | |
# Parameterize column types and fields | |
# by utilizing tuples | |
type DataFrame{C<:Tuple, F<:Tuple} | |
columns::C | |
fields::Type{F} | |
function DataFrame(columns::C, fields::Type{F}) | |
nrows = length(first(columns)) | |
equallengths = true |
NewerOlder