Skip to content

Instantly share code, notes, and snippets.

View brockpalen's full-sized avatar

Brock Palen brockpalen

View GitHub Profile
#run blender in batch, take all settings from those saved in the .blend file
#http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Command_Line
blender -b blender.blend -o //imagename -F PNG -x 1 -f 1
@brockpalen
brockpalen / json-stats-wrapper.py
Last active March 29, 2017 20:40
Lustre Logstash Files
#!/usr/bin/python
#Brock Palen
# brockp@umich.edu
#
'''
Takes data in the form of:
metric number
@brockpalen
brockpalen / qselect-qdel.sh
Last active January 3, 2017 17:25
qselect-samples
#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 / matlab-gpu-ex1.m
Last active January 4, 2016 04:59
This example shows simple use of gpuArray() to use built in GPU functions on MATLAB
%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 / theano-gpu
Created January 20, 2014 20:15
Theano on GPU's
#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 / setup-xsede-gsi.sh
Created November 7, 2015 20:16
Globus Toolkit 6.0 and XSEDE GSI integration
#download and install Globus toolkit, get version 6.0
tar -xzf globus_toolkit-6.0.1443479657.tar.gz
cd globus_toolkit-6.0.1443479657
#enable GSI and myproxy for myproxy-login
./configure --prefix=<INSTALL_PREFIX> --enable-myproxy
make -j 12
make install
#setup location for XSEDE Certificates
@brockpalen
brockpalen / logstash-gridftp.conf
Last active August 29, 2015 14:22
logstash GridFTP config
#Brock Palen brockp@umich.edu
# 5/2015
# GridFTP config for Logstash
input {
#track the globus gridftp transfer logs
file {
path => [ "/var/log/gridftp-go.log" ]
sincedb_path => "/var/run/logstash-gridftp.sincedb"
@brockpalen
brockpalen / blas_speed.cpp
Created April 1, 2015 15:07
Simple BLAS 1, 2, and 3 benchmark code
#include <iostream>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
//#define DIM 20000
/*****
Total size used should be DIM*DIM*sizeof(double)
compute the matrix multiply dgemm
@brockpalen
brockpalen / mpiLibConf.m
Created February 3, 2015 01:51
mpiLibConf.m
function [lib, extras] = mpiLibConf
%MATLAB MPI Library overloading for Infiniband and Ethernet Networks
%
%USAGE
% place in ~/matlab/mpiLibConf.m
% Update to point to your MPICH / Intel MPI etc location
% mvapich has two extra libraries libmpl.so and libopa.so
% use # ldd /home/software/rhel6/mvapich2/1.8/lib/libmpich.so
% Any libraries from the mpich/mvapich install location need to be included in extras
@brockpalen
brockpalen / benchmarkpct.m
Created January 10, 2015 17:46
MATLAB Parallel Computing Toolbox Demo
function benchmarkpct(ncpus)
sched= findResource('scheduler', 'type', 'mpiexec') ;
set(sched, 'EnvironmentSetMethod', 'setenv')
set(sched, 'MpiexecFileName', '/home/software/rhel6/mpiexec/bin/mpiexec')
sched
%get current mpi library
mpiLibConf