Skip to content

Instantly share code, notes, and snippets.

Avatar

Brock Palen brockpalen

View GitHub Profile
View theano-gpu
#Example for Theano 0.6 on CAEN-HPC FluxG
#load modules
module load python/2.7.5 cuda/5.5 theano/0.6
#use device=gpu to let our system autoselect the GPU to use
#use device=cpu to run your code on another system
THEANO_FLAGS='floatX=float32,device=gpu' python script.py
@brockpalen
brockpalen / matlab-gpu-ex1.m
Last active Jan 4, 2016
This example shows simple use of gpuArray() to use built in GPU functions on MATLAB
View matlab-gpu-ex1.m
%Brock Palen brockp@umich.edu 1/2014
%To compare against a single core run:
% hwloc-bind core:0 matlab -r caenfft\(1e7\)
function caenfft(dim)
if ischar(dim)
dim=str2num(dim);
end
@brockpalen
brockpalen / matlab-gpu-ex2.m
Last active Aug 29, 2015
Example of using Matlab with GPUS and doing all computation on the GPU
View matlab-gpu-ex2.m
%Brock Palen brockp@umich.edu 1/2014
%To compare against a single core run:
% hwloc-bind core:0 matlab -r gen\(1e4\) #first core
% hwloc-bind socket:0 matlab -r gen\(1e4\) #first socket all cores
function gen(dim)
if ischar(dim)
dim=str2num(dim);
end
@brockpalen
brockpalen / globus-connect-server.conf
Last active Aug 29, 2015
Globus Connect Server config file, for creating a GridFTP Globus endpoint using University of Michigan CiLogin for OAuth.
View globus-connect-server.conf
;----------------------------------------------------------------------------;
; Globus User Configuration
;----------------------------------------------------------------------------;
; These settings configure how to contact Globus when
; creating or modifying an endpoint.
[Globus]
; Globus user name. If not set, or left at its default, then the
; value of GLOBUS_USER environment variable is used, falling back to
; prompting if it is not present.
@brockpalen
brockpalen / hfss2014
Last active Aug 29, 2015
hfss/2014.0.0 shared memory parallel example PBS script
View hfss2014
#PBS -N jobname
#PBS -A account_flux
#PBS -l qos=flux
#PBS -l walltime=1:00:00,nodes=1:ppn=12,pmem=3800mb
#PBS -q flux
#PBS -V
#brockp@umich.edu
#3/2014
@brockpalen
brockpalen / ssh-tunnel.sh
Last active Aug 29, 2015
Running VNC on the Flux Cluster
View ssh-tunnel.sh
#create an ssh tunnel vis flux-xfer to the machine with our VNC Display.
#this example works for Mac, Linux, and Cygwin
#find your vnchost and display number:
ls -rt ~/.vnc/
# eg: nyx5330.engin.umich.edu:1.log
# eg: nyx5330.engin.umich.edu <== host running vnc
# eg: 1 <== display number
@brockpalen
brockpalen / hydra.sh
Last active Aug 29, 2015
building-hydra
View hydra.sh
#build hydra with PBS support
wget http://www.mpich.org/static/downloads/3.1/hydra-3.1.tar.gz
tar -xzf hydra-3.1.tar.gz
cd hydra-3.1
#configure with needed path to libtroque.so
#<toque install prefix>/lib/libtroque.so
./configure \
--prefix=<install prefix> \
--with-toque=<torque install prefix> \
View qselect-qdel.sh
#delete all my jobs,
# only do this if you have fewer than a few hundred jobs.
qdel $(qselect -u $USER)
#delete all my queued jobs
qdel $(qselect -u $USER -s Q)
#delete all my jobs submiting with the wrong account
qdel $(qselect -u $USER -A wrongaccount)
@brockpalen
brockpalen / build.sh
Last active Aug 29, 2015
Building your own Xsede Single Sign On Service
View build.sh
tar -xjf gt<version>-all-source-installer.tar.bz2
cd gt<version>-all-source-installer
./configure --prefix=/home/brockp/gt5.0.4
make globus-data-management-client
make gsi-myproxy
make install
@brockpalen
brockpalen / gridftp-log
Last active Aug 29, 2015
example gridftp log entry
View gridftp-log
"message" => "[3743] Wed Jul 16 09:34:54 2014 :: Transfer stats: DATE=20140716133454.587582 HOST=flux-xfer1.engin.umich.edu PROG=globus-gridftp-server NL.EVNT=FTP_INFO START=20140716133453.570157 USER=brockp FILE=/tmp/brockp/linux_x64_64_sfx.exe BUFFER=87380 BLOCK=262144 NBYTES=280590752 VOLUME=/ STREAMS=4 STRIPES=1 DEST=[141.212.30.10] TYPE=RETR CODE=226",