Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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) |
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
addprocs(1) | |
@everywhere function echo_on_sock(s, N) | |
while true | |
try | |
read(s, Float64, (N,)) | |
write(s, fill(Float64(myid()), N)) | |
catch e | |
#println("closed by remote $e") |
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
addprocs(1) | |
const rr1=RemoteRef() | |
const rr2=RemoteRef(2) | |
@everywhere function do_sendrecv(N, rr1, rr2) | |
myid() == 1 && print("$N : ") | |
if myid() == 1 | |
rr_put = rr2 |
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
#!/usr/bin/env python | |
# License: MIT Open Source | |
# Copyright (c) 2016 Joe Linoff | |
''' | |
The tool runs ssh or scp as a child process with a connected psuedo | |
terminal (pty). | |
It will automatically answer yes to the "Are you sure you want to | |
continue connecting (yes/no)?" if it comes up. |
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
cd /tmp | |
wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz | |
tar zxvf cmake-3.* | |
cd cmake-3.* | |
./bootstrap --prefix=/usr/local | |
make -j$(nproc) | |
make install |
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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Invoke-WebRequest "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.0.0.0p1-Beta/OpenSSH-Win64.zip" -OutFile OpenSSH-Win64.zip | |
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
function Unzip | |
{ | |
param([string]$zipfile, [string]$outpath) | |
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) | |
} | |
Unzip OpenSSH-Win64.zip "C:\Program Files\" |
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
#!/bin/bash | |
julia -e 'using Pkg; Pkg.rm("Elemental"); Pkg.gc(); Pkg.add("Elemental")' | |
script="$JULIA_DEPOT_PATH/packages/Elemental/*/deps/build.jl" | |
sed -i 's:79987d38b04838acf6b6195be1967177521ee908:477e503a7a840cc1a75173552711b980505a0b06:g' $script | |
sed -i 's:-D PYTHON_EXECUTABLE="":-D PYTHON_EXECUTABLE=""\n-D EL_DISABLE_PARMETIS=ON:g' $script | |
julia -e 'using Pkg; Pkg.build("Elemental")' | |
sed -i 's:\n-D EL_DISABLE_PARMETIS=ON::g' $script | |
sed -i 's:477e503a7a840cc1a75173552711b980505a0b06:79987d38b04838acf6b6195be1967177521ee908:g' $script |
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
#!/usr/bin/sudo bash | |
mkdir sysbench && cd sysbench | |
# install docker | |
if ! which docker; then | |
apt-get install docker.io hardinfo | |
fi | |
if ! which nvidia-container-cli; then | |
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) |
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
#!/usr/bin/env julia | |
using Pkg | |
pkg"add PackageCompiler Plots StatsPlots PyPlot" | |
using PackageCompiler | |
snoop = tempname() | |
open(snoop, "w") do fid | |
println(fid, "using Plots") | |
println(fid, "p=plot(rand(5), rand(5))") |
OlderNewer