Commit 437f4a62 authored by whitlocb's avatar whitlocb

I merged the RC into the trunk.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7582 18c085ea-50e0-402c-830e-de6fd14e8384
parent ad23fbef
......@@ -855,6 +855,9 @@ $fullusage = "$usage
'-debug_<compname> <level>' args are allowed.
-debug_engine_rank <r>
Restrict debug output to the specified rank.
-debug-processor-stride N
Have only every Nth processor output debug logs.
Prevents overwhelming parallel file systems.
-clobber_vlogs By default, VisIt maintains debug logs from the 5
most recent invokations or restarts of each VisIt
component. They are named something like
......
......@@ -224,6 +224,9 @@ NewHandler(void)
// Mark C. Miller, Tue Apr 21 14:24:18 PDT 2009
// Added logic to manage buffering of debug logs; an extra 'b' after level.
//
// Brad Whitlock, Thu Jun 18 15:21:06 PDT 2009
// I added -debug-processor-stride
//
// ****************************************************************************
void
......@@ -234,7 +237,7 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
return;
initializeCalled = true;
int i, debuglevel = 0, engineDebugRank=-1;
int i, debuglevel = 0, engineDebugRank=-1, debugStride = 1;
#if defined(_WIN32)
bool usePid = true;
#else
......@@ -307,6 +310,16 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
}
}
}
else if (strcmp("-debug-processor-stride", argv[i]) == 0)
{
if(i+1 < argc)
{
debugStride = atoi(argv[i+1]);
++i;
}
else
cerr << "Warning: debug processor stride not specified." << endl;
}
else if (strcmp("-clobber_vlogs", argv[i]) == 0)
{
clobberVlogs = true;
......@@ -390,6 +403,13 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
debuglevel = 0;
}
// Turn off the processors that don't meet the debug stride.
if(n > 1 && debuglevel >= 1)
{
if((r % debugStride) > 0)
debuglevel = 0;
}
// Initialize the debug streams and also add the command line arguments
// to the debug logs.
DebugStreamFull::Initialize(progname, debuglevel, sigs, clobberVlogs, bufferDebug);
......
......@@ -23,7 +23,7 @@ if test "$BUILD_MODE" == "ComputeNode"; then
# Set the parallel options
BGP="/bgsys/drivers/ppcfloor"
MPI_LDFLAGS="-L$BGP/comm/lib -Wl,-rpath,$BGP/comm/default/lib -L$BGP/comm/sys/lib -Wl,-rpath,$BGP/comm/sys/lib -L$BGP/runtime/SPI -Wl,-rpath,$BGP/runtime/SPI $LDFLAGS"
CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK -I$BGP/comm/include $CPPFLAGS"
CPPFLAGS="-DVISIT_BLUE_GENE_P -DMPICH_IGNORE_CXX_SEEK -I$BGP/comm/include $CPPFLAGS"
MPI_LIBS="$MPI_LDFLAGS -lcxxmpich.cnk -lmpich.cnk -ldcmfcoll.cnk -ldcmf.cnk -lpthread -lrt -L$BGP/runtime/SPI -lSPI.cna"
else
# These are the options that are for xlc. They are right but there's an
......
......@@ -222,6 +222,16 @@ typedef struct _GroupInfo
// Replaced DBtoc* arg to ReadXXX functions with list of names of objects
// to process. Added RemoveMultixxx functions to help manage cached
// multi-objects in presence of exceptions.
//
// Mark C. Miller, Mon Mar 16 23:33:32 PDT 2009
// Removed usingOldExtents. Moved logic for 'old' extents interface to
// CommonPluginInfo where old (obsolete) options can be merged with current
// interface.
//
// Mark C. Miller, Thu Jun 18 20:54:17 PDT 2009
// Replaced DBtoc* arg to ReadXXX functions with list of names of objects
// to process. Added RemoveMultixxx functions to help manage cached
// multi-objects in presence of exceptions.
// ****************************************************************************
class avtSiloFileFormat : public avtSTMDFileFormat
......
......@@ -1364,6 +1364,12 @@ Engine::ConnectViewer(int *argc, char **argv[])
// Tom Fogal, Wed May 27 14:07:19 MDT 2009
// Removed a duplicate debug statement.
//
// Brad Whitlock, Fri Jun 19 09:05:31 PDT 2009
// I rewrote the code for receiving the command to other processors.
// Instead of receiving 1..N 1K size messages per command, with N being
// more common, we now receive 1 size message and then we receive the
// entire command at once.
//
// ****************************************************************************
void
......@@ -1403,18 +1409,29 @@ Engine::PAR_EventLoop()
debug5 << "Resetting idle timeout to " << idleTimeoutMins << " minutes." << endl;
ResetTimeout(idleTimeoutMins * 60);
// Get state information from the UI process.
MPIXfer::VisIt_MPI_Bcast((void *)&par_buf, 1,
PAR_STATEBUFFER, 0, VISIT_MPI_COMM);
// Get the next message length.
int msgLength = 0;
MPIXfer::VisIt_MPI_Bcast((void *)&msgLength, 1, MPI_INT,
0, VISIT_MPI_COMM);
// Read the incoming message. Use regular MPI_Bcast since this
// message is guaranteed to come right after the other one.
#ifdef VISIT_BLUE_GENE_P
// Make the buffer be 32-byte aligned
unsigned char *buf = 0;
posix_memalign((void **)&buf, 32, msgLength);
#else
unsigned char *buf = (unsigned char*)malloc(msgLength * sizeof(unsigned char));
#endif
MPI_Bcast((void *)buf, msgLength, MPI_UNSIGNED_CHAR, 0, VISIT_MPI_COMM);
par_conn.Append(buf, msgLength);
free(buf);
// We have work to do, so reset the alarm.
idleTimeoutEnabled = false;
debug5 << "Resetting execution timeout to " << executionTimeoutMins << " minutes." << endl;
ResetTimeout(executionTimeoutMins * 60);
// Add the state information to the connection.
par_conn.Append((unsigned char *)par_buf.buffer, par_buf.nbytes);
// Process the state information.
xfer->Process();
......
......@@ -238,8 +238,10 @@ MPIXfer::SendInterruption(int mpiInterruptTag)
// Mark C. Miller, Mon Jan 22 22:09:01 PST 2007
// Changed MPI_COMM_WORLD to VISIT_MPI_COMM
//
// Tom Fogal, Tue May 26 21:56:21 MDT 2009
// Initialize buffer to avoid sending uninitialized mem in subsequent bcast.
// Brad Whitlock, Fri Jun 19 09:05:31 PDT 2009
// I rewrote the code for sending the command to other processors.
// Instead of sending 1..N 1K size messages, with N being more common, we
// now send 1 size message and then we send the entire command at once.
//
// ****************************************************************************
......@@ -260,55 +262,58 @@ MPIXfer::Process()
{
if(PAR_UIProcess())
{
int i;
unsigned char c;
char *cptr;
PAR_StateBuffer buf = {0};
BufferConnection newInput;
int i, msgLength = curLength + sizeof(int)*2;
#ifdef VISIT_BLUE_GENE_P
// Make the buffer be 32-byte aligned
unsigned char *buf = 0;
posix_memalign((void **)&buf, 32, msgLength);
#else
unsigned char *buf = (unsigned char*)malloc(msgLength * sizeof(unsigned char));
#endif
unsigned char *tmp = buf;
// Add the message's opcode and length into the buffer
// that we'll broadcast to other processes so their
// Xfer objects know what's up.
buf.nbytes = 0;
cptr = (char *)&curOpcode;
unsigned char *cptr = (unsigned char *)&curOpcode;
for(i = 0; i < sizeof(int); ++i)
buf.buffer[buf.nbytes++] = *cptr++;
cptr = (char *)&curLength;
*tmp++ = *cptr++;
cptr = (unsigned char *)&curLength;
for(i = 0; i < sizeof(int); ++i)
buf.buffer[buf.nbytes++] = *cptr++;
*tmp++ = *cptr++;
// Transcribe the message into a buffer that we'll
// communicate to other processes and also a new
// temporary connection that we'll feed to the interested
// object.
BufferConnection newInput;
unsigned char c;
for(i = curLength; i > 0; --i)
{
// Read a character from the input connection.
bufferedInput.ReadChar(&c);
buf.buffer[buf.nbytes++] = c;
*tmp++ = c;
newInput.WriteChar(c);
// Buffer or send it to other processes.
if(buf.nbytes >= INPUT_BUFFER_SIZE)
{
if (slaveProcessInstruction)
slaveProcessInstruction();
VisIt_MPI_Bcast((void *)&buf, 1, PAR_STATEBUFFER,
0, VISIT_MPI_COMM);
buf.nbytes = 0;
}
}
// Write last part of message if it exists.
if(buf.nbytes > 0)
{
if (slaveProcessInstruction)
slaveProcessInstruction();
VisIt_MPI_Bcast((void *)&buf, 1, PAR_STATEBUFFER,
// Send the current opcode and message length. Note that we
// use VisIt_MPI_Bcast for this call since we need to match
// what's happening in PAR_EventLoop in the engine. This version
// of bcast allows engines to reduce their activity instead of
// using a spin-wait bcast.
if (slaveProcessInstruction)
slaveProcessInstruction();
VisIt_MPI_Bcast((void *)&msgLength, 1, MPI_INT,
0, VISIT_MPI_COMM);
}
// Use regular bcast since the previous call to bcast will
// already have gotten the attention of the other processors.
if (slaveProcessInstruction)
slaveProcessInstruction();
MPI_Bcast((void *)buf, msgLength, MPI_UNSIGNED_CHAR,
0, VISIT_MPI_COMM);
free(buf);
// Read the object from the newInput into its local copy.
subjectList[curOpcode]->Read(newInput);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment