Skip to content

Instantly share code, notes, and snippets.

View gentryx's full-sized avatar

Andreas Schäfer gentryx

View GitHub Profile
gentryx_googlemail_com@us-central1-8cpu-30gb-skylake-tesla-v100-hdd:~$ cat test.sh
#!/bin/bash
set
gentryx_googlemail_com@us-central1-8cpu-30gb-skylake-tesla-v100-hdd:~$ mpirun -np 4 ~/test.sh | grep MPI
OMPI_APP_CTX_NUM_PROCS=4
OMPI_COMMAND=test.sh
OMPI_COMM_WORLD_LOCAL_RANK=0
OMPI_COMM_WORLD_LOCAL_SIZE=4
// abstract interface, separate from implementation to evaluate API in isolation
template<typename ELEMENT, typename NODE, typename EDGE>
class MeshInterface
{
public:
void insertNode(int nodeID, const NODE& node) {...}
void insertEdge(int edgeID, int startNodeID, int endNodeID, const EDGE& edge) {...}
void insertElement(int elementID, std::vector<int> edgeIDs, const ELEMENT& elem) {...}
NODE& getNode(int id) {...}
# as root:
neuromancer gentryx # whoami
root
neuromancer gentryx # cat slowecho
#!/bin/bash
# hack to make catching this easier than a short-lived echo
sleep 10
echo $@
neuromancer gentryx # ./slowecho superduper_secret_password
#include <algorithm>
#include <vector>
#include <iostream>
using namespace std;
template <class T>
size_t fast_upper_bound3(const vector<T>& vec, T value)
{
size_t size = vec.size();
gentryx@neuromancer ~/libgeodecomp3/build $ LANG=en hg outgoing
comparing with ssh://hg@bitbucket.org/gentryx/libgeodecomp
searching for changes
changeset: 2152:feaeb0a660c3
user: Andreas Schaefer <gentryx@gmx.de>
date: Tue Jul 14 11:29:47 2015 +0200
summary: run hpx_main on all localities in HPX tests
changeset: 2153:7feb7f04d3ff
user: Andreas Schaefer <gentryx@gmx.de>
gentryx@faui36b ~ $ srun --gres=tesla_k20:1 --exclusive --pty bash
gentryx@faui36i ~ $ cd test
gentryx@faui36i ~/test $ git clone https://github.com/gentryx/opencl_tester.git
Klone nach 'opencl_tester'...
remote: Counting objects: 29, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 29 (delta 0), reused 0 (delta 0), pack-reused 23
Unpacking objects: 100% (29/29), done.
gentryx@faui36i ~/test $ cd opencl_tester/
gentryx@faui36i ~/test/opencl_tester $ mkdir build
!!!!!!!!!!!!!!!!!!!!
! COMPLICATED CODE !
!!!!!!!!!!!!!!!!!!!!
IF ((dima .gt. 0) .and. (dimb .gt. 0)) THEN
#ifdef USE_F90_ALLOCATABLE
#ifdef USE_LOOPS_NOT_DGEMM
CALL GET_HASH_BLOCK(d_a,f_a,dima,
& int_mb(k_a_offset),(h2b_1-1+noab*(h1b_1-1+noab*
& (p6b_1-noab-1+nvab*(p5b_1-noab-1)))))
@gentryx
gentryx / gist:b850efe6c59b66a23f99
Created February 11, 2015 15:09
Autotools Wall of Shame
gentryx@neuromancer /usr/portage $ find /usr/portage/ -iname "*auto*.patch" | grep -E "auto(conf|tools|make|magic)"
/usr/portage/app-arch/xar/files/xar-1.5.2-automagic_acl_and_bzip2.patch
/usr/portage/app-arch/libzpaq/files/0001-Add-autotools-files.patch
/usr/portage/app-arch/zpaq/files/zpaq-4-autotools.patch
/usr/portage/app-arch/rpm/files/rpm-4.11.0-autotools.patch
/usr/portage/app-office/passepartout/files/passepartout-0.7.0-automake-1.13.patch
/usr/portage/sci-astronomy/wcstools/files/wcstools-3.8.3-autotools.patch
/usr/portage/sci-astronomy/esorex/files/esorex-3.10-fix-autotools.patch
/usr/portage/net-wireless/gnuradio/files/gnuradio-3.6.1-automagic-audio.patch
/usr/portage/dev-ml/cairo-ocaml/files/0004-no-automagic.patch
inline void DeleteMatrix(SparseMatrix & A) {
for (local_int_t i = 0; i< A.localNumberOfRows; ++i) {
delete [] A.matrixValues[i];
delete [] A.mtxIndG[i];
delete [] A.mtxIndL[i];
}
if (A.title) delete [] A.title;
if (A.nonzerosInRow) delete [] A.nonzerosInRow;
@gentryx
gentryx / gist:10308947
Created April 9, 2014 20:05
Context prototype for LibGeoDecomp 0.4.0
template<typename CONTEXT>
void kernel(CONTEXT context)
{
typedef typename CONTEXT::Double Double;
Double oneThird = 1.0 / 3.0;
for (; context; ++context) {
Double left = &context[-1].temp();
Double middle = &context[ 0].temp();
Double right = &context[ 1].temp();