moved to https://github.com/geospace-code/trustedqsl-wsjtx-upload-lotw
cmake_minimum_required(VERSION 3.19...4.2) | |
project(InstructionSet LANGUAGES CXX) | |
set(CMAKE_CXX_SCAN_FOR_MODULES OFF) | |
enable_testing() | |
include(CheckIncludeFileCXX) |
Using GitHub Actions cache is a little more complicated than not caching, but makes the setup time dramatically shorter.
This example uses MKL and MPI.
To avoid problems with the CI executing the scripts, do one time:
from pathlib import Path | |
import tempfile | |
import tarfile | |
import zstandard | |
# pip install zstandard | |
def extract_zst(archive: Path, out_path: Path): | |
"""extract .zst file |
# This file is for use with a Hugo blog. | |
# be careful using this on real-life site, so that the patterns below don't dump legitimate traffic! | |
# we use 410 to be more aggressive than 404, and to unclutter Netlify statistics | |
/.env /bot.html 410 | |
/blog.zip /bot.html 410 | |
/.git/* /bot.html 410 | |
/browserconfig.xml /bot.html 410 | |
/OLD/* /bot.html 410 | |
/404.html /bot.html 410 |
What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.
In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.
Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
env = Environment( | |
CCFLAGS = ['-Wall', '-Werror'], | |
) | |
env.Program('mkdir_p_test', ['mkdir_p.c', 'test.c']) |
I am working on adding support for building and distributing (via PyPI) Python Wheels with C Extensions to the Python wheel and pip packages. The discussion on Distutils-SIG continues, but I believe it is fairly certain that some effort to correctly identify Linux distributions will need to be made. I've begun efforts to add this support to wheel.
If you have a Linux distribution or version of a listed distribution not in this gist, or one of the ones I have not directly verified, I could use the following:
- The contents of
/etc/os-release
, if it exists
#!/usr/bin/env bash | |
# https://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-hdf5-with-intel-compilers | |
## PREREQS | |
# 1) szip 2.1 | |
export CC=icc | |
export CXX=icpc | |
export FC=ifort | |
export CFLAGS='-O3 -xHost -ip' | |
export CXXFLAGS='-O3 -xHost -ip' |