Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
codes
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 38
    • Issues 38
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • codes
  • codes
  • Wiki
  • codes cortex python gen

codes cortex python gen

Last edited by Matthieu Dorier Dec 16, 2016
Page history

Running CODES with a Python workload generator

This section assumes you have installed CODES with Cortex and Python enabled, as described here. If you want to generate the MPI events from a Python script instead of reading them from a DUMPI trace, do as follows.

Preparing configuration files

Follow the same procedure as here (don't use the bash script to generate the allocation file since you don't have traces to work with. Generate the allocation file manually.)

Prepare a Python script to generate the MPI events

An example of such a script:

import cortex

def GenerateEvents(thread):
   print "Generating events for rank ",thread
   if thread == 0:
       cortex.MPI_Send(thread,count=1,datatype=4,dest=1,tag=1234,comm=2)
   if thread == 1:
       cortex.MPI_Recv(thread,count=1,datatype=4,source=0,tag=1234,comm=2,status=cortex.MPI_Status())

Call this script MyGenerator.py.

Run your experiment

The following script should help you automatize the run:

#!/bin/sh

PYTHON_MOD=MyGenerator
PYTHON_GEN=GenerateEvents
OUTPUT_DIR="results"

CODES="$HOME/CODES/install/codes/bin/model-net-mpi-replay"
NUM_RANKS=2

PARAMS="--sync=1 \
        --num_net_traces=$NUM_RANKS \
        --workload_file=none \
        --lp-io-dir=$OUTPUT_DIR \
        --lp-io-use-suffix=1 \
        --workload_type=dumpi \
        --alloc_file=alloc.conf" \
        --cortex-file=$PYTHON_MOD \
        --cortex-gen=$PYTHON_GEN

CONFIG="config.conf"

$CODES $PARAMS -- $CONFIG
Clone repository
  • Dragonfly Plus
  • Optimistic Performance Tuning Tips
  • Quality of Service
  • Using ROSS Instrumentation with CODES
  • build on theta
  • codes allocations
  • codes best practices
  • codes configuration
  • codes cortex install
  • codes cortex python gen
  • codes cortex python translation
  • codes cortex translation
  • codes cortex workload
  • codes dragonfly old
  • codes dragonfly
View All Pages