This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ############################################################################################################################## | |
| # USAGE: sbatch myscript.sh <RUN_NAME> python <script.py> [args...] | |
| # EXAMPLE: sbatch myscript.sh my_experiment_v1 python train.py --lr 0.01 | |
| ############################################################################################################################## | |
| #SBATCH --job-name=Likelihoods | |
| #SBATCH --cpus-per-task=3 | |
| #SBATCH --nodes=1 | |
| #SBATCH --tasks-per-node=1 | |
| #SBATCH --hint=nomultithread |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @file logger.hpp | |
| * @version 0.4.0 | |
| * @brief Logger for C++ with timestamp, name, and configurable options via TRACE environment variable. | |
| * | |
| * Environment variable: | |
| * - TRACE: Enables trace for specific logger names or tags, and accepts additional parameters: | |
| * - `-v`: Enables verbose logging. | |
| * - `-o FOLDER`: Sets the output directory for log files. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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 |