Skip to content

Instantly share code, notes, and snippets.

@cwsmith
cwsmith / misLuby.cc
Created September 19, 2012 13:01
luby mis
#include <algorithm>
#include <limits.h>
#include <time.h>
#include <stdlib.h>
#include <mpi.h>
#include <assert.h>
#include <map>
#include "mis.h"
@cwsmith
cwsmith / misLubyOutput
Created September 19, 2012 13:12
luby mis output
cwsmith@jenga:testMIS$ mpirun -np 4 ./testMIS
|V| = 4
running test_EastWestNet_EastWestAdjacent...
[0] has nbor 3
[0] has nbor 1
DEBUG bsp after [0] sending to 1
DEBUG bsp after [0] sending to 3
DEBUG [0] sending to 3 (3)
DEBUG [0] sending to 1 (1)
[1] has nbor 0
@cwsmith
cwsmith / testMIS.cc
Created September 19, 2012 13:16
luby mis test driver
#include <stdio.h>
#include <set>
#include <vector>
#include "mis.h"
#include "mpi.h"
using std::set;
using std::vector;
/**
@cwsmith
cwsmith / macroExample.c
Created October 6, 2012 19:05
macro calling fn
mis.h
==================
#define PARMA_MAJOR_VERSION 1
#define PARMA_MINOR_VERSION 0
#define PARMA_PATCH_VERSION 170:177M
void mis_init(int randNumSeed, const char* maj, const char* min, const char* patch);
//#define misInit(seed) printf("misInit: %d\n", seed)
#define misInit(seed) mis_init(seed, PARMA_MAJOR_VERSION, PARMA_MINOR_VERSION, PARMA_PATCH_VERSION)
@cwsmith
cwsmith / scorec_functions.sh
Last active October 12, 2015 06:07
Bash functions for installing SCOREC software
#!/bin/bash
#This is a build script for the SCOREC software stack.
#users should first modify the CC, CXX, and FC variables below:
#set the C and C++ compilers to point at MPI compiler wrappers
export CC="not set"
export CXX="not set"
export FC="not set"
PREFIX="not set"
DEBUG='-g '
BUILD_DIR="not set"
@cwsmith
cwsmith / build
Last active December 17, 2015 21:59
malloc_stats test code ran on CCNI BGQ with the XL compiler
module load xl
mpicxx mallocStatsTest.cc -o mallocStatsTestXL
@cwsmith
cwsmith / deadlock.c
Last active December 30, 2015 04:19 — forked from ibaned/deadlock.c
/* This program should be run on a single Blue Gene/Q node
* using 5 or more parallel processes and 8 threads per process.
* Run the program with:
* mpirun -np 5 ./deadlock 8
* where 8 specifies number of threads per process.
* It has a high probability of going into a deadlocked state
* (or at least timing out at 5~10 minutes).
* The probability increases as LOOPS is increased. */
#include <mpi.h>
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv) {
int rank, nprocs;
MPI_File file;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
cd /work/02422/cwsmith/phastaShared/phastaGH/buildIntel15/phSolver/compressible \
/opt/apps/intel/15/composer_xe_2015.2.164/bin/intel64/icpc \
-mmic \
-g \
CMakeFiles/phastaC.exe.dir/main.c.o \
-o \
../../bin/phastaC.exe \
-rdynamic \
/opt/apps/intel15/impi/5.0.2.044/mic/lib/libmpicxx.so \
@cwsmith
cwsmith / gist:17394609980363e12c38
Last active August 29, 2015 14:20
5850 node 8 processes test run on two phis, job id 5198658
TACC: Starting up job 5198658
TACC: Starting parallel tasks...
# Command used to run job in: /home1/02422/cwsmith/.slurm/job.5198658.runcmd.QH2ZVF1r
[0] MPI startup(): Multi-threaded optimized library
[0] DAPL startup(): trying to open DAPL provider from I_MPI_DAPL_PROVIDER: ofa-v2-mlx4_0-1u
[1] DAPL startup(): trying to open DAPL provider from I_MPI_DAPL_PROVIDER: ofa-v2-mlx4_0-1u
[2] DAPL startup(): trying to open DAPL provider from I_MPI_DAPL_PROVIDER: ofa-v2-mlx4_0-1u
[3] DAPL startup(): trying to open DAPL provider from I_MPI_DAPL_PROVIDER: ofa-v2-mlx4_0-1u
[4] DAPL startup(): trying to open DAPL provider from I_MPI_DAPL_PROVIDER: ofa-v2-mlx4_0-1u
[5] DAPL startup(): trying to open DAPL provider from I_MPI_DAPL_PROVIDER: ofa-v2-mlx4_0-1u