macro setup
    module pantasks.pro
    module publish.pro

    $POLLLIMIT = 64

    $LOADPOLL = 1
    $LOADEXEC = 30

    $RUNPOLL = 0.5
    $RUNEXEC = 1.0

    add.database gpc1
#    add.label dummy
    add.label STS.nightlyscience
    add.label SweetSpot.nightlyscience
    add.label ThreePi.nightlyscience

    waveC_nothreads
end

macro change_verbosity
    $VERBOSE = $1
end

macro change_polllimit
    $POLLLIMIT = $1
end

macro change_runexec
    $RUNEXEC = $1
end

macro change_runpoll
    $RUNPOLL = $1
end

macro print_verbosity
    echo $VERBOSE
end

macro print_polllimit
    echo $POLLLIMIT
end

macro print_runexec
    echo $RUNEXEC
end

macro print_runpoll
    echo $RUNPOLL
end

macro change_loadexec
    $LOADEXEC = $1
end

macro change_loadpoll
    $LOADPOLL = $1
end

macro print_loadexec
    echo $LOADEXEC
end

macro print_loadpoll
    echo $LOADPOLL
end

macro waveC_nothreads
  controller host add ippc00
  controller host add ippc01
  controller host add ippc02
  controller host add ippc03
  controller host add ippc04
  controller host add ippc05
  controller host add ippc06
  controller host add ippc07
  controller host add ippc08
  controller host add ippc09
  controller host add ippc10
  controller host add ippc11
  controller host add ippc12
  controller host add ippc13
  controller host add ippc14
  controller host add ippc15
  controller host add ippc16
end

macro waveC
  controller host add ippc00 -threads $1
  controller host add ippc01 -threads $1
  controller host add ippc02 -threads $1
  controller host add ippc03 -threads $1
  controller host add ippc04 -threads $1
  controller host add ippc05 -threads $1
  controller host add ippc06 -threads $1
  controller host add ippc07 -threads $1
  controller host add ippc08 -threads $1
  controller host add ippc09 -threads $1
  controller host add ippc10 -threads $1
  controller host add ippc11 -threads $1
  controller host add ippc12 -threads $1
  controller host add ippc13 -threads $1
  controller host add ippc14 -threads $1
  controller host add ippc15 -threads $1
  controller host add ippc16 -threads $1
end

