Skip to content

Instantly share code, notes, and snippets.

View ASKabalan's full-sized avatar

Wassim KABALAN ASKabalan

View GitHub Profile
@ASKabalan
ASKabalan / Slurm Gists
Last active July 18, 2024 15:21
Slurm Scripting and Profiling
#!/bin/bash
##########################################
## SELECT EITHER tkc@a100 OR tkc@v100 ##
##########################################
#SBATCH --account glc@a100
##########################################
#SBATCH --job-name=ProfParticle-Mesh # nom du job
# Il est possible d'utiliser une autre partition que celle par default
# en activant l'une des 5 directives suivantes :
##########################################
@ASKabalan
ASKabalan / One Header Libraries Logger.hpp
Last active April 9, 2024 14:07
One Header Libraries
/**
* @file logger.hpp
* @version 0.0.4
* @brief Async Logger for C++ with timestamp, name, and configurable options.
*
* Environment variables:
* - ASYNC_TRACE: Enables trace for specific logger name.
* - ASYNC_TRACE_VERBOSE: Enables verbose trace for specific logger name.
* - ASYNC_TRACE_MAX_BUFFER: Sets the maximum buffer size for log entries.
* - ASYNC_TRACE_OUTPUT_DIR: Sets the output directory for log files.
@ASKabalan
ASKabalan / _bash_setup.md
Last active July 18, 2024 21:45
Setting up bash files

Bash Setup

My Bash setup and aliases

@ASKabalan
ASKabalan / CUDA Macros.h
Last active May 29, 2024 11:55
CUDA Macros
#include <cuda_runtime.h>
#include <iostream>
#define CHECK_CUDA_ERROR(val) check((val), #val, __FILE__, __LINE__)
void check(cudaError_t err, const char* const func, const char* const file,
const int line)
{
if (err != cudaSuccess)
{
std::cerr << "CUDA Runtime Error at: " << file << ":" << line