Skip to content

Instantly share code, notes, and snippets.

@jjhursey
jjhursey / value.c
Created April 11, 2022 16:23
Breakdown the size of the pmix_value_t structure as part of the PMIx ABI investigation
/*
* Josh Hursey (IBM)
* Breakdown the size of the pmix_value_t structure as part of the PMIx ABI
* investigation.
*/
#include <stdio.h>
#include <pmix.h>
#define XLIST(xmacro) \
xmacro("flag", flag) \
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Chapter: Examples
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Examples}
\label{chap:examples}
This chapter contains various code examples that \ac{PMIx} users may find helpful.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@jjhursey
jjhursey / gist:612f453869d5f2d3011eb9d9182ea4e7
Created February 27, 2020 16:28
Timing from PRRTE PR 416
20:47:35 =======================
20:47:35 Running hostname: prun -n 1 hostname
20:47:35 =======================
20:47:35 --------------------- Execution (hostname): 1
20:47:36 aad49dba02fe
20:47:36 --------------------- Execution (hostname): 2
20:47:36 aad49dba02fe
20:47:36 --------------------- Execution (hostname): 3
20:47:36 aad49dba02fe
20:47:36 --------------------- Execution (hostname): 4
@jjhursey
jjhursey / gist:c72bfd57d9f9f39d7d9192407aab8b7e
Created May 16, 2019 17:14
PMIx Cross-version issues (May 17, 2019)
[pmixer@46bdecbdff4f crossversion]$ ./xversion.py --basedir=$HOME/scratch --with-hwloc=$HWLOC_INSTALL_PATH --with-hwloc1=$HWLOC1_INSTALL_PATH --with-libevent=$LIBEVENT_INSTALL_PATH -b
======================================================================
Server: master -> Client: master
============ PMIx Run : Run simptest Client
Client : /home/pmixer/scratch/pmix-master/test/simple/simpclient
Server : /home/pmixer/scratch/pmix-master/test/simple
Command: ./simptest -n 2 -e /home/pmixer/scratch/pmix-master/test/simple/simpclient
Success Return Code: 0
Testing version 4.0.0a1
[46bdecbdff4f:06011] SERVER: ERRHANDLER REGISTRATION CALLBACK CALLED WITH STATUS 0, ref=0
@jjhursey
jjhursey / pmix_init_finalize.c
Created April 18, 2018 02:10
PMIx Init/Finalize Example
/*
* Simple PMIx Init/Finalize with Hostname
*/
#define _GNU_SOURCE
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
@jjhursey
jjhursey / cache-test.c
Created June 3, 2017 12:24
Test Program for discussion on PMIx PR https://github.com/pmix/pmix/pull/384
/*
* Test program for memory consistency in a thread shifting design
*
* Compile:
* gcc -O0 -g -lpthread -I/path-to/hwloc/include/ -L/path-to/hwloc/lib -lhwloc cache-test.c -o cache-test
*
* Run:
* ./cache-test ITERATIONS [MODE]
* ./cache-test 9000000 3
*
/**
* Copyright (c) 2016 IBM Corporation. All rights reserved.
*
* MPI_Ibcast, MPI_Iallgather, MPI_Iallgatherv non-uniform types test case
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <mpi.h>