Skip to content

Instantly share code, notes, and snippets.

@tomdeakin
tomdeakin / p3hpc_2022_babelstream_artifact.txt
Last active August 22, 2022 14:57
P3HPC 2020 BabelStream Artifact Description
# Icelake
# Cray OpenMP
module load cdt
module swap craype-broadwell craype-x86-cascadelake
module load cray-mvapich2_noslurm_nogpu
module rm cray-libsci
CC -fopenmp -O3 -DOMP main.cpp omp/OMPStream.cpp -I. -Iomp
OMP_NUM_THREADS=64 OMP_PLACES=cores OMP_PROC_BIND=true ./a.out -s $((2**26))
# Cray OpenMP target
@tomdeakin
tomdeakin / lagrange.c
Last active March 1, 2017 18:01
Evaluate 1D Lagrange polynomial
#pragma omp declare simd uniform(node, order)
inline double lagrange(const int order, const int node, const double x)
{
/* Distance between nodes */
const double offset = 2.0/(double)order;
/*
At the specified node, l(x) = 1, and at all others l(x) = 0
Use the simple form:
\prod_{m, m \neq j} (x - x_m)/(x_j - x_m)