Skip to content

Instantly share code, notes, and snippets.

@jgphpc
jgphpc / deps.py
Created September 27, 2021 18:41
reframe: deps between login and cn
import os
import reframe as rfm
import reframe.utility.sanity as sn
import reframe.utility.udeps as udeps
images_list = ['tutti.sif', 'frutti.sif']
# {{{ build:
@jgphpc
jgphpc / readme.sh
Created December 15, 2021 12:14
CUDA_SEPARABLE_COMPILATION for HIP with CMAKE
hipcc --offload-arch=gfx908 -fPIC -fgpu-rdc -std=c++17 -w -c domain/util.cu
hipcc --offload-arch=gfx908 -fPIC -fgpu-rdc -std=c++17 -w -c domain/test.cu -Iinclude
hipcc -fPIC -shared -dlink util.o test.o -o device_link.o -fgpu-rdc --hip-link
/opt/rocm/llvm/bin/clang++ src/main.cpp util.o test.o device_link.o -o exe -L/opt/rocm/hip/lib -lamdhip64 -Iinclude
@jgphpc
jgphpc / cuda.md
Last active February 11, 2022 14:27
Releases: https://developer.nvidia.com/cuda-toolkit-archive

CUDA Toolkit 11.6.0 (January 2022), Versioned Online Documentation
CUDA Toolkit 11.5.0 (October 2021), Versioned Online Documentation
CUDA Toolkit 11.4.0 (June 2021), Versioned Online Documentation
CUDA Toolkit 11.3.0 (April 2021), Versioned Online Documentation
CUDA Toolkit 11.2.0 (December 2020), Versioned Online Documentation
@jgphpc
jgphpc / rfm.py
Last active March 21, 2022 20:58
analytical with rfm
import reframe as rfm
import reframe.utility.sanity as sn
@rfm.simple_test
class analytical_solution(rfm.RunOnlyRegressionTest):
test = parameter(['sedov', 'noh']) # noh
valid_systems = ['*']
valid_prog_environs = ['*']
@jgphpc
jgphpc / README.md
Last active September 27, 2022 19:23
MPI_Comm_size
@jgphpc
jgphpc / README.md
Last active October 11, 2022 10:55
mask_cpu
cmake_minimum_required(VERSION 3.23)
project(hello)
enable_language(CXX)
find_package(MPI REQUIRED)
# include_directories(${MPI_Fortran_INCLUDE_PATH})
# add_executable(f.exe ./src/hello_world_mpi.f90)
# add_executable(c.exe ./src/hello_world_mpi.c)
set(exename C.exe)
add_executable(${exename} hello_world_mpi.cpp)

Testing modulefile loading with squashfs

reframe -c jg_buildonly.py \
--system $CLUSTER_NAME:gpu-squashfs \
--module-path +/user-environment/modules -r \
-p PrgEnv-gnu -v
# Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import os
import reframe as rfm
import reframe.utility.sanity as sn

hohgant

setup pe

squashfs-run /scratch/e1000/piccinal/base-gcc11-mpi821-hip52.squashfs bash
module use /user-environment/modules
ls /user-environment/modules/hipcub/
module load cray-mpich hip/5.2.3 hipcub/5.2.3 rocblas/5.2.3 rocm-cmake/5.2.3 \
    gcc/11.3.0 hipblas/5.2.3 hipfft/5.2.3 rocfft/5.2.3 rocthrust/5.2.3