Skip to content

Instantly share code, notes, and snippets.

View K-Wu's full-sized avatar
🆑
κ = α|working> + β|slacking>

Kun Wu K-Wu

🆑
κ = α|working> + β|slacking>
View GitHub Profile
@K-Wu
K-Wu / settings.json
Created March 5, 2023 06:35
.vscode configurations to setup conda env whenever terminal opens
{
// from https://stackoverflow.com/a/60438516
"terminal.integrated.env.linux": {
"BASH_INIT_COMMAND": "source ~/conda_init.sh && conda activate exp_prelim"
},
"python.analysis.typeCheckingMode": "basic",
"python.defaultInterpreterPath": "/home/kwu/anaconda3/envs/exp_prelim/bin/python",
}
abysmal
adverse
alarming
angry
annoy
anxious
apathy
appalling
atrocious
awful
@K-Wu
K-Wu / mpi_cuda_awareness_check.cpp
Last active April 25, 2023 20:33
Checking if MPI is installed with cuda-awareness
/*
* From https://www.open-mpi.org/faq/?category=runcuda
* Command:
* $ mpic++ cuda_aware_check.cpp
* $ mpirun a.out
* Program that shows the use of CUDA-aware macro and runtime check.
* Requires Open MPI v2.0.0 or later.
*/
#include <stdio.h>
#include "mpi.h"