anduin / CUDA monte carlo estimate pi
0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
monte carlo estimate pi
| 1 | #include <iostream> |
| 2 | #include <curand.h> |
| 3 | #include <curand_kernel.h> |
| 4 | |
| 5 | __global__ void calculate_pi(int *count, unsigned long seed) { |
| 6 | int idx = threadIdx.x + blockIdx.x * blockDim.x; |
| 7 | curandState state; |
| 8 | curand_init(seed, idx, 0, &state); |
| 9 | |
| 10 | float x = curand_uniform(&state); |
anduin / fake service.yml
0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
Make any docker service fake
| 1 | # Fake entrypoint for the service. Always sleep. |
| 2 | entrypoint: ["sleep", "infinity"] |
| 3 | # Fake healthcheck for the service. Always return true. |
| 4 | healthcheck: |
| 5 | test: ["CMD", "true"] |
anduin / Ceph deploy notes
0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
Ceph deploy notes
这里将在 3 台 node 上安装 ceph。
三台 node 的 hostname 分别是:
- node1
- node2
- node3
三个 node 全部都插一块 新的 大硬盘。假如是 /dev/sdb 。
anduin / Ubuntu ISCSI
0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
Ubuntu mount ISCSI server
| 1 | # Ubuntu install ISCSI Server |
| 2 | # Assuming the IP of the server is 10.0.0.1 |
| 3 | |
| 4 | # Mount a disk as /dev/sdb first |
| 5 | apt install tgt -y |
| 6 | |
| 7 | # Edit /etc/tgt/conf.d/iscsi.conf |
| 8 | echo " |
| 9 | <target iqn.2024-03.iscsi.server:lun1> |
| 10 | backing-store /dev/sdb |