macro setup
    module pantasks.pro
    module register.pro

    # $POLLLIMIT = 128
    $POLLLIMIT = 10
    $RUNEXEC = 0.1
    $RUNPOLL = 0.1
    $LOADEXEC = 5
    $VERBOSE = 4 

    $default_host = ipp023
    $workdir_template = neb://anyhost/default.register/
    queueload tmp -x "cat $MODULES:0/ipphosts.mhpcc.config"
    ipptool2book tmp ipphosts -key camera
    add.database gpc1
    wave1_nothreads
    wave2_nothreads
    wave2_nothreads
end

macro foo
    book listpage regPendingImfile $1
end



macro change_polllimit
    $POLLLIMIT = $1
end

macro change_runexec
    $RUNEXEC = $1
end

macro change_runpoll
    $RUNPOLL = $1
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 wave1
# ipp004 is home
# ipp005 is flaky
    controller host add ipp006 -threads $1
    controller host add ipp007 -threads $1
# ipp008 is flaky
    controller host add ipp009 -threads $1
    controller host add ipp010 -threads $1
    controller host add ipp011 -threads $1
    controller host add ipp012 -threads $1
    controller host add ipp013 -threads $1
    controller host add ipp014 -threads $1
    controller host add ipp016 -threads $1
    controller host add ipp018 -threads $1
# ipp019 is Nebulous
    controller host add ipp020 -threads $1
    controller host add ipp021 -threads $1
# ipp025 is flaky
end

macro wave2
    controller host add ipp015 -threads $1
    controller host add ipp017 -threads $1
    controller host add ipp023 -threads $1
    controller host add ipp024 -threads $1
    controller host add ipp026 -threads $1
    controller host add ipp027 -threads $1
    controller host add ipp028 -threads $1
    controller host add ipp029 -threads $1
    controller host add ipp030 -threads $1
    controller host add ipp031 -threads $1
    controller host add ipp032 -threads $1
    controller host add ipp033 -threads $1
    controller host add ipp034 -threads $1
    controller host add ipp035 -threads $1
    controller host add ipp036 -threads $1
end

macro wave1_nothreads
# ipp004 is home
# ipp005 is flaky
    controller host add ipp006
    controller host add ipp007
# ipp008 is flaky
    controller host add ipp009
    controller host add ipp010
    controller host add ipp011
    controller host add ipp012
    controller host add ipp013
    controller host add ipp016
    controller host add ipp018
# ipp019 is Nebulous
    controller host add ipp020
    controller host add ipp021
# ipp025 is flaky
end

macro wave2_nothreads
    controller host add ipp015
    controller host add ipp017
    controller host add ipp023
    controller host add ipp024
    controller host add ipp026
    controller host add ipp027
    controller host add ipp028
    controller host add ipp029
    controller host add ipp030
    controller host add ipp031
    controller host add ipp032
    controller host add ipp033
    controller host add ipp034
    controller host add ipp035
    controller host add ipp036
end

