Commit 586bda28 authored by hrchilds's avatar hrchilds

Update from July 25, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@43 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6daba546
......@@ -104,6 +104,9 @@
# Brad Whitlock, Mon May 5 09:38:47 PDT 2003
# I added the launcher directory.
#
# Brad Whitlock, Thu Jun 19 13:12:07 PST 2003
# I removed the splashscreen.
#
##############################################################################
@SET_MAKE@
......@@ -113,7 +116,7 @@
DISTRIB=configure configure.in VERSION
SUBDIRS=include lib bin common @VTKQT@ visit_vtk components engine \
launcher @METADATA_SERVER@ @VIEWER@ @SPLASHSCREEN@ @GUI@ @VISITPY@ \
launcher @METADATA_SERVER@ @VIEWER@ @GUI@ @VISITPY@ \
@JAVA_TARGET@ plots operators databases help tools
#
......
# Copyright 2000 - 2000
# Copyright 2000 - 2003
# The Regents of the University of California.
# All rights reserved.
#
......@@ -50,7 +50,7 @@ moc:
fi
clean:
$(RM) moc
$(RM) moc *.log *.timings
distclean: clean
......@@ -211,6 +211,9 @@ $0 = shift @ARGV;
# but since 1.0. This should be removed when the oldest previous
# version anyone will want to run is 1.1.4.
#
# Brad Whitlock, Thu Jun 19 13:22:25 PST 2003
# I removed splashscreen coding.
#
# Jeremy Meredith, Thu Jun 26 10:05:12 PDT 2003
# Added support for LANL's Q machine: I added a hack to update
# the user's paths. I allowed the VCL to be launched in parallel.
......@@ -405,7 +408,6 @@ while (scalar(@ARGV) > 0) {
elsif ($arg eq "-viewer" ) { $exe_name = "viewer"; }
elsif ($arg eq "-gui" ) { $exe_name = "gui"; }
elsif ($arg eq "-cli" ) { $exe_name = "cli"; }
elsif ($arg eq "-splashscreen" ) { $exe_name = "splashscreen"; }
elsif ($arg eq "-mdserver" ) { $exe_name = "mdserver"; }
elsif ($arg eq "-engine" ) { $exe_name = "engine"; }
elsif ($arg eq "-vcl" ) { $exe_name = "vcl"; }
......@@ -1167,12 +1169,10 @@ else
}
else
{
if ($exe_name ne "splashscreen")
{
@printcmd = ("$exe_name$ver", @visitargs);
chomp($printcmd[0] = `basename $printcmd[0]`);
print STDERR "Running: @printcmd\n";
}
@printcmd = ("$exe_name$ver", @visitargs);
chomp($printcmd[0] = `basename $printcmd[0]`);
print STDERR "Running: @printcmd\n";
if ($security_key_set) { push @visitcmd, "-key", $security_key; }
exec @visitcmd or die "Can't execute visit: $!\n";
}
......@@ -1185,12 +1185,10 @@ sub RunComponent {
my $security_key = shift;
my @visitcmd = shift;
if ($exe_name ne "splashscreen")
{
@printcmd = ("$exe_name$ver", @visitargs);
chomp($printcmd[0] = `basename $printcmd[0]`);
print STDERR "Running: @printcmd\n";
}
@printcmd = ("$exe_name$ver", @visitargs);
chomp($printcmd[0] = `basename $printcmd[0]`);
print STDERR "Running: @printcmd\n";
if ($security_key_set) { push @visitcmd, "-key", $security_key; }
exec @visitcmd or die "Can't execute visit: $!\n";
}
......
......@@ -127,11 +127,6 @@ main(int argc, char *argv[])
{
strcpy(component, "engine");
}
else if(ARG("-splashscreen"))
{
strcpy(component, "splashscreen");
printRunInfo = 0;
}
else if(ARG("-vcl"))
{
strcpy(component, "vcl");
......
......@@ -47,6 +47,9 @@
# Brad Whitlock, Mon May 5 09:40:21 PDT 2003
# Added launcher directory.
#
# Brad Whitlock, Thu Jun 19 13:17:43 PST 2003
# Removed splashscreen directory.
#
if [ ! -d engine ]; then
echo "invoke $0 from the root of the VisIt source tree" 2>&1
......@@ -57,7 +60,6 @@ PATH="$PATH:./clearcase_bin"
(
./clearcase_bin/mkman --quiet --norecursive --simple .
./clearcase_bin/mkman --quiet --norecursive --simple ./config-site
./clearcase_bin/mkman --quiet --recursive --simple ./splashscreen
./clearcase_bin/mkman --quiet --recursive --simple ./common
./clearcase_bin/mkman --quiet --recursive --simple ./visit_vtk
./clearcase_bin/mkman --quiet --recursive --simple ./engine
......
......@@ -115,6 +115,9 @@
# Eric Brugger, Tue Jul 22 08:31:45 PDT 2003
# Add visit-config-open and visit-config-closed to the distribution.
#
# Brad Whitlock, Thu Jun 19 13:16:57 PST 2003
# Removed splashscreen from the distribution.
#
#-----------------------------------------------------------------------
set DataFiles = "TRUE"
......@@ -465,7 +468,6 @@ if(-e $VisItDir/bin/engine_par) then
endif
cp $VisItDir/bin/gui $bindir/gui
cp $VisItDir/bin/mdserver $bindir/mdserver
cp $VisItDir/bin/splashscreen $bindir/splashscreen
cp $VisItDir/bin/vcl $bindir/vcl
cp $VisItDir/bin/viewer $bindir/viewer
# copy qt's moc, too
......
#
# Copyright 2000 - 2002
# Copyright 2000 - 2003
# The Regents of the University of California.
# All rights reserved.
#
......@@ -84,6 +84,9 @@
# Brad Whitlock, Wed Apr 2 10:45:46 PDT 2003
# I added a test program called testcomm.
#
# Brad Whitlock, Wed May 21 14:37:28 PST 2003
# I added PipeConnection.
#
##############################################################################
##
......
#include <PipeConnection.h>
#if defined(_WIN32)
#include <winsock2.h>
#else
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#endif
#include <CouldNotConnectException.h>
#include <snprintf.h>
#include <DebugStream.h>
#include <errno.h>
int PipeConnection::connectionCount = 0;
// ****************************************************************************
// Method: PipeConnection::PipeConnection
//
// Purpose:
// Constructor for the PipeConnection class.
//
// Notes: This constructor creates a pipe.
//
// Programmer: Brad Whitlock
// Creation: Wed May 21 13:47:29 PST 2003
//
// Modifications:
//
// ****************************************************************************
PipeConnection::PipeConnection(bool wm) : SocketConnection(-1)
{
writeMode = wm;
char pname[100];
SNPRINTF(pname, 100, "/tmp/fifo%08d.%d", getpid(), connectionCount++);
pipeName = pname;
ownsPipe = true;
if(mknod(pname, S_IFIFO | 0600, 0) == -1)
{
debug1 << "Could not create pipe: " << pipeName << ", errno=" << errno << endl;
EXCEPTION0(CouldNotConnectException);
}
}
// ****************************************************************************
// Method: PipeConnection::PipeConnection
//
// Purpose:
// Constructor for the PipeConnection class.
//
// Arguments:
// p0 : The second file descriptor.
// p1 : The first file descriptor.
//
// Programmer: Brad Whitlock
// Creation: Wed May 21 14:33:50 PST 2003
//
// Modifications:
//
// ****************************************************************************
PipeConnection::PipeConnection(const std::string &pname, bool wm) :
SocketConnection(-1)
{
pipeName = pname;
ownsPipe = false;
writeMode = wm;
}
// ****************************************************************************
// Method: PipeConnection::~PipeConnection
//
// Purpose:
// Destructor for the PipeConnection class.
//
// Programmer: Brad Whitlock
// Creation: Wed May 21 14:25:32 PST 2003
//
// Modifications:
//
// ****************************************************************************
PipeConnection::~PipeConnection()
{
if(ownsPipe)
{
unlink(pipeName.c_str());
}
}
// ****************************************************************************
// Method: PipeConnection::GetDescriptorName
//
// Purpose:
// Returns the name of the connection's descriptor.
//
// Returns: The name of the connection's descriptor.
//
// Programmer: Brad Whitlock
// Creation: Tue Jun 17 12:59:39 PDT 2003
//
// Modifications:
//
// ****************************************************************************
std::string
PipeConnection::GetDescriptorName(int = 0) const
{
return pipeName;
}
// ****************************************************************************
// Method: PipeConnection::Initialize
//
// Purpose:
// This method completes the pipe connection's initialization, which in this
// case means that it opens a handle to the named pipe.
//
// Programmer: Brad Whitlock
// Creation: Tue Jun 17 13:00:12 PST 2003
//
// Modifications:
//
// ****************************************************************************
void
PipeConnection::Initialize()
{
#if 1
int block = 0;
#else
int block = O_NDELAY;
#endif
if(writeMode)
{
debug1 << "PipeConnection::Initialize: before open for write" << endl;
descriptor = open(pipeName.c_str(), O_WRONLY | block);
}
else
{
debug1 << "PipeConnection::Initialize: before open for read" << endl;
descriptor = open(pipeName.c_str(), O_RDONLY | block);
debug1 << "PipeConnection::Initialize: before opening DUMMY for write" << endl;
int dummy = open(pipeName.c_str(), O_WRONLY | O_NDELAY);
debug1 << "PipeConnection::Initialize: after opening DUMMY for write. dummy="<<dummy << endl;
}
}
// ****************************************************************************
// Method: PipeConnection::CloseDescriptor
//
// Purpose:
// Closes the specified descriptor.
//
// Arguments:
// d : The descriptor to close.
//
// Programmer: Brad Whitlock
// Creation: Tue Jun 17 13:01:05 PST 2003
//
// Modifications:
//
// ****************************************************************************
void
PipeConnection::CloseDescriptor(DESCRIPTOR d)
{
close(d);
}
// ****************************************************************************
// Method: PipeConnection::SendBytes
//
// Purpose:
// Sends bytes into the pipe.
//
// Arguments:
// d : The descriptor being used to write to the pipe.
// buf : The buffer to be sent.
// count : The length of the buffer to be sent.
//
// Returns: The number of bytes that were written.
//
// Programmer: Brad Whitlock
// Creation: Tue Jun 17 13:01:33 PST 2003
//
// Modifications:
//
// ****************************************************************************
int
PipeConnection::SendBytes(DESCRIPTOR d, const unsigned char *buf, long count)
{
debug1 << "PipeConnection::SendBytes: before write(): count=" << count
<< ", descriptor=" << d << endl;
int a = write(d, buf, count);
debug1 << "PipeConnection::SendBytes: write() returned " << a << ", descriptor=" << d << endl;
debug1 << "PipeConnection::SendBytes: errno=" << errno << endl;
if(a < 0) a = 0;
return a;
}
// ****************************************************************************
// Method: PipeConnection::ReadBytes
//
// Purpose:
// Reads bytes from the pipe.
//
// Arguments:
// d : The descriptor being used to read from the pipe.
// buf : The destination buffer.
// count : The length of the destination buffer.
//
// Returns: The number of bytes that were read.
//
// Programmer: Brad Whitlock
// Creation: Tue Jun 17 13:01:33 PST 2003
//
// Modifications:
//
// ****************************************************************************
int
PipeConnection::ReadBytes(DESCRIPTOR d, unsigned char *buf, long bufSize)
{
debug1 << "PipeConnection::ReadBytes: before read()" << endl;
int a = read(d, buf, bufSize);
debug1 << "PipeConnection::ReadBytes: read() returned " << a << ", descriptor=" << d << endl;
debug1 << "PipeConnection::ReadBytes: errno=" << errno << endl;
if(a < 0) a = 0;
return a;
}
// ************************************************************************* //
// PipeConnection.h //
// ************************************************************************* //
#ifndef PIPE_CONNECTION_H
#define PIPE_CONNECTION_H
#include <SocketConnection.h>
#include <string>
// ****************************************************************************
// Class: PipeConnection
//
// Purpose:
// This is a buffered connection that can write itself onto a pipe.
//
// Notes:
//
// Programmer: Brad Whitlock
// Creation: Wed May 21 13:45:35 PST 2003
//
// Modifications:
//
// ****************************************************************************
class COMM_API PipeConnection : public SocketConnection
{
public:
PipeConnection(bool writeMode);
PipeConnection(const std::string &name, bool writeMode);
virtual ~PipeConnection();
virtual std::string GetDescriptorName(int = 0) const;
virtual void Initialize();
protected:
virtual void CloseDescriptor(DESCRIPTOR d);
virtual int SendBytes(DESCRIPTOR d, const unsigned char *buf, long count);
virtual int ReadBytes(DESCRIPTOR d, unsigned char *buf, long bufSize);
std::string pipeName;
bool ownsPipe;
bool writeMode;
static int connectionCount;
};
#endif
......@@ -36,5 +36,5 @@
##############################################################################
DISTRIB=*.xpm
NOT_DISTRIB=
NOT_DISTRIB=VisIt1.xcf
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -114,22 +114,26 @@ NewHandler(void)
// Jeremy Meredith, Wed Aug 7 13:17:01 PDT 2002
// Made it clamp the debug level to 0 through 5.
//
// Brad Whitlock, Wed Jun 18 13:35:02 PST 2003
// I made the debug logs have pids by default on Windows.
// Brad Whitlock, Wed May 21 17:03:56 PST 2003
// I made it write the command line arguments to the debug logs.
//
// Brad Whitlock, Wed Jun 18 11:15:22 PDT 2003
// I made it understand the -timing argument.
//
// ****************************************************************************
void
Init::Initialize(int &argc, char *argv[], int r, int n, bool strip)
{
int debuglevel = 0;
int i, debuglevel = 0;
#if defined(_WIN32)
bool usePid = true;
#else
bool usePid = false;
#endif
for (int i=1; i<argc; i++)
bool enableTimings = false;
for (i=1; i<argc; i++)
{
if (strcmp("-debug",argv[i]) == 0)
{
......@@ -162,6 +166,11 @@ Init::Initialize(int &argc, char *argv[], int r, int n, bool strip)
{
usePid = true;
}
else if (strcmp("-timing", argv[i]) == 0 ||
strcmp("-timings", argv[i]) == 0)
{
enableTimings = true;
}
}
char progname_wo_dir[256];
......@@ -189,8 +198,16 @@ Init::Initialize(int &argc, char *argv[], int r, int n, bool strip)
strcpy(progname, progname2);
}
// Initialize the debug streams and also add the command line arguments
// to the debug logs.
DebugStream::Initialize(progname, debuglevel);
for(i = 0; i < argc; ++i)
debug1 << argv[i] << " ";
debug1 << endl;
TimingsManager::Initialize(progname);
if(enableTimings)
visitTimer->Enable();
#if !defined(_WIN32)
set_new_handler(NewHandler);
......@@ -267,12 +284,18 @@ Init::GetExecutableName(void)
// Creation: Tue Mar 19 16:12:37 PST 2002
//
// Modifications:
//
// Brad Whitlock, Wed Jun 18 11:14:50 PDT 2003
// Added code to dump timings.
//
// ****************************************************************************
static void
Finalize(void)
{
// Dump timings.
if(visitTimer)
visitTimer->DumpTimings();
#if defined(_WIN32)
// Terminates use of the WS2_32.DLL, the Winsock DLL.
WSACleanup();
......
#include <AttributeGroup.h>
#include <EqualVal.h>
#include <Interpolator.h>
#include <string>
#include <Connection.h>
// Do a using statement.
using std::string;
//
......@@ -812,7 +814,6 @@ AttributeGroup::WriteType(Connection &conn, AttributeGroup::typeInfo &info)
{ // new scope
intVector *vi = (intVector *)(info.address);
intVector::iterator ipos;
conn.WriteInt(vi->size());
for(ipos = vi->begin(); ipos != vi->end(); ++ipos)
conn.WriteInt(*ipos);
......
......@@ -5,10 +5,10 @@
#include <string>
#include <exception>
#include <iostream.h>
#include <Connection.h>
// Forward declaration
class AttributeGroup;
class Connection;
class DataNode;
// ****************************************************************************
......
......@@ -909,7 +909,7 @@ PickVarInfo::CreateOutputString(std::string &os)
else
{
mixOffset = 0;
string spacing;
std::string spacing;
for (i = 0; i < numMatsPerZone.size(); i++)
{
if (names.size() > 0)
......
......@@ -170,7 +170,7 @@ PickVarInfo::CreateOutputString(std::string &os)
else
{
mixOffset = 0;
string spacing;
std::string spacing;
for (i = 0; i < numMatsPerZone.size(); i++)
{
if (names.size() > 0)
......
......@@ -176,7 +176,9 @@ Xfer::Remove(AttributeSubject *subject)
// Creation: Thu Jul 13 11:21:40 PDT 2000
//
// Modifications:
//
// Brad Whitlock, Fri Jul 25 12:16:17 PDT 2003
// Added debug coding.
//
// ****************************************************************************
void
......@@ -189,7 +191,12 @@ Xfer::Update(Subject *TheChangedSubject)
// Write out the subject's guido and message size.
output->WriteInt(subject->GetGuido());
output->WriteInt(subject->CalculateMessageSize(*output));
int sz = subject->CalculateMessageSize(*output);
output->WriteInt(sz);
debug5 << "Xfer::Update: Sending: opcode=" << subject->GetGuido()
<< ", len=" << sz
<< ", name=" << subject->TypeName().c_str() << endl;
// Write the things about the subject that have changed onto the
// output connection and flush it out to make sure it's sent.
......@@ -333,6 +340,10 @@ Xfer::ReadPendingMessages()
// Jeremy Meredith, Tue Mar 4 13:10:25 PST 2003
// Added length to the new buffer because MPIXfer needs it.
//
// Brad Whitlock, Fri Jul 25 12:14:56 PDT 2003
// Added debug messages and added code to skip unknown opcodes so we
// don't hang as easily if the protocol gets messed up somehow.
//
// ****************************************************************************
void
......@@ -348,10 +359,16 @@ Xfer::Process()
bufferedInput.ReadInt(&curOpcode);
bufferedInput.ReadInt(&curLength);
bool bytesNeedToBeSkipped = true;
if(curOpcode < subjectList.size())
{
if(subjectList[curOpcode])
{
debug5 << "Xfer::Process: Opcode=" << curOpcode
<< ", len=" << curLength
<< ", type="
<< subjectList[curOpcode]->TypeName().c_str() << endl;
// Read the object into its local copy.
subjectList[curOpcode]->Read(bufferedInput);
......@@ -359,8 +376,19 @@ Xfer::Process()
// it gets them while processing the Notify.
SetUpdate(false);
subjectList[curOpcode]->Notify();
bytesNeedToBeSkipped = false;
}
}
if(bytesNeedToBeSkipped)
{
debug1 << "Xfer::Process: Opcode " << curOpcode
<< " is unknown! Skipping " << curLength << " bytes."
<< endl;
unsigned char uchar;
for(int i = 0; i < curLength; ++i)
bufferedInput.Read(&uchar);
}
}
}
......
......@@ -150,6 +150,9 @@
# Added avtCoordSystemConvert, avtSamplePointToSurfaceFilter, and
# avtSimlarityTransformFilter.
#
# Hank Childs, Fri Jul 25 21:17:45 PDT 2003
# Renamed avtRelevantPointsFilter to avtCondenseDatasetFilter.
#
##############################################################################
@SET_MAKE@
......@@ -243,6 +246,7 @@ PrivateFilters_src= \
PublicFilters_src= \
PublicFilters/avtCompactTreeFilter.C \
PublicFilters/avtCondenseDatasetFilter.C \
PublicFilters/avtContourFilter.C \
PublicFilters/avtCoordSystemConvert.C \
PublicFilters/avtCurrentExtentFilter.C \
......@@ -255,7 +259,6 @@ PublicFilters_src= \
PublicFilters/avtPointToGlyphFilter.C \
PublicFilters/avtRayCompositer.C \
PublicFilters/avtRayTracer.C \
PublicFilters/avtRelevantPointsFilter.C \
PublicFilters/avtResampleFilter.C \
PublicFilters/avtSamplePointCommunicator.C \
PublicFilters/avtSamplePointExtractor.C \
......
// ************************************************************************* //
// avtRelevantPointsFilter.C //
// avtCondenseDatasetFilter.C //
// ************************************************************************* //
#include <avtRelevantPointsFilter.h>
#include <avtCondenseDatasetFilter.h>
#include <vtkPolyData.h>
#include <vtkPolyDataRelevantPointsFilter.h>
......@@ -13,7 +13,7 @@