Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeff Larkin jefflarkin

View GitHub Profile
@jefflarkin
jefflarkin / printer.cfg
Last active March 29, 2022 11:58
Klipper Config
View printer.cfg
#
# Klipper configuration file for Anycubic i3 MEGA S
#
# This config file contains settings of all printer pins (steppers, sensors) for Anycubic i3 mega S with TMC2208 Drivers with stock plug orientation
# Klipper firmware should be compiled for the atmega2560
#
# Config file includes
# - Original or 2208(2209) rotated by cable drivers
# - Mesh bed leveling: BLtouch (3DTouch sensor from Triangelab)
# - Manual meshed bed leveling (commented out)
View jefflarkin-author-bio.md

Biography

Jeff is a Principal HPC Application Architect in NVIDIA's HPC Software team. He is passionate about the advancement and adoption of parallel programming models for High Performance Computing. He was previously a member of NVIDIA's Developer Technology group, specializing in performance analysis and optimization of high performance computing applications. Jeff is also the chair of the OpenACC technical committee and has worked in both the OpenACC and OpenMP standards bodies. Before joining NVIDIA, Jeff worked in the Cray Supercomputing Center of Excellence, located at Oak Ridge National Laboratory. Jeff holds a B.S. in Computer Science from Furman University and a M.S. in Computer Science from the University of Tennessee, where we has a member of the Innovative Computing Lab. Jeff lives in Knoxville TN with his wife, Carla, and son, Owen.

Headshot

Social Links

@jefflarkin
jefflarkin / nsys_kernel_stats.ipynb
Created January 29, 2020 20:05
NVIDIA Nsight Systems Recipes
View nsys_kernel_stats.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jefflarkin
jefflarkin / use_nvtx.cmake
Last active July 3, 2018 18:51
Simple way to add libnvToolsExt to a cmake project
View use_nvtx.cmake
# This should be added AFTER the FindCUDA macro has been run
IF(USE_NVTX)
IF(HAVE_CUDA)
ADD_DEFINITIONS(-DUSE_NVTX)
LINK_DIRECTORIES("${CUDA_TOOLKIT_ROOT_DIR}/lib64")
LINK_LIBRARIES("nvToolsExt")
ENDIF(HAVE_CUDA)
ENDIF(USE_NVTX)
@jefflarkin
jefflarkin / cpu_profile.sh
Created October 18, 2016 13:30
OLCF Hackathon Profiling Scripts
View cpu_profile.sh
#!/bin/bash
# USAGE: Add between aprun options and executable
# For Example: aprun -n 16 -N 1 ./foo arg1 arg2
# Becomes: aprun -n 16 -N 1 ./cpu_profile.sh ./foo arg1 arg2
# Give each *rank* a separate file
LOG=cpu_profile_$ALPS_APP_PE.nvprof
# Stripe each profile file by 1 to share the load on large runs
if [ ! -f "$LOG" ] ; then
@jefflarkin
jefflarkin / gpio.sh
Last active April 13, 2018 22:15
BASH functions for using the C.H.I.P. GPIO pins.
View gpio.sh
#!/bin/bash
#FIXME Add usage() function to improve documentation
# Enable exposure of the specified GPIO pin (0-8)
gpio_enable()
{
if [[("$1" -lt 0) || ("$1" -gt 8)]] ; then
echo "Valid pins are 0-8"
return -1;
fi
@jefflarkin
jefflarkin / nvprof_timeline.sh
Last active June 5, 2017 20:53
Script for gathering an nvprof timeline on a Cray XK7
View nvprof_timeline.sh
#!/bin/bash
# USAGE: Add between aprun options and executable
# For Example: aprun -n 16 -N 1 ./foo arg1 arg2
# Becomes: aprun -n 16 -N 1 ./nvprof.sh ./foo arg1 arg2
export PMI_NO_FORK=1
# Give each *rank* a separate file
LOG=timeline_$ALPS_APP_PE.nvprof
# Set the process and context names
@jefflarkin
jefflarkin / keybase.md
Created May 28, 2015 15:03
Keybase Identify Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am jefflarkin on github.
  • I am jefflarkin (https://keybase.io/jefflarkin) on keybase.
  • I have a public key whose fingerprint is 13D8 BCCC 1A50 57D3 FB4F E33A 950C 167F 0C1A 041D

To claim this, I am signing this object:

@jefflarkin
jefflarkin / nvtx.w
Last active February 12, 2020 17:56
Script for generating PMPI wrappers for NVTX ranges using https://github.com/scalability-llnl/wrap
View nvtx.w
#include <pthread.h>
#include <nvToolsExt.h>
#include <nvToolsExtCudaRt.h>
// Setup event category name
{{fn name MPI_Init}}
nvtxNameCategoryA(999, "MPI");
{{callfn}}
int rank;
PMPI_Comm_rank(MPI_COMM_WORLD, &rank);
char name[256];
@jefflarkin
jefflarkin / nvtx.F90
Last active February 21, 2023 16:57
Simple Fortran bindings to a subset of the NVTX library.
View nvtx.F90
! Fortran bindings for a small subset of the NVIDIA Tools Extensions library
module nvtx
use iso_c_binding
public :: nvtxrangepusha, nvtxrangepop
public :: nvtxrangepushaargb
interface
! Annotate the timeline with a message
! Parameters:
! * string : the message in a string format
subroutine nvtxrangepusha(string) bind(C, name="nvtxRangePushA")