#!/usr/local/bin/perl -w

#call eg: tim_mod.pl alpha.bgsu.edu 100 Raw

$slave = $ARGV[0];
$bytes = $ARGV[1];
$format = $ARGV[2];

{
    local $/ = undef;
    open(IN, "<timing.c.in");
    $_ = <IN>;
    close(IN);
}

s/whoami/$slave/;

$ints = $bytes/4;
s/numint = 25;/numint = $ints;/;

s/pvm_initsend \(PvmDataRaw\);/pvm_initsend \(PvmData$format\);/g;

open(OUT, ">timing.c");
print OUT;
close(OUT);
