Skip to content

Instantly share code, notes, and snippets.

@tbenst
Created September 29, 2020 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbenst/495998f0b7e1bfbac1c75ac2155ac528 to your computer and use it in GitHub Desktop.
Save tbenst/495998f0b7e1bfbac1c75ac2155ac528 to your computer and use it in GitHub Desktop.
20.09 juila 1.5 (based on old 1.3 derivation)
Test Summary: | Pass Fail Error Broken Total
Overall | 38530970 22 2 352558 38883552
LinearAlgebra/triangular | 36296 36296
LinearAlgebra/qr | 4376 4376
LinearAlgebra/dense | 7876 7876
LinearAlgebra/matmul | 968 1 969
LinearAlgebra/schur | 430 430
LinearAlgebra/special | 3159 3159
LinearAlgebra/eigen | 410 410
LinearAlgebra/bunchkaufman | 5285 5285
LinearAlgebra/svd | 513 513
LinearAlgebra/lapack | 800 800
LinearAlgebra/tridiag | 1350 1350
LinearAlgebra/bidiag | 3493 3493
LinearAlgebra/diagonal | 2573 2573
LinearAlgebra/cholesky | 2388 2388
LinearAlgebra/lu | 1278 1278
LinearAlgebra/symmetric | 2516 2516
LinearAlgebra/generic | 530 530
LinearAlgebra/uniformscaling | 491 491
LinearAlgebra/lq | 3005 3005
LinearAlgebra/hessenberg | 403 403
LinearAlgebra/blas | 674 674
LinearAlgebra/adjtrans | 313 313
LinearAlgebra/pinv | 288 288
LinearAlgebra/givens | 1840 1840
LinearAlgebra/structuredbroadcast | 645 645
LinearAlgebra/addmul | 4392 4392
LinearAlgebra/ldlt | 4 4
ambiguous | 81 2 83
compiler/inference | 766 1 767
compiler/validation | 26 26
compiler/ssair | 23 23
compiler/irpasses | 16 16
compiler/codegen | 112 112
compiler/inline | 32 1 33
compiler/contextual | 6 6
subarray | 318295 318295
strings/basic | 87397 87397
strings/search | 620 620
strings/util | 454 454
strings/io | 12751 12751
strings/types | 2302691 2302691
unicode/utf8 | 19 19
core | 8445004 3 8445007
worlds | 65 65
keywordargs | 140 140
numbers | 1578524 1578524
subtype | 337616 10 337626
char | 1529 1529
triplequote | 29 29
intrinsics | 47 47
dict | 144370 144370
hashing | 19452 19452
iobuffer | 204 204
staged | 64 64
offsetarray | 399 399
arrayops | 1954 2 1956
tuple | 566 566
reduce | 8499 8499
reducedim | 783 783
abstractarray | 56214 24795 81009
intfuncs | 5207 5207
simdloop | 249 249
vecelement | 678 678
rational | 98606 1 98607
bitarray | 914684 914684
copy | 532 532
math | 1519678 1519678
fastmath | 943 943
functional | 95 95
iterators | 10065 10065
operators | 12939 12939
ordering | 35 35
path | 355 12 367
ccall | 5315 5315
parse | 16094 16094
loading | 129316 129316
gmp | 2186 2186
sorting | 9225 9225
spawn | 175 4 179
backtrace | No tests
exceptions | 69 69
file | 1030 1 1031
read | 3093 3093
version | 2448 2448
namedtuple | 190 1 191
mpfr | 955 955
broadcast | 457 457
complex | 8406 5 8411
floatapprox | 49 49
reflection | 395 395
regex | 92 92
float16 | 130 130
combinatorics | 170 170
sysinfo | 2 2
env | 148 148
rounding | 112720 112720
ranges | 12109636 327691 12437327
mod2pi | 80 80
euler | 12 12
show | 1419 6 1425
client | 3 3
errorshow | 205 205
sets | 3481 1 3482
goto | 19 19
llvmcall | 15 15
llvmcall2 | 7 7
ryu | 31206 31206
some | 64 64
meta | 55 55
stacktraces | 48 48
docs | 215 215
misc | 1281132 1281132
enums | 95 95
cmdlineargs | No tests
int | 524664 524664
interpreter | 3 3
checked | 1219 1219
bitset | 192 192
floatfuncs | 152 152
boundscheck | No tests
error | 31 31
cartesian | 22 22
osutils | 42 42
channels | 231 231
iostream | 34 34
secretbuffer | 27 27
specificity | 175 175
reinterpretarray | 131 131
syntax | 1238 1 1239
logging | 213 213
missing | 467 1 468
asyncmap | 292 292
atexit | 40 40
SparseArrays/higherorderfns | 7096 1 7097
SparseArrays/sparse | 3433 3433
SparseArrays/sparsevector | 10265 10265
Pkg/resolve | 182 182
Dates/accessors | 7723858 7723858
Dates/adjusters | 3147 3147
Dates/query | 1004 1004
Dates/periods | 702 702
Dates/ranges | 349123 349123
Dates/rounding | 296 296
Dates/types | 223 223
Dates/io | 306 18 324
Dates/arithmetic | 325 325
Dates/conversions | 160 160
Base64 | 2016 2016
CRC32c | 664 664
DelimitedFiles | 89 89
Distributed | No tests
FileWatching | 506 506
Future | No tests
InteractiveUtils | 133 133
Libdl | 86 1 87
Logging | 39 39
Markdown | 246 246
Mmap | 137 137
Printf | 757 757
Profile | 21 21
REPL | 1108 1 5 1114
Random | 203254 203254
SHA | 1 1
Serialization | 119 119
Statistics | 748 748
SuiteSparse | 850 850
Test | 322 1 2 14 339
UUIDs | 22 22
Unicode | 752 752
precompile | 107 107
SharedArrays | 114 114
threads | 1 1
stress | 118 118
FAILURE
The global RNG seed was 0xa27de52713e40401c529cca57a65ef2c.
Error in testset LinearAlgebra/matmul:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/LinearAlgebra/test/matmul.jl:155
Expression: mul!(C, vf, transpose(vf), 2, 3) == (2vf) * vf' .+ 3C0
Evaluated: [4.163887825408556 4.8798850106815195 8.799858892477909; 5.349598147173264 10.148411854919564 12.487078305470845; 7.139767400167415 14.242515946980447 20.169542739597755] == [4.163887825408556 4.8798850106815195 8.799858892477909; 5.349598147173264 10.148411854919564 12.487078305470845; 7.139767400167415 14.242515946980447 20.169542739597752]
Error in testset file:
Test Failed at /build/source/test/file.jl:70
Expression: dirname(t) == d
Evaluated: "/build" == "/build/jl_0IK9WT"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:10
Expression: sprint(show, Dates.Date(1, 1, 1)) == "Dates.Date(\"0001-01-01\")"
Evaluated: "Date(\"0001-01-01\")" == "Dates.Date(\"0001-01-01\")"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:19
Expression: sprint(show, Dates.DateTime(2000, 1, 1, 0, 0, 0, 1)) == "Dates.DateTime(\"2000-01-01T00:00:00.001\")"
Evaluated: "DateTime(\"2000-01-01T00:00:00.001\")" == "Dates.DateTime(\"2000-01-01T00:00:00.001\")"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:41
Expression: sprint(show, t) == shown
Evaluated: "Time(0)" == "Dates.Time(0)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:42
Expression: repr(t) == shown
Evaluated: "Time(0)" == "Dates.Time(0)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:41
Expression: sprint(show, t) == shown
Evaluated: "Time(0, 1)" == "Dates.Time(0, 1)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:42
Expression: repr(t) == shown
Evaluated: "Time(0, 1)" == "Dates.Time(0, 1)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:41
Expression: sprint(show, t) == shown
Evaluated: "Time(0, 1, 2)" == "Dates.Time(0, 1, 2)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:42
Expression: repr(t) == shown
Evaluated: "Time(0, 1, 2)" == "Dates.Time(0, 1, 2)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:41
Expression: sprint(show, t) == shown
Evaluated: "Time(0, 1, 2, 3)" == "Dates.Time(0, 1, 2, 3)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:42
Expression: repr(t) == shown
Evaluated: "Time(0, 1, 2, 3)" == "Dates.Time(0, 1, 2, 3)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:41
Expression: sprint(show, t) == shown
Evaluated: "Time(0, 1, 2, 3, 4)" == "Dates.Time(0, 1, 2, 3, 4)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:42
Expression: repr(t) == shown
Evaluated: "Time(0, 1, 2, 3, 4)" == "Dates.Time(0, 1, 2, 3, 4)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:41
Expression: sprint(show, t) == shown
Evaluated: "Time(0, 1, 2, 3, 4, 5)" == "Dates.Time(0, 1, 2, 3, 4, 5)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:42
Expression: repr(t) == shown
Evaluated: "Time(0, 1, 2, 3, 4, 5)" == "Dates.Time(0, 1, 2, 3, 4, 5)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:41
Expression: sprint(show, t) == shown
Evaluated: "Time(0, 0, 0, 0, 0, 1)" == "Dates.Time(0, 0, 0, 0, 0, 1)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:42
Expression: repr(t) == shown
Evaluated: "Time(0, 0, 0, 0, 0, 1)" == "Dates.Time(0, 0, 0, 0, 0, 1)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:41
Expression: sprint(show, t) == shown
Evaluated: "Time(0, 0, 0, 1)" == "Dates.Time(0, 0, 0, 1)"
Error in testset Dates/io:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Dates/test/io.jl:42
Expression: repr(t) == shown
Evaluated: "Time(0, 0, 0, 1)" == "Dates.Time(0, 0, 0, 1)"
Error in testset REPL:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/REPL/test/replcompletions.jl:113
Expression: count(isequal("REPL"), c) == 1
Evaluated: 2 == 1
Error in testset Test:
Test Failed at /build/source/usr/share/julia/stdlib/v1.5/Test/test/runtests.jl:791
Expression: length(fails) == 2
Evaluated: 0 == 2
Error in testset Test:
Error During Test at /build/source/usr/share/julia/stdlib/v1.5/Test/test/runtests.jl:792
Test threw exception
Expression: fails[1] isa Test.LogTestFailure
BoundsError: attempt to access 0-element Array{Any,1} at index [1]
Stacktrace:
[1] getindex(::Array{Any,1}, ::Int64) at ./array.jl:809
[2] top-level scope at /build/source/usr/share/julia/stdlib/v1.5/Test/test/runtests.jl:792
[3] top-level scope at /build/source/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
[4] top-level scope at /build/source/usr/share/julia/stdlib/v1.5/Test/test/runtests.jl:781
Error in testset Test:
Error During Test at /build/source/usr/share/julia/stdlib/v1.5/Test/test/runtests.jl:793
Test threw exception
Expression: fails[2] isa Test.LogTestFailure
BoundsError: attempt to access 0-element Array{Any,1} at index [2]
Stacktrace:
[1] getindex(::Array{Any,1}, ::Int64) at ./array.jl:809
[2] top-level scope at /build/source/usr/share/julia/stdlib/v1.5/Test/test/runtests.jl:793
[3] top-level scope at /build/source/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
[4] top-level scope at /build/source/usr/share/julia/stdlib/v1.5/Test/test/runtests.jl:781
ERROR: LoadError: Test run finished with errors
{pkgs, stdenv, ...}:
with pkgs;
let
d = version: "v${lib.concatStringsSep "." (lib.take 2 (lib.splitString "." version))}";
extraLibs = [
# IJulia.jl
mbedtls
zeromq
# ImageMagick.jl
imagemagickBig
# HDF5.jl
hdf5
cmake
# Cairo.jl
cairo
gettext
pango.out
glib.out
# Gtk.jl
gtk3
gdk_pixbuf
# GZip.jl # Required by DataFrames.jl
gzip
zlib
# GR.jl # Runs even without Xrender and Xext, but cannot save files, so those are required
xorg.libXt
xorg.libX11
xorg.libXrender
xorg.libXext
glfw
freetype
# Flux.jl
cudatoolkit
linuxPackages.nvidia_x11
git gitRepo gnupg autoconf curl
procps gnumake utillinux m4 gperf unzip
libGL libGLU
xorg.libXi xorg.libXmu freeglut
xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib
ncurses5 stdenv.cc binutils
# Arpack.jl
arpack
gfortran.cc
# (pkgs.runCommand "openblas64_" {} ''
# mkdir -p "$out"/lib/
# ln -s ${openblasCompat}/lib/libopenblas.so "$out"/lib/libopenblas64_.so.0
# '')
];
in
stdenv.mkDerivation rec {
name = "julia-env";
version = julia.version;
nativeBuildInputs = [ makeWrapper cacert git pkgconfig which ];
buildInputs = [
julia
/* jupyterEnv # my custom jupyter */
] ++ extraLibs;
phases = [ "installPhase" ];
installPhase = ''
export CUDA_PATH="${cudatoolkit}"
export LD_LIBRARY_PATH=${lib.makeLibraryPath extraLibs}
# pushd $JULIA_PKGDIR/${d version}
makeWrapper ${julia}/bin/julia $out/bin/julia \
--prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" \
--prefix LD_LIBRARY_PATH ":" "${linuxPackages.nvidia_x11}/lib" \
--set CUDA_PATH "${cudatoolkit}" \
--set JULIA_PKGDIR $JULIA_PKGDIR
# --set JULIA_LOAD_PATH $JULIA_PKGDIR/${d version}
'';
}
{ stdenv, fetchurl, fetchzip, fetchFromGitHub
# build tools
, gfortran, m4, makeWrapper, patchelf, perl, which, python2
, cmake
# libjulia dependencies
, libunwind, readline, utf8proc, zlib
# standard library dependencies
, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2
# linear algebra
, blas, lapack, arpack
}:
assert (!blas.isILP64) && (!lapack.isILP64);
with stdenv.lib;
let
majorVersion = "1";
minorVersion = "5";
maintenanceVersion = "2";
src_sha256 = "0g24v1clkcj1vnw16jxx6rav4hqaiag0nvd6iyvgc2c7l9k59g7g";
version = "${majorVersion}.${minorVersion}.${maintenanceVersion}";
in
stdenv.mkDerivation rec {
pname = "julia";
inherit version;
src = fetchzip {
url = "https://github.com/JuliaLang/julia/releases/download/v${majorVersion}.${minorVersion}.${maintenanceVersion}/julia-${majorVersion}.${minorVersion}.${maintenanceVersion}-full.tar.gz";
sha256 = src_sha256;
};
prePatch = ''
export PATH=$PATH:${cmake}/bin
'';
patches = [
./use-system-utf8proc-julia-1.3.patch
# Julia recompiles a precompiled file if the mtime stored *in* the
# .ji file differs from the mtime of the .ji file. This
# doesn't work in Nix because Nix changes the mtime of files in
# the Nix store to 1. So patch Julia to accept mtimes of 1.
./allow_nix_mtime.patch
];
postPatch = ''
patchShebangs . contrib
for i in backtrace cmdlineargs; do
mv test/$i.jl{,.off}
touch test/$i.jl
done
rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl
rm stdlib/Distributed/test/runtests.jl && touch stdlib/Distributed/test/runtests.jl
sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl
sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl
'';
buildInputs = [
arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr
pcre2.dev blas lapack openlibm openspecfun readline utf8proc
zlib
]
++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices]
;
nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ];
makeFlags =
let
arch = head (splitString "-" stdenv.system);
march = { x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; i686 = "pentium4"; }.${arch}
or (throw "unsupported architecture: ${arch}");
# Julia requires Pentium 4 (SSE2) or better
cpuTarget = { x86_64 = "x86-64"; i686 = "pentium4"; }.${arch}
or (throw "unsupported architecture: ${arch}");
# Julia applies a lot of patches to its dependencies, so for now do not use the system LLVM
# https://github.com/JuliaLang/julia/tree/master/deps/patches
in [
"ARCH=${arch}"
"MARCH=${march}"
"JULIA_CPU_TARGET=${cpuTarget}"
"PREFIX=$(out)"
"prefix=$(out)"
"SHELL=${stdenv.shell}"
"USE_SYSTEM_BLAS=1"
"USE_BLAS64=${if blas.isILP64 then "1" else "0"}"
"USE_SYSTEM_LAPACK=1"
"USE_SYSTEM_ARPACK=1"
"USE_SYSTEM_FFTW=1"
"USE_SYSTEM_GMP=1"
"USE_SYSTEM_LIBGIT2=1"
"USE_SYSTEM_LIBUNWIND=1"
"USE_SYSTEM_MPFR=1"
"USE_SYSTEM_OPENLIBM=1"
"USE_SYSTEM_OPENSPECFUN=1"
"USE_SYSTEM_PATCHELF=1"
"USE_SYSTEM_PCRE=1"
"PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config"
"PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h"
"USE_SYSTEM_READLINE=1"
"USE_SYSTEM_UTF8PROC=1"
"USE_SYSTEM_ZLIB=1"
"USE_BINARYBUILDER=0"
];
LD_LIBRARY_PATH = makeLibraryPath [
arpack fftw fftwSinglePrec gmp libgit2 mpfr blas openlibm
openspecfun pcre2 lapack
];
enableParallelBuilding = true;
doCheck = !stdenv.isDarwin;
checkTarget = "testall";
# Julia's tests require read/write access to $HOME
preCheck = ''
export HOME="$NIX_BUILD_TOP"
'';
preBuild = ''
sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile
sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
'';
postInstall = ''
# Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
# as using a wrapper with LD_LIBRARY_PATH causes segmentation
# faults when program returns an error:
# $ julia -e 'throw(Error())'
find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do
if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then
ln -sv $lib $out/lib/julia/$(basename $lib)
fi
done
'';
passthru = {
inherit majorVersion minorVersion maintenanceVersion;
site = "share/julia/site/v${majorVersion}.${minorVersion}";
};
meta = {
description = "High-level performance-oriented dynamical language for technical computing";
homepage = "https://julialang.org/";
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ raskin rob garrison ];
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
broken = stdenv.isi686;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment