Skip to content

Instantly share code, notes, and snippets.

@cwsmith
cwsmith / slide.cpp
Last active November 29, 2018 13:05
#include <iostream>
#include <chrono>
#include <cassert>
using namespace std;
// Don't change this function!
void slide_ref(const int n, double* in, double* out) {
auto start = chrono::steady_clock::now();
out[0] = out[1] = out[n-2] = out[n-1] = 0;
@cwsmith
cwsmith / airfoil.cpp
Last active May 8, 2018 12:06
gmodel for an airfoil
#include <gmodel.hpp>
#include <minidiff.hpp>
#include <vector>
#include <cassert>
#include <iostream>
#include <fstream>
#include <sstream>
bool readFileCoords(std::string filePath, std::vector<float>& buffer) {
std::ifstream file(filePath, std::ios::binary);
@cwsmith
cwsmith / depth affinity output
Created August 25, 2016 11:53
cray aprun -cc depth affinity settings
OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
OMP: Info #205: KMP_AFFINITY: Invalid cpuid info - decoding legacy APIC ids.
OMP: Info #149: KMP_AFFINITY: Affinity capable, using global cpuid info
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
OMP: Info #156: KMP_AFFINITY: 16 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #159: KMP_AFFINITY: 1 packages x 16 cores/pkg x 1 threads/core (16 total cores)
OMP: Info #242: KMP_AFFINITY: pid 74276 thread 0 bound to OS proc set {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
OMP: Info #242: KMP_AFFINITY: pid 74276 thread 1 bound to OS proc set {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
OMP: Info #242: KMP_AFFINITY: pid 74276 thread 2 bound to OS proc set {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
@cwsmith
cwsmith / cpu affinity output
Last active August 25, 2016 11:54
cray aprun -cc cpu affinity settings
OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
OMP: Info #205: KMP_AFFINITY: Invalid cpuid info - decoding legacy APIC ids.
OMP: Info #149: KMP_AFFINITY: Affinity capable, using global cpuid info
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0}
OMP: Info #156: KMP_AFFINITY: 1 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #159: KMP_AFFINITY: 1 packages x 1 cores/pkg x 1 threads/core (1 total cores)
OMP: Info #242: KMP_AFFINITY: pid 117237 thread 0 bound to OS proc set {0}
OMP: Info #242: KMP_AFFINITY: pid 117237 thread 1 bound to OS proc set {0}
OMP: Info #242: KMP_AFFINITY: pid 117237 thread 2 bound to OS proc set {0}
@cwsmith
cwsmith / Makefile.jessie.in
Created December 11, 2015 13:05
parmetis 3.2 make configuration
# Which compiler to use
CC = mpicc
# What optimization level to use
#OPTFLAGS = -g
OPTFLAGS = -O2 -g -fno-omit-frame-pointer
# Include directories for the compiler
INCDIR =
EXE =
LIB = .a
OBJ = .o
MAKE = gmake
AR = ar
ARFLAGS = -ruv
CAT = cat
CCS = cc
CCP = cc
@cwsmith
cwsmith / Makefile.in.patch
Last active October 28, 2015 13:01
parmetis makefile patch
*** Makefile.in 2011-04-05 15:18:53.000000000 -0700
--- /global/homes/c/cwsmith/ace3pDevelop/deps/ParMetis-3.2.0/Makefile.in 2015-10-23 15:28:35.297685000 -0700
***************
*** 1,6 ****
# Which compiler to use
! CC = mpicc
# What optimization level to use
@cwsmith
cwsmith / Makefile.jessie.patch
Last active December 11, 2015 14:40
patch for SuperLU_Dist_3.2 makefile on NERSC ediso
*** ../SuperLU_DIST_3.2/Makefile Wed Oct 24 15:46:19 2012
--- Makefile Thu Dec 10 11:13:54 2015
***************
*** 32,38 ****
( cd CBLAS; $(MAKE) )
superlulib:
! ( cd SRC; $(MAKE) )
cleanlib:
@cwsmith
cwsmith / make.xc30.patch
Last active October 22, 2015 18:31
patch for SuperLU_Dist_4.2 makefile on NERSC edison
*** MAKE_INC/make.xc30 2015-09-25 11:35:30.000000000 -0700
--- make.inc 2015-10-22 11:30:20.191178000 -0700
***************
*** 23,43 ****
#
# The name of the libraries to be created/linked to
#
! DSuperLUroot = ${HOME}/Release_Codes/SuperLU_DIST_4.2
! DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist_4.2.a
#
@cwsmith
cwsmith / Makefile.inc.410.jessie.patch
Last active December 11, 2015 14:25
patch for MUMPS 5.10.0 Makefile.G95.PAR for NERSC edison
*** Make.inc/Makefile.G95.PAR Tue May 10 08:56:32 2011
--- Makefile.inc Fri Dec 11 09:22:50 2015
***************
*** 34,41 ****
IPORD = -I$(topdir)/PORD/include/
LPORD = -L$(LPORDDIR) -lpord
! #LMETISDIR = /local/metis/
! #IMETIS = # Should be provided if you use parmetis