The simple logging example can be run via:
- mpiexec -n 4 python mpi_logger.py
For the compute and logging example:
- mpiexec -n 4 python mock_execution.py
{ config, pkgs, ... }: | |
let | |
# Import unstable channel. | |
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable | |
# sudo nix-channel --update nixpkgs-unstable | |
unstable = import <nixpkgs-unstable> {}; | |
in | |
{ |
#include <iostream> | |
#include <unsupported/Eigen/CXX11/Tensor> | |
// Inspired by my question and its accepted answer on StackOverflow (https://stackoverflow.com/questions/47556726), I've decided to create this in a little gist. | |
// This Gist is about some undocumented (https://bitbucket.org/eigen/eigen/src/default/unsupported/Eigen/CXX11/src/Tensor/README.md?fileviewer=file-view-default) behavior of Eigen::Tensor contractions. | |
/** Print the contents of a rank-four tensor in a fashionable way | |
*/ | |
void print(const Eigen::Tensor<double, 4>& T) { |
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
This NixOS code ensures that the system provide version-specific $LOCALE_ARCHIVE
environment variables to mitigate the effects of
NixOS/nixpkgs#38991.
To deploy it, copy the file into your /etc/nixos
folder using a file name
like multi-glibc-locale-paths.nix
. Then edit your configuration.nix
file to
contain the attribute:
imports = [ ./multi-glibc-locale-paths.nix ];
You would think it would be easy to find this information, but none of the Github or Gandi documentation is clear so I have recorded the required steps here.
Create the following A records:
@ 1800 IN A 185.199.108.153
@ 1800 IN A 185.199.109.153
@ 1800 IN A 185.199.110.153
#!/usr/bin/env bash | |
# adjust APPVEYOR_TOKEN, username, and projectname | |
APPVEYOR_TOKEN=.................... | |
curl -H "Authorization: Bearer $APPVEYOR_TOKEN" \ | |
-H "Content-Type: application/json" \ | |
-X "DELETE" \ | |
https://ci.appveyor.com/api/projects/username/projectname/buildcache |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Feb 14 16:17:38 2018 | |
This handler is used to deal with logging with mpi4py in Python3. | |
@author: cheng | |
@reference: | |
https://cvw.cac.cornell.edu/python/logging | |
https://groups.google.com/forum/#!topic/mpi4py/SaNzc8bdj6U |
# install mkl | |
RUN apt update && apt install -y --force-yes apt-transport-https && \ | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \ | |
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \ | |
sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' && \ | |
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install cpio intel-mkl-64bit-2018.3-051 && \ | |
(find /opt/intel -name "ia32*" -exec rm -rf {} \; || echo "removing ia32 binaries") ; \ | |
(find /opt/intel -name "examples" -type d -exec rm -rf {} \; || echo "removing examples") ; \ | |
(find /opt/intel -name "benchmarks" -exec rm -rf {} \; || echo "removing benchmarks") ; \ | |
(find /opt/intel -name "documentation*" -exec rm -rf {} \; || echo "removing documentation") ; \ |
#include <chrono> | |
#include <vector> | |
#include <CL/sycl.hpp> | |
namespace sycl = cl::sycl; | |
using wall_clock_t = std::chrono::high_resolution_clock; | |
using time_point_t = std::chrono::time_point<wall_clock_t>; | |
template <typename T, class Period> | |
using time_interval_t = std::chrono::duration<T, Period>; |