Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
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
local wezterm = require 'wezterm' | |
local config = wezterm.config_builder() | |
config.automatically_reload_config = true | |
config.disable_default_key_bindings = true | |
config.default_prog = { '/bin/zsh'} | |
-- >> APPEARANCE --------------------------------------------------------------------------- |
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
using Adapt | |
using CUDA | |
using KernelAbstractions | |
struct KernelData{T1, T2, T3<:AbstractArray, T4<:AbstractArray} | |
scalar1 ::T1 | |
scalar2 ::T2 | |
mass ::T3 | |
velocity::T4 | |
end |
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
using Gmsh | |
""" | |
readmsh(msh_path::String; precision="FP32") | |
Description: | |
--- | |
Read the mesh file (`.msh`) generated by Gmsh. The function will return the vertices and | |
faces for triangle. It's necessary to check the mesh qulity before using this function. | |
You can do it in MeshLab or Gmsh GUI. `precision` can be "FP64" or "FP32" in `String`. | |
""" |
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
using KernelAbstractions | |
using CUDA | |
using BenchmarkTools | |
@inline function uGIMPbasis(Δx::T2, h::T2, lp::T2) where T2 | |
T2 == Float32 ? T1 = Int32 : | |
T2 == Float64 ? T1 = Int64 : nothing | |
absΔx = abs(Δx); signΔx = sign(Δx) | |
c1 = absΔx<(T2(0.5)*lp) | |
c2 = (T2(0.5)*lp)≤absΔx<(h-T2(0.5)*lp) |
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
using MPI | |
using CUDA | |
using NVTX | |
function main() | |
MPI.Init() | |
comm = MPI.COMM_WORLD | |
rank = MPI.Comm_rank(comm) | |
CUDA.device!(rank) | |
n = 263374721 |
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
using MPI | |
using CUDA | |
using Printf | |
function print_aligned_matrix_with_color(matrix::Array{String,2}) | |
@info "MPI GPU Unidirectional P2P Bandwidth Test [GB/s]" | |
col_widths = [maximum(length.(matrix[:, i])) for i in 1:size(matrix, 2)] | |
for row in 1:size(matrix, 1) | |
for col in 1:size(matrix, 2) | |
if row == 1 || col == 1 |
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
using CairoMakie | |
pub_font_size = 10 | |
figfont = "CMU Serif" | |
figuretheme = Theme( | |
Figure = ( | |
font = figfont, | |
fontsize = pub_font_size | |
), |