Skip to content
Snippets Groups Projects
Commit c58f19ee authored by Ger van Diepen's avatar Ger van Diepen
Browse files

bug 1193:

Some changes to make it more suitable for mwimager
parent ec0d3bcd
No related branches found
No related tags found
No related merge requests found
Showing
with 151 additions and 231 deletions
......@@ -33,8 +33,7 @@ namespace LOFAR { namespace CEP {
{
public:
/// Construct with a description of the entire visibility data set.
/// Also supply a vector mapping antenna name to number.
VdsDesc (const VdsPartDesc&, const std::vector<std::string>& antNames);
explicit VdsDesc (const VdsPartDesc&);
/// Construct from the given parameterset.
/// @{
......@@ -55,17 +54,6 @@ namespace LOFAR { namespace CEP {
const VdsPartDesc& getDesc() const
{ return itsDesc; }
/// Get antennas names.
const std::vector<std::string>& getAntNames() const
{ return itsAntNames; }
/// Convert an antenna name to its index.
/// -1 is returned if not found.
int antNr (const std::string& name) const;
/// Convert an antenna regex to indices.
std::vector<int> antNrs (const casa::Regex& names) const;
/// Write it in parset format.
void write (std::ostream& os) const;
......@@ -75,7 +63,6 @@ namespace LOFAR { namespace CEP {
VdsPartDesc itsDesc;
std::vector<VdsPartDesc> itsParts;
std::vector<std::string> itsAntNames; //# maps antennanr to name
};
}} /// end namespaces
......
......@@ -29,15 +29,14 @@ namespace LOFAR { namespace CEP {
/// The description of the VDS also contains info about the time,
/// frequency, and baseline domain of the visibility data.
///
/// Currently the information is made persistent in a LOFAR .parset file.
/// In the future it needs to use the Centrol Processor Resource Manager.
/// The information is made persistent in a LOFAR .parset file.
class VdsPartDesc
{
public:
/// Construct an empty object.
VdsPartDesc()
: itsStartTime(0), itsEndTime(0)
: itsStartTime(0), itsStepTime(1)
{}
/// Construct from the given parameterset.
......@@ -47,15 +46,11 @@ namespace LOFAR { namespace CEP {
void setName (const std::string& name, const std::string& fileSys);
/// Set the start and end time.
void setTimes (double startTime, double endTime);
void setTimes (double startTime, double endTime, double stepTime);
/// Add a band.
void addBand (int nchan, double startFreq, double endFreq);
/// Set the baselines.
void setBaselines (const std::vector<int>& ant1,
const std::vector<int>& ant2);
/// Write it in parset format.
void write (std::ostream& os, const std::string& prefix) const;
......@@ -69,6 +64,8 @@ namespace LOFAR { namespace CEP {
{ return itsStartTime; }
double getEndTime() const
{ return itsEndTime; }
double getStepTime() const
{ return itsStepTime; }
int getNBand() const
{ return itsNChan.size(); }
const std::vector<int>& getNChan() const
......@@ -77,10 +74,6 @@ namespace LOFAR { namespace CEP {
{ return itsStartFreqs; }
const std::vector<double>& getEndFreqs() const
{ return itsEndFreqs; }
const std::vector<int>& getAnt1() const
{ return itsAnt1; }
const std::vector<int>& getAnt2() const
{ return itsAnt2; }
/// @}
private:
......@@ -88,11 +81,10 @@ namespace LOFAR { namespace CEP {
std::string itsFileSys; //# name of file system the VDS resides on
double itsStartTime;
double itsEndTime;
std::vector<int> itsNChan; //# nr of channels per band
std::vector<double> itsStartFreqs; //# start freq of each band
std::vector<double> itsEndFreqs; //# end freq of each band
std::vector<int> itsAnt1; //# 1st antenna of each baseline
std::vector<int> itsAnt2; //# 2nd antenna of each baseline
double itsStepTime;
std::vector<int> itsNChan; //# nr of channels per band
std::vector<double> itsStartFreqs; //# start freq of each channel
std::vector<double> itsEndFreqs; //# end freq of each channel
};
}} /// end namespaces
......
......@@ -16,10 +16,8 @@ using namespace std;
namespace LOFAR { namespace CEP {
VdsDesc::VdsDesc (const VdsPartDesc& desc,
const vector<string>& antNames)
: itsDesc (desc),
itsAntNames (antNames)
VdsDesc::VdsDesc (const VdsPartDesc& desc)
: itsDesc (desc)
{}
VdsDesc::VdsDesc (const string& parsetName)
......@@ -30,7 +28,6 @@ namespace LOFAR { namespace CEP {
void VdsDesc::init (const ParameterSet& parset)
{
itsDesc = VdsPartDesc (parset);
itsAntNames = parset.getStringVector ("AntNames");
int npart = parset.getInt32 ("NParts");
for (int i=0; i<npart; ++i) {
ostringstream prefix;
......@@ -43,7 +40,6 @@ namespace LOFAR { namespace CEP {
void VdsDesc::write (ostream& os) const
{
itsDesc.write (os, "");
os << "AntNames = " << itsAntNames << endl;
os << "NParts = " << itsParts.size() << endl;
for (unsigned i=0; i<itsParts.size(); ++i) {
ostringstream prefix;
......@@ -52,27 +48,6 @@ namespace LOFAR { namespace CEP {
}
}
int VdsDesc::antNr (const string& name) const
{
vector<string>::const_iterator inx =
find (itsAntNames.begin(), itsAntNames.end(), name);
if (inx == itsAntNames.end()) {
return -1;
}
return inx - itsAntNames.begin();
}
vector<int> VdsDesc::antNrs (const casa::Regex& names) const
{
vector<int> result;
for (unsigned i=0; i<itsAntNames.size(); ++i) {
if (casa::String(itsAntNames[i]).matches (names)) {
result.push_back (i);
}
}
return result;
}
// int VdsDesc::findPart (const string& fileSystem,
// const vector<int>& done) const
// {
......
......@@ -18,28 +18,30 @@ namespace LOFAR { namespace CEP {
VdsPartDesc::VdsPartDesc (const ParameterSet& parset)
{
itsName = parset.getString ("Name");
itsFileSys = parset.getString ("FileSys");
itsStartTime = parset.getDouble ("StartTime");
itsEndTime = parset.getDouble ("EndTime");
itsNChan = parset.getInt32Vector ("NChan");
itsStartFreqs = parset.getDoubleVector ("StartFreqs");
itsEndFreqs = parset.getDoubleVector ("EndFreqs");
itsAnt1 = parset.getInt32Vector ("Ant1");
itsAnt2 = parset.getInt32Vector ("Ant2");
itsName = parset.getString ("Name");
itsFileSys = parset.getString ("FileSys", "");
itsStartTime = parset.getDouble ("StartTime");
itsEndTime = parset.getDouble ("EndTime");
itsStepTime = parset.getDouble ("StepTime");
itsNChan = parset.getInt32Vector ("NChan", vector<int32>());
itsStartFreqs = parset.getDoubleVector ("StartFreqs", vector<double>());
itsEndFreqs = parset.getDoubleVector ("EndFreqs", vector<double>());
}
void VdsPartDesc::write (std::ostream& os, const std::string& prefix) const
{
os << prefix << "Name = " << itsName << endl;
os << prefix << "FileSys = " << itsFileSys << endl;
os << prefix << "StartTime = " << itsStartTime << endl;
os << prefix << "EndTime = " << itsEndTime << endl;
os << prefix << "NChan = " << itsNChan << endl;
os << prefix << "StartFreqs = " << itsStartFreqs << endl;
os << prefix << "EndFreqs = " << itsEndFreqs << endl;
os << prefix << "Ant1 = " << itsAnt1 << endl;
os << prefix << "Ant2 = " << itsAnt2 << endl;
os << prefix << "Name = " << itsName << endl;
if (! itsFileSys.empty()) {
os << prefix << "FileSys = " << itsFileSys << endl;
}
os << prefix << "StartTime = " << itsStartTime << endl;
os << prefix << "EndTime = " << itsEndTime << endl;
os << prefix << "StepTime = " << itsStepTime << endl;
if (! itsNChan.empty()) {
os << prefix << "NChan = " << itsNChan << endl;
os << prefix << "StartFreqs = " << itsStartFreqs << endl;
os << prefix << "EndFreqs = " << itsEndFreqs << endl;
}
}
void VdsPartDesc::setName (const std::string& name,
......@@ -49,24 +51,22 @@ namespace LOFAR { namespace CEP {
itsFileSys = fileSys;
}
void VdsPartDesc::setTimes (double startTime, double endTime)
void VdsPartDesc::setTimes (double startTime, double endTime, double stepTime)
{
itsStartTime = startTime;
itsEndTime = endTime;
itsStepTime = stepTime;
}
void VdsPartDesc::addBand (int nchan, double startFreq, double endFreq)
{
itsNChan.push_back (nchan);
itsStartFreqs.push_back (startFreq);
itsEndFreqs.push_back (endFreq);
}
void VdsPartDesc::setBaselines (const std::vector<int>& ant1,
const std::vector<int>& ant2)
{
itsAnt1 = ant1;
itsAnt2 = ant2;
double step = (endFreq-startFreq)/nchan;
for (int i=0; i<nchan; ++i) {
itsStartFreqs.push_back (startFreq);
startFreq += step;
itsEndFreqs.push_back (startFreq);
}
}
}} // end namespaces
......@@ -42,7 +42,7 @@ void makeFile (const string& vdsName, const string& clusterName)
" for dataset part " << iter->getName() <<
" on file system " << iter->getFileSys());
}
cout << nodes[winx].getName() << endl;
cout << nodes[winx].getName() << '#' << iter->getName() << endl;
// Increment the load to indicate it is already in use. In that way it
// will only be used again if all other possible nodes are used as well.
workers.incrLoad (winx);
......
......@@ -11,7 +11,7 @@
# This script starts a distributed process to process a datasets.
# The processes will use sockets for communication.
#
# run as: socketrun dry hfn port program [arg1 arg2 ...]
# run as: socketrun dry hfn port logfile program [arg1 arg2 ...]
dry=$1
shift
......@@ -19,6 +19,8 @@ hfn=$1
shift
port=$1
shift
logfile=$1
shift
program=$1
shift
......@@ -27,14 +29,20 @@ np=`wc -l $hfn | awk '{print $1}'`
# The first host is the master one.
masterhost=
rank=0
for host in `cat $hfn`
for inline in `cat $hfn`
do
host=`echo $inline | sed -e 's%#.*%%'`
part=`echo $inline | sed -e 's%.*#%%'`
if test "$masterhost" = ""; then
masterhost=$host
fi
echo "ssh $host $program socket $masterhost $port $np $rank"
echo "ssh $host $program socket $masterhost $port $np $rank $part" "$@"
if test $dry = 0; then
ssh $host $program socket $masterhost $port $np $rank &
if test "$logfile" = ""; then
ssh -x -f $host $program socket $masterhost $port $np $rank $part "$@"
else
ssh -x -f $host $program socket $masterhost $port $np $rank $part "$@" > $logfile-$rank 2>&1
fi
fi
rank=`expr $rank + 1`
done
......@@ -8,10 +8,12 @@
# $Id$
# This script starts a distributed process to process a datasets.
# This script starts a distributed process to process a dataset.
# It can use sockets or MPI.
# The VdsDesc and ClusterDesc files are used to determine on which nodes
# the various processes need to be started.
# Possible arguments can be given after the program namw. They are given as
# arguments to the distributed programs.
# Find the path used to start the script.
......@@ -26,7 +28,8 @@ hfn=
fdp=
master=localhost
extra=
dry=1
dry=0
logfile=
help=0
program=
if [ $# = 0 ]; then
......@@ -51,6 +54,9 @@ do
shift
hfn="$1"
shift
elif [ "$1" = "-nohfn" ]; then
shift
hfn=
elif [ "$1" = "-fdp" ]; then
shift
fdp="$1"
......@@ -61,6 +67,13 @@ do
elif [ "$1" = "-nodry" ]; then
shift
dry=0
elif [ "$1" = "-logfile" ]; then
shift
logfile="$1"
shift
elif [ "$1" = "-nologfile" ]; then
shift
logfile=
elif [ "$1" = "-mode" ]; then
shift
modxx="$1"
......@@ -69,6 +82,9 @@ do
shift
master="$1"
shift
elif [ "$1" = "-nomasterhost" ]; then
shift
master=
elif [ "$1" = "-extrahosts" ]; then
shift
extra="$1"
......@@ -99,7 +115,8 @@ if [ $help = 1 ]; then
echo ''
echo 'Run as:'
echo ' startdistproc -dsn datasetname -cdn clusterdescname [-mode mode]'
echo ' [-hfn hostfilename] [-fdp finddproc-path] [-[no]dry]'
echo ' [-hfn hostfilename] [-fdp finddproc-path]'
echo ' [-logfile logfilename] [-[no]dry]'
echo ' [-extrahosts "host1 host2 ..."] [-noextrahosts]'
echo ' [-masterhost host] program [arg1 arg2 ...]'
echo ''
......@@ -107,14 +124,19 @@ if [ $help = 1 ]; then
echo ' -cdn clusterdescname The name of the file describing the cluster.'
echo ' -hfn hostfilename The name of the generated hostfile.'
echo ' It defaults to /tmp/machinefile_$$'
echo ' -fdp finddproc-path Path where to find finddproc.'
echo ' -fdp finddproc-path Path where to find finddistproc.'
echo ' Default is empty.'
echo ' -logfile logfilename The general name of the subprocesses log files.'
echo ' They are suffixed with a sequence number.'
echo ' -dry Do a dry run (default is -nodry).'
echo ' -mode mode mode can be mpi, single, or a number.'
echo ' A number denotes that sockets have to be used'
echo ' and defines the port to be used.'
echo ' A number means that ssh is used to start the programs and'
echo ' defines the socket port the programs can use (if needed).'
echo ' Single means a single process is started using memory'
echo ' communication.'
echo ' -masterhost host The name of the host the master runs on.'
echo ' The default is localhost.'
echo ' -nomasterhost means that no master process is started.'
echo ' -extrahosts hosts The hosts to be used for extra processes (e.g. solvers).'
echo ' Multiple hosts have to be separated by whitespace'
echo ' and enclosed in quotes.'
......@@ -155,7 +177,9 @@ np=`wc -l $hfn | awk '{print $1}'`
# Run the program as needed.
if test "$modxx" = "mpi"; then
echo "mpirun -np $np -machinefile $hfn $program $@"
sed -e "s/#.*//" $hfn > ${hfn}_tmp
mv ${hfn}_tmp $hfn
echo "mpirun -np $np -machinefile $hfn $program" "$@"
if test $dry = 0; then
mpirun -np $np -machinefile $hfn $program "$@"
fi
......@@ -165,6 +189,6 @@ elif test "$modxx" = "single"; then
$program "$@"
fi
else
echo "socketrun $hfn $program $@"
$pgmpath/socketrun $dry $hfn $modxx $program "$@"
echo "socketrun $dry $hfn $modxx $logfile $program" "$@"
$pgmpath/socketrun $dry $hfn $modxx "$logfile" $program "$@"
fi
......@@ -16,6 +16,7 @@ if [ $STATUS != 0 ]; then
fi
# Output the result in order.
sleep 1
echo "Run1 ..."
cat tSocketConnection_tmp.outs1 tSocketConnection_tmp.outc1
......@@ -35,6 +36,7 @@ if [ $STATUS != 0 ]; then
fi
# Output the result in order.
sleep 1
echo "Run2 ..."
cat tSocketConnection_tmp.outs2 tSocketConnection_tmp.outc2
exit 0
......@@ -18,89 +18,40 @@ void checkVds (const VdsPartDesc& vds, double endTime)
ASSERT (vds.getName() == "/usr/local/xyx");
ASSERT (vds.getFileSys() == "node1:/usr");
ASSERT (vds.getStartTime() == 0);
ASSERT (vds.getStepTime() == 0.5);
ASSERT (vds.getEndTime() == endTime);
ASSERT (vds.getNChan().size() == 2);
ASSERT (vds.getNChan()[0] == 64);
ASSERT (vds.getNChan()[1] == 128);
ASSERT (vds.getStartFreqs().size() == 2);
ASSERT (vds.getNChan()[0] == 2);
ASSERT (vds.getNChan()[1] == 3);
ASSERT (vds.getStartFreqs().size() == 5);
ASSERT (vds.getStartFreqs()[0] == 20);
ASSERT (vds.getStartFreqs()[1] == 120);
ASSERT (vds.getEndFreqs().size() == 2);
ASSERT (vds.getEndFreqs()[0] == 100);
ASSERT (vds.getEndFreqs()[1] == 300);
ASSERT (vds.getAnt1().size() == 3);
ASSERT (vds.getAnt1()[0] == 0);
ASSERT (vds.getAnt1()[1] == 1);
ASSERT (vds.getAnt1()[2] == 2);
ASSERT (vds.getAnt2().size() == 3);
ASSERT (vds.getAnt2()[0] == 0);
ASSERT (vds.getAnt2()[1] == 1);
ASSERT (vds.getAnt2()[2] == 3);
ASSERT (vds.getStartFreqs()[1] == 60);
ASSERT (vds.getStartFreqs()[2] == 120);
ASSERT (vds.getStartFreqs()[3] == 180);
ASSERT (vds.getStartFreqs()[4] == 240);
ASSERT (vds.getEndFreqs().size() == 5);
ASSERT (vds.getEndFreqs()[0] == 60);
ASSERT (vds.getEndFreqs()[1] == 100);
ASSERT (vds.getEndFreqs()[2] == 180);
ASSERT (vds.getEndFreqs()[3] == 240);
ASSERT (vds.getEndFreqs()[4] == 300);
}
void check (const VdsDesc& vfds)
{
checkVds (vfds.getDesc(), 1);
checkVds (vfds.getParts()[0], 2);
ASSERT (vfds.getAntNames().size() == 4);
ASSERT (vfds.getAntNames()[0] == "RT0");
ASSERT (vfds.getAntNames()[1] == "RT1");
ASSERT (vfds.getAntNames()[2] == "RT2");
ASSERT (vfds.getAntNames()[3] == "RT3");
}
void tryAnt (const VdsDesc& vfds)
{
ASSERT (vfds.antNr("RT0") == 0);
ASSERT (vfds.antNr("RT1") == 1);
ASSERT (vfds.antNr("RT2") == 2);
ASSERT (vfds.antNr("RT3") == 3);
ASSERT (vfds.antNr("RT4") == -1);
{
vector<int> antNrs = vfds.antNrs(Regex("RT.*"));
ASSERT (antNrs.size() == 4);
ASSERT (antNrs[0] == 0);
ASSERT (antNrs[1] == 1);
ASSERT (antNrs[2] == 2);
ASSERT (antNrs[3] == 3);
}
{
vector<int> antNrs = vfds.antNrs(Regex(".*0"));
ASSERT (antNrs.size() == 1);
ASSERT (antNrs[0] == 0);
}
{
vector<int> antNrs = vfds.antNrs(Regex("RT2"));
ASSERT (antNrs.size() == 1);
ASSERT (antNrs[0] == 2);
}
{
vector<int> antNrs = vfds.antNrs(Regex("RT*"));
ASSERT (antNrs.size() == 0);
}
}
void doIt()
{
VdsPartDesc vds;
vds.setName ("/usr/local/xyx", "node1:/usr");
vds.setTimes (0, 1);
vds.addBand (64, 20, 100);
vds.addBand (128, 120, 300);
vector<int> ant1(3);
ant1[0] = 0;
ant1[1] = 1;
ant1[2] = 2;
vector<int> ant2(ant1);
ant2[2] = 3;
vds.setBaselines (ant1, ant2);
vector<string> antNames(4);
antNames[0] = "RT0";
antNames[1] = "RT1";
antNames[2] = "RT2";
antNames[3] = "RT3";
VdsDesc vfds(vds, antNames);
vds.setTimes(0,2);
vds.setTimes (0, 1, 0.5);
vds.addBand (2, 20, 100);
vds.addBand (3, 120, 300);
VdsDesc vfds(vds);
vds.setTimes(0, 2, 0.5);
vfds.addPart (vds);
check(vfds);
// Write into parset file.
......@@ -112,7 +63,6 @@ void doIt()
check(vfds2);
vfds = vfds2;
check(vfds);
tryAnt (vfds);
}
int main()
......
......@@ -18,39 +18,31 @@ void check (const VdsPartDesc& vds)
ASSERT (vds.getFileSys() == "node1:/usr");
ASSERT (vds.getStartTime() == 0);
ASSERT (vds.getEndTime() == 1);
ASSERT (vds.getStepTime() == 0.5);
ASSERT (vds.getNChan().size() == 2);
ASSERT (vds.getNChan()[0] == 64);
ASSERT (vds.getNChan()[1] == 128);
ASSERT (vds.getStartFreqs().size() == 2);
ASSERT (vds.getNChan()[0] == 2);
ASSERT (vds.getNChan()[1] == 3);
ASSERT (vds.getStartFreqs().size() == 5);
ASSERT (vds.getStartFreqs()[0] == 20);
ASSERT (vds.getStartFreqs()[1] == 120);
ASSERT (vds.getEndFreqs().size() == 2);
ASSERT (vds.getEndFreqs()[0] == 100);
ASSERT (vds.getEndFreqs()[1] == 300);
ASSERT (vds.getAnt1().size() == 3);
ASSERT (vds.getAnt1()[0] == 0);
ASSERT (vds.getAnt1()[1] == 1);
ASSERT (vds.getAnt1()[2] == 2);
ASSERT (vds.getAnt2().size() == 3);
ASSERT (vds.getAnt2()[0] == 0);
ASSERT (vds.getAnt2()[1] == 1);
ASSERT (vds.getAnt2()[2] == 3);
ASSERT (vds.getStartFreqs()[1] == 60);
ASSERT (vds.getStartFreqs()[2] == 120);
ASSERT (vds.getStartFreqs()[3] == 180);
ASSERT (vds.getStartFreqs()[4] == 240);
ASSERT (vds.getEndFreqs().size() == 5);
ASSERT (vds.getEndFreqs()[0] == 60);
ASSERT (vds.getEndFreqs()[1] == 100);
ASSERT (vds.getEndFreqs()[2] == 180);
ASSERT (vds.getEndFreqs()[3] == 240);
ASSERT (vds.getEndFreqs()[4] == 300);
}
void doIt()
{
VdsPartDesc vds;
vds.setName ("/usr/local/xyx", "node1:/usr");
vds.setTimes (0, 1);
vds.addBand (64, 20, 100);
vds.addBand (128, 120, 300);
vector<int> ant1(3);
ant1[0] = 0;
ant1[1] = 1;
ant1[2] = 2;
vector<int> ant2(ant1);
ant2[2] = 3;
vds.setBaselines (ant1, ant2);
vds.setTimes (0, 1, 0.5);
vds.addBand (2, 20, 100);
vds.addBand (3, 120, 300);
check(vds);
// Write into parset file.
ofstream fos("tVdsPartDesc_tmp.fil");
......
......@@ -2,40 +2,35 @@ Name = /usr/local/xyx
FileSys =
StartTime = 0
EndTime = 2
StepTime = 0.5
NChan = [64,128]
StartFreqs = [20,120]
EndFreqs = [100,300]
Ant1 = [0,1,2]
Ant2 = [0,1,3]
AntNames = [RT0,RT1,RT2,RT3]
NParts = 3
Part0.Name = /usr/local/xyx0
Part0.FileSys = node1:/usr
Part0.StartTime = 0
Part0.EndTime = 2
Part0.StepTime = 0.5
Part0.NChan = [64,128]
Part0.StartFreqs = [20,120]
Part0.EndFreqs = [100,300]
Part0.Ant1 = [0,1,2]
Part0.Ant2 = [0,1,3]
Part1.Name = /usr/local/xyx1
Part1.FileSys = node1:/usr
Part1.StartTime = 0
Part1.EndTime = 2
Part1.StepTime = 0.5
Part1.NChan = [64,128]
Part1.StartFreqs = [20,120]
Part1.EndFreqs = [100,300]
Part1.Ant1 = [0,1,2]
Part1.Ant2 = [0,1,3]
Part2.Name = /usr/local/xyx2
Part2.FileSys = node1:/usr
Part2.StartTime = 0
Part2.EndTime = 2
Part2.StepTime = 0.5
Part2.NChan = [64,128]
Part2.StartFreqs = [20,120]
Part2.EndFreqs = [100,300]
Part2.Ant1 = [0,1,2]
Part2.Ant2 = [0,1,3]
node1
node2
node1
node1#/usr/local/xyx0
node2#/usr/local/xyx1
node1#/usr/local/xyx2
......@@ -2,40 +2,35 @@ Name = /usr/local/xyx
FileSys =
StartTime = 0
EndTime = 2
StepTime = 0.5
NChan = [64,128]
StartFreqs = [20,120]
EndFreqs = [100,300]
Ant1 = [0,1,2]
Ant2 = [0,1,3]
AntNames = [RT0,RT1,RT2,RT3]
NParts = 3
Part0.Name = /usr/local/xyx0
Part0.FileSys = node1:/usr
Part0.StartTime = 0
Part0.EndTime = 2
Part0.StepTime = 0.5
Part0.NChan = [64,128]
Part0.StartFreqs = [20,120]
Part0.EndFreqs = [100,300]
Part0.Ant1 = [0,1,2]
Part0.Ant2 = [0,1,3]
Part1.Name = /usr/local/xyx1
Part1.FileSys = node1:/usr
Part1.StartTime = 0
Part1.EndTime = 2
Part1.StepTime = 0.5
Part1.NChan = [64,128]
Part1.StartFreqs = [20,120]
Part1.EndFreqs = [100,300]
Part1.Ant1 = [0,1,2]
Part1.Ant2 = [0,1,3]
Part2.Name = /usr/local/xyx2
Part2.FileSys = node1:/usr
Part2.StartTime = 0
Part2.EndTime = 2
Part2.StepTime = 0.5
Part2.NChan = [64,128]
Part2.StartFreqs = [20,120]
Part2.EndFreqs = [100,300]
Part2.Ant1 = [0,1,2]
Part2.Ant2 = [0,1,3]
......@@ -6,16 +6,16 @@ fi
echo ''
$srcdir/../src/startdistproc -dsn tstartdproc.in_vd -cdn tstartdproc.in_cd \
-mode single -dry -hfn tstartdproc_tmp.out1 -fdp ../src prog1 -arg arg2
-mode single -dry -hfn tstartdproc_tmp.out1 -fdp ../src prog1 -arg "a b"
cat tstartdproc_tmp.out1
echo ''
$srcdir/../src/startdistproc -dsn tstartdproc.in_vd -cdn tstartdproc.in_cd \
-mode mpi -dry -hfn tstartdproc_tmp.out2 -fdp ../src prog1 -arg arg2
-mode mpi -dry -hfn tstartdproc_tmp.out2 -fdp ../src prog1 -arg "a b"
cat tstartdproc_tmp.out2
echo ''
$srcdir/../src/startdistproc -dsn tstartdproc.in_vd -cdn tstartdproc.in_cd \
-mode 3851 -dry -hfn tstartdproc_tmp.out3 -fdp ../src prog1 -arg arg2
-mode 3851 -dry -hfn tstartdproc_tmp.out3 -fdp ../src prog1 -arg "a b"
cat tstartdproc_tmp.out3
prog1 -arg arg2
prog1 -arg a b
localhost
node1
node2
node1
node1#/usr/local/xyx0
node2#/usr/local/xyx1
node1#/usr/local/xyx2
mpirun -np 4 -machinefile tstartdproc_tmp.out2 prog1 -arg arg2
mpirun -np 4 -machinefile tstartdproc_tmp.out2 prog1 -arg a b
localhost
node1
node2
node1
socketrun tstartdproc_tmp.out3 prog1 -arg arg2
ssh localhost prog1 socket localhost 3851 4 0
ssh node1 prog1 socket localhost 3851 4 1
ssh node2 prog1 socket localhost 3851 4 2
ssh node1 prog1 socket localhost 3851 4 3
socketrun 1 tstartdproc_tmp.out3 3851 prog1 -arg a b
ssh localhost prog1 socket localhost 3851 4 0 localhost -arg a b
ssh node1 prog1 socket localhost 3851 4 1 /usr/local/xyx0 -arg a b
ssh node2 prog1 socket localhost 3851 4 2 /usr/local/xyx1 -arg a b
ssh node1 prog1 socket localhost 3851 4 3 /usr/local/xyx2 -arg a b
localhost
node1
node2
node1
node1#/usr/local/xyx0
node2#/usr/local/xyx1
node1#/usr/local/xyx2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment