Skip to content

Instantly share code, notes, and snippets.

View hokiegeek2's full-sized avatar

hokiegeek2

View GitHub Profile
@hokiegeek2
hokiegeek2 / chapl_gpu
Last active October 9, 2022 09:56
Single-Locale Chapel GPU testing
# Setup GPU env variables required by Chapel
export PATH=$CHPL_HOME/bin/linux64-x86_64/:$PATH
export CPATH=$CPATH:/usr/local/cuda/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda/lib64
export PATH=/usr/local/cuda/bin/:$PATH
export CHPL_TARGET_CPU=native
export CHPL_LOCALE_MODEL=gpu
export CHPL_RE2=bundled
export CHPL_COMM_SUBSTRATE=smp
export CHPL_COMM=none
@hokiegeek2
hokiegeek2 / gpu_iterator
Last active August 25, 2022 05:54
GPUIterator
Set CUDA env
```
export PATH=/usr/local/cuda/bin/:$PATH
```
Within chapel-gpu dir, create build dir and execute following commands:
```
(base) kjyost@einhorn:~/development/git/hokiegeek2-forks/chapel-gpu/build$ cmake ..
# as detailed here: https://askubuntu.com/questions/1203635/installing-latest-cmake-on-ubuntu-18-04-3-lts-run-via-wsl-openssl-error
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get update
# Example: update Ubuntu 18.04 to latest cmake (3.10 to 3.24)
(base) kjyost@podacter:~/development/git/chapel$ sudo apt-get install cmake
Reading package lists... Done
# https://itsfoss.com/fix-ubuntu-install-error/
# try this first
sudo killall apt-get
# if above does not work, try the following in order
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
# finally, try this
@hokiegeek2
hokiegeek2 / fixing-nvidia-driver-issues
Created October 26, 2022 13:21
fixing NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
# Purge all NVIDIA libs from system
sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get remove --purge '^libnvidia-.*'
sudo apt-get remove --purge '^cuda-.*'
# Update linux-headers
sudo apt-get install linux-headers-$(uname -r)
# autoremove all unneeded dependent llibs
sudo apt autoremove
@hokiegeek2
hokiegeek2 / gist:dffb613569a35666ae3daf123e0faf8c
Created November 25, 2022 21:30
fix ubuntu 22.04-k8s service
vi /etc/default/grub
GRUB_CMDLINE_LINUX="cgroup_memory=1 cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=0"
vi /etc/sysctl.conf
net.bridge.bridge-nf-call-iptables=1
# Install Rust
Run the following command and restart shell
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
# Install Prerequisites
#wipe a rancher-k8s node
curl -sLO https://github.com/rancherlabs/support-tools/raw/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh
sudo bash extended-cleanup-rancher2.sh -f -i
@hokiegeek2
hokiegeek2 / gist:391700756493752f025f70041ad2ad48
Created March 27, 2023 10:32
clear out ubuntu disk space
# some good tips here https://itsfoss.com/free-up-space-ubuntu-linux/
# and here: https://askubuntu.com/questions/5980/how-do-i-free-up-disk-space
# arkouda.proto
syntax = "proto3";
package arkouda;
service Arkouda {
rpc HandleRequest(ArkoudaRequest) returns (ArkoudaResponse) {}
}
message ArkoudaRequest {