Commit abdd5f77 authored by js9's avatar js9
Browse files

merge from 2.0RC: xdmf updates and host profile saving improvements

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11102 18c085ea-50e0-402c-830e-de6fd14e8384
parent a22f7aa1
......@@ -195,9 +195,13 @@ SET(SILO_LIBRARY_DIR ${VISIT_LIBRARY_DIR} ${VISIT_ARCHIVE_DIR})
SET(SILO_LIB @SILO_LIB@)
SET(VISUS_INCLUDE_DIR ${VISIT_INCLUDE_DIR}/visus/include)
SET(VISUS_INCLUDE_DIR ${VISIT_LIBRARY_DIR} ${VISIT_ARCHIVE_DIR})
SET(VISUS_LIBRARY_DIR ${VISIT_LIBRARY_DIR} ${VISIT_ARCHIVE_DIR})
SET(VISUS_LIB @VISUS_LIB@)
SET(XDMF_INCLUDE_DIR ${VISIT_INCLUDE_DIR}/xdmf/include)
SET(XDMF_LIBRARY_DIR ${VISIT_LIBRARY_DIR} ${VISIT_ARCHIVE_DIR})
SET(XDMF_LIB @XDMF_LIB@)
# Set up TUVOK
SET(TUVOK_LIB tuvok)
......
......@@ -299,6 +299,7 @@ VISIT_3RDPARTY_VAR(VISIT_NETCDF_DIR "Path containing the NETCDF library's inc
VISIT_3RDPARTY_VAR(VISIT_SILO_DIR "Path containing the Silo library's include and lib" SILO_DIR)
VISIT_3RDPARTY_DEP(VISIT_SILO_LIBDEP "Silo library dependencies" SILO_LIBDEP)
VISIT_3RDPARTY_VAR(VISIT_VISUS_DIR "Path containing the ViSUS library's include and lib" VISUS_DIR)
VISIT_3RDPARTY_VAR(VISIT_XDMF_DIR "Path containing the Xdmf library's include and lib" XDMF_DIR)
#-----------------------------------------------------------------------------
# Read the version
......@@ -736,6 +737,12 @@ IF(VISUS_FOUND)
SET(HAVE_LIBVISUS 1)
ENDIF(VISUS_FOUND)
# Configure Xdmf support.
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindXdmf.cmake)
IF(XDMF_FOUND)
SET(HAVE_LIBXDMF 1)
ENDIF(XDMF_FOUND)
IF(CMAKE_HOST_UNIX)
SET(ZLIB_LIB z)
......
......@@ -511,17 +511,23 @@ LaunchProfile::SelectAll()
// Method: LaunchProfile::CreateNode
//
// Purpose:
// This method creates a DataNode representation of the object so it can be saved to a config file.
// This method creates a DataNode representation of the object so it can
// be saved to a config file.
//
// Note: Autogenerated by xml2atts.
// This differs from the auto-generated one in the following ways:
// - it checks to see if something is selected when saving instead
// of checking to see if it differs from the default-constructor version,
// which lets us select user-set values which differ from system-global
// ones and save only those fields
// - if any field was saved, we always add the profile name, as that's how
// we identify which launch profile is which
//
// Programmer: xml2atts
// Creation: omitted
// Programmer: Jeremy Meredith
// Creation: April 29, 2010
//
// Modifications:
//
// ****************************************************************************
bool
LaunchProfile::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
{
......@@ -533,210 +539,208 @@ LaunchProfile::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd
// Create a node for LaunchProfile.
DataNode *node = new DataNode("LaunchProfile");
if(completeSave || !FieldsEqual(ID_profileName, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("profileName", profileName));
}
if(completeSave || !FieldsEqual(ID_timeout, &defaultObject))
if(completeSave || IsSelected(ID_timeout))
{
addToParent = true;
node->AddNode(new DataNode("timeout", timeout));
}
if(completeSave || !FieldsEqual(ID_numProcessors, &defaultObject))
if(completeSave || IsSelected(ID_numProcessors))
{
addToParent = true;
node->AddNode(new DataNode("numProcessors", numProcessors));
}
if(completeSave || !FieldsEqual(ID_numNodesSet, &defaultObject))
if(completeSave || IsSelected(ID_numNodesSet))
{
addToParent = true;
node->AddNode(new DataNode("numNodesSet", numNodesSet));
}
if(completeSave || !FieldsEqual(ID_numNodes, &defaultObject))
if(completeSave || IsSelected(ID_numNodes))
{
addToParent = true;
node->AddNode(new DataNode("numNodes", numNodes));
}
if(completeSave || !FieldsEqual(ID_partitionSet, &defaultObject))
if(completeSave || IsSelected(ID_partitionSet))
{
addToParent = true;
node->AddNode(new DataNode("partitionSet", partitionSet));
}
if(completeSave || !FieldsEqual(ID_partition, &defaultObject))
if(completeSave || IsSelected(ID_partition))
{
addToParent = true;
node->AddNode(new DataNode("partition", partition));
}
if(completeSave || !FieldsEqual(ID_bankSet, &defaultObject))
if(completeSave || IsSelected(ID_bankSet))
{
addToParent = true;
node->AddNode(new DataNode("bankSet", bankSet));
}
if(completeSave || !FieldsEqual(ID_bank, &defaultObject))
if(completeSave || IsSelected(ID_bank))
{
addToParent = true;
node->AddNode(new DataNode("bank", bank));
}
if(completeSave || !FieldsEqual(ID_timeLimitSet, &defaultObject))
if(completeSave || IsSelected(ID_timeLimitSet))
{
addToParent = true;
node->AddNode(new DataNode("timeLimitSet", timeLimitSet));
}
if(completeSave || !FieldsEqual(ID_timeLimit, &defaultObject))
if(completeSave || IsSelected(ID_timeLimit))
{
addToParent = true;
node->AddNode(new DataNode("timeLimit", timeLimit));
}
if(completeSave || !FieldsEqual(ID_launchMethodSet, &defaultObject))
if(completeSave || IsSelected(ID_launchMethodSet))
{
addToParent = true;
node->AddNode(new DataNode("launchMethodSet", launchMethodSet));
}
if(completeSave || !FieldsEqual(ID_launchMethod, &defaultObject))
if(completeSave || IsSelected(ID_launchMethod))
{
addToParent = true;
node->AddNode(new DataNode("launchMethod", launchMethod));
}
if(completeSave || !FieldsEqual(ID_forceStatic, &defaultObject))
if(completeSave || IsSelected(ID_forceStatic))
{
addToParent = true;
node->AddNode(new DataNode("forceStatic", forceStatic));
}
if(completeSave || !FieldsEqual(ID_forceDynamic, &defaultObject))
if(completeSave || IsSelected(ID_forceDynamic))
{
addToParent = true;
node->AddNode(new DataNode("forceDynamic", forceDynamic));
}
if(completeSave || !FieldsEqual(ID_active, &defaultObject))
if(completeSave || IsSelected(ID_active))
{
addToParent = true;
node->AddNode(new DataNode("active", active));
}
if(completeSave || !FieldsEqual(ID_arguments, &defaultObject))
if(completeSave || IsSelected(ID_arguments))
{
addToParent = true;
node->AddNode(new DataNode("arguments", arguments));
}
if(completeSave || !FieldsEqual(ID_parallel, &defaultObject))
if(completeSave || IsSelected(ID_parallel))
{
addToParent = true;
node->AddNode(new DataNode("parallel", parallel));
}
if(completeSave || !FieldsEqual(ID_launchArgsSet, &defaultObject))
if(completeSave || IsSelected(ID_launchArgsSet))
{
addToParent = true;
node->AddNode(new DataNode("launchArgsSet", launchArgsSet));
}
if(completeSave || !FieldsEqual(ID_launchArgs, &defaultObject))
if(completeSave || IsSelected(ID_launchArgs))
{
addToParent = true;
node->AddNode(new DataNode("launchArgs", launchArgs));
}
if(completeSave || !FieldsEqual(ID_sublaunchArgsSet, &defaultObject))
if(completeSave || IsSelected(ID_sublaunchArgsSet))
{
addToParent = true;
node->AddNode(new DataNode("sublaunchArgsSet", sublaunchArgsSet));
}
if(completeSave || !FieldsEqual(ID_sublaunchArgs, &defaultObject))
if(completeSave || IsSelected(ID_sublaunchArgs))
{
addToParent = true;
node->AddNode(new DataNode("sublaunchArgs", sublaunchArgs));
}
if(completeSave || !FieldsEqual(ID_sublaunchPreCmdSet, &defaultObject))
if(completeSave || IsSelected(ID_sublaunchPreCmdSet))
{
addToParent = true;
node->AddNode(new DataNode("sublaunchPreCmdSet", sublaunchPreCmdSet));
}
if(completeSave || !FieldsEqual(ID_sublaunchPreCmd, &defaultObject))
if(completeSave || IsSelected(ID_sublaunchPreCmd))
{
addToParent = true;
node->AddNode(new DataNode("sublaunchPreCmd", sublaunchPreCmd));
}
if(completeSave || !FieldsEqual(ID_sublaunchPostCmdSet, &defaultObject))
if(completeSave || IsSelected(ID_sublaunchPostCmdSet))
{
addToParent = true;
node->AddNode(new DataNode("sublaunchPostCmdSet", sublaunchPostCmdSet));
}
if(completeSave || !FieldsEqual(ID_sublaunchPostCmd, &defaultObject))
if(completeSave || IsSelected(ID_sublaunchPostCmd))
{
addToParent = true;
node->AddNode(new DataNode("sublaunchPostCmd", sublaunchPostCmd));
}
if(completeSave || !FieldsEqual(ID_machinefileSet, &defaultObject))
if(completeSave || IsSelected(ID_machinefileSet))
{
addToParent = true;
node->AddNode(new DataNode("machinefileSet", machinefileSet));
}
if(completeSave || !FieldsEqual(ID_machinefile, &defaultObject))
if(completeSave || IsSelected(ID_machinefile))
{
addToParent = true;
node->AddNode(new DataNode("machinefile", machinefile));
}
if(completeSave || !FieldsEqual(ID_visitSetsUpEnv, &defaultObject))
if(completeSave || IsSelected(ID_visitSetsUpEnv))
{
addToParent = true;
node->AddNode(new DataNode("visitSetsUpEnv", visitSetsUpEnv));
}
if(completeSave || !FieldsEqual(ID_canDoHWAccel, &defaultObject))
if(completeSave || IsSelected(ID_canDoHWAccel))
{
addToParent = true;
node->AddNode(new DataNode("canDoHWAccel", canDoHWAccel));
}
if(completeSave || !FieldsEqual(ID_havePreCommand, &defaultObject))
if(completeSave || IsSelected(ID_havePreCommand))
{
addToParent = true;
node->AddNode(new DataNode("havePreCommand", havePreCommand));
}
if(completeSave || !FieldsEqual(ID_hwAccelPreCommand, &defaultObject))
if(completeSave || IsSelected(ID_hwAccelPreCommand))
{
addToParent = true;
node->AddNode(new DataNode("hwAccelPreCommand", hwAccelPreCommand));
}
if(completeSave || !FieldsEqual(ID_havePostCommand, &defaultObject))
if(completeSave || IsSelected(ID_havePostCommand))
{
addToParent = true;
node->AddNode(new DataNode("havePostCommand", havePostCommand));
}
if(completeSave || !FieldsEqual(ID_hwAccelPostCommand, &defaultObject))
if(completeSave || IsSelected(ID_hwAccelPostCommand))
{
addToParent = true;
node->AddNode(new DataNode("hwAccelPostCommand", hwAccelPostCommand));
}
if (addToParent)
{
node->AddNode(new DataNode("profileName", profileName));
}
// Add the node to the parent node.
if(addToParent || forceAdd)
......@@ -746,7 +750,6 @@ LaunchProfile::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd
return (addToParent || forceAdd);
}
// ****************************************************************************
// Method: LaunchProfile::SetFromNode
//
......@@ -1833,3 +1836,91 @@ LaunchProfile::FieldsEqual(int index_, const AttributeGroup *rhs) const
// User-defined methods.
///////////////////////////////////////////////////////////////////////////////
// ****************************************************************************
// Method: LaunchProfile::SelectOnlyDifferingFields
//
// Purpose:
// Select only fields which differ from a compared attribute.
//
// Arguments:
// other the profile to compare against
//
// Programmer: Jeremy Meredith
// Creation: April 29, 2010
//
// ****************************************************************************
void
LaunchProfile::SelectOnlyDifferingFields(LaunchProfile &other)
{
UnSelectAll();
if (profileName != other.GetProfileName())
Select(ID_profileName, (void *)&profileName);
if (timeout != other.GetTimeout())
Select(ID_timeout, (void *)&timeout);
if (numProcessors != other.GetNumProcessors())
Select(ID_numProcessors, (void *)&numProcessors);
if (numNodesSet != other.GetNumNodesSet())
Select(ID_numNodesSet, (void *)&numNodesSet);
if (numNodes != other.GetNumNodes())
Select(ID_numNodes, (void *)&numNodes);
if (partitionSet != other.GetPartitionSet())
Select(ID_partitionSet, (void *)&partitionSet);
if (partition != other.GetPartition())
Select(ID_partition, (void *)&partition);
if (bankSet != other.GetBankSet())
Select(ID_bankSet, (void *)&bankSet);
if (bank != other.GetBank())
Select(ID_bank, (void *)&bank);
if (timeLimitSet != other.GetTimeLimitSet())
Select(ID_timeLimitSet, (void *)&timeLimitSet);
if (timeLimit != other.GetTimeLimit())
Select(ID_timeLimit, (void *)&timeLimit);
if (launchMethodSet != other.GetLaunchMethodSet())
Select(ID_launchMethodSet, (void *)&launchMethodSet);
if (launchMethod != other.GetLaunchMethod())
Select(ID_launchMethod, (void *)&launchMethod);
if (forceStatic != other.GetForceStatic())
Select(ID_forceStatic, (void *)&forceStatic);
if (forceDynamic != other.GetForceDynamic())
Select(ID_forceDynamic, (void *)&forceDynamic);
if (active != other.GetActive())
Select(ID_active, (void *)&active);
if (arguments != other.GetArguments())
Select(ID_arguments, (void *)&arguments);
if (parallel != other.GetParallel())
Select(ID_parallel, (void *)&parallel);
if (launchArgsSet != other.GetLaunchArgsSet())
Select(ID_launchArgsSet, (void *)&launchArgsSet);
if (launchArgs != other.GetLaunchArgs())
Select(ID_launchArgs, (void *)&launchArgs);
if (sublaunchArgsSet != other.GetSublaunchArgsSet())
Select(ID_sublaunchArgsSet, (void *)&sublaunchArgsSet);
if (sublaunchArgs != other.GetSublaunchArgs())
Select(ID_sublaunchArgs, (void *)&sublaunchArgs);
if (sublaunchPreCmdSet != other.GetSublaunchPreCmdSet())
Select(ID_sublaunchPreCmdSet, (void *)&sublaunchPreCmdSet);
if (sublaunchPreCmd != other.GetSublaunchPreCmd())
Select(ID_sublaunchPreCmd, (void *)&sublaunchPreCmd);
if (sublaunchPostCmdSet != other.GetSublaunchPostCmdSet())
Select(ID_sublaunchPostCmdSet, (void *)&sublaunchPostCmdSet);
if (sublaunchPostCmd != other.GetSublaunchPostCmd())
Select(ID_sublaunchPostCmd, (void *)&sublaunchPostCmd);
if (machinefileSet != other.GetMachinefileSet())
Select(ID_machinefileSet, (void *)&machinefileSet);
if (machinefile != other.GetMachinefile())
Select(ID_machinefile, (void *)&machinefile);
if (visitSetsUpEnv != other.GetVisitSetsUpEnv())
Select(ID_visitSetsUpEnv, (void *)&visitSetsUpEnv);
if (canDoHWAccel != other.GetCanDoHWAccel())
Select(ID_canDoHWAccel, (void *)&canDoHWAccel);
if (havePreCommand != other.GetHavePreCommand())
Select(ID_havePreCommand, (void *)&havePreCommand);
if (hwAccelPreCommand != other.GetHwAccelPreCommand())
Select(ID_hwAccelPreCommand, (void *)&hwAccelPreCommand);
if (havePostCommand != other.GetHavePostCommand())
Select(ID_havePostCommand, (void *)&havePostCommand);
if (hwAccelPostCommand != other.GetHwAccelPostCommand())
Select(ID_hwAccelPostCommand, (void *)&hwAccelPostCommand);
}
......@@ -196,6 +196,8 @@ public:
virtual std::string GetFieldTypeName(int index) const;
virtual bool FieldsEqual(int index, const AttributeGroup *rhs) const;
// User-defined methods
void SelectOnlyDifferingFields(LaunchProfile &other);
// IDs that can be used to identify fields in case statements
enum {
......
<?xml version="1.0"?>
<Attribute name="LaunchProfile" purpose="This class contains information needed to launch a VisIt engine." persistent="true" keyframe="true" exportAPI="STATE_API" exportInclude="state_exports.h">
<Attribute name="LaunchProfile" purpose="This class contains information needed to launch a VisIt engine." persistent="true" keyframe="true" exportAPI="STATE_API" exportInclude="state_exports.h" codefile="LaunchProfile.code">
<Field name="profileName" label="profileName" type="string">
notset
</Field>
......@@ -90,4 +90,8 @@
</Field>
<Field name="hwAccelPostCommand" label="Post-command for hardware acceleration" type="string" enabler="havePostCommand:true">
</Field>
<Function name="CreateNode" user="false" member="true">
</Function>
<Function name="SelectOnlyDifferingFields" user="true" member="true">
</Function>
</Attribute>
......@@ -524,117 +524,80 @@ MachineProfile::CreateSubAttributeGroup(int)
// Method: MachineProfile::CreateNode
//
// Purpose:
// This method creates a DataNode representation of the object so it can be saved to a config file.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
// This method creates a DataNode representation of the object so it can
// be saved to a config file.
//
// This differs from the auto-generated one in the following ways:
// - it checks to see if something is selected when saving instead
// of checking to see if it differs from the default-constructor version,
// which lets us select user-set values which differ from system-global
// ones and save only those fields
// - it always adds hostNickname, as that's how we identify which
// host profile is which
// - we use "completeSave" as the cue as to whether our sub-attribute
// groups add themselves, overriding forceAdd when descending to them
// - since host nickname is always saved, we always add to the parent node
//
// Programmer: Jeremy Meredith
// Creation: April 29, 2010
//
// Modifications:
//
// ****************************************************************************
bool
MachineProfile::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
MachineProfile::CreateNode(DataNode *parentNode,
bool completeSave, bool forceAdd)
{
if(parentNode == 0)
return false;
MachineProfile defaultObject;
bool addToParent = false;
// Create a node for MachineProfile.
DataNode *node = new DataNode("MachineProfile");
if(completeSave || !FieldsEqual(ID_host, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("hostNickname", hostNickname));
if(completeSave || IsSelected(ID_host))
node->AddNode(new DataNode("host", host));
}
if(completeSave || !FieldsEqual(ID_userName, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_userName))
node->AddNode(new DataNode("userName", userName));
}
if(completeSave || !FieldsEqual(ID_hostAliases, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_hostAliases))
node->AddNode(new DataNode("hostAliases", hostAliases));
}
if(completeSave || !FieldsEqual(ID_hostNickname, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("hostNickname", hostNickname));
}
if(completeSave || !FieldsEqual(ID_directory, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_directory))
node->AddNode(new DataNode("directory", directory));
}
if(completeSave || !FieldsEqual(ID_shareOneBatchJob, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_shareOneBatchJob))
node->AddNode(new DataNode("shareOneBatchJob", shareOneBatchJob));
}
if(completeSave || !FieldsEqual(ID_sshPortSpecified, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_sshPortSpecified))
node->AddNode(new DataNode("sshPortSpecified", sshPortSpecified));
}
if(completeSave || !FieldsEqual(ID_sshPort, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_sshPort))
node->AddNode(new DataNode("sshPort", sshPort));
}
if(completeSave || !FieldsEqual(ID_clientHostDetermination, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_clientHostDetermination))
node->AddNode(new DataNode("clientHostDetermination", ClientHostDetermination_ToString(clientHostDetermination)));
}
if(completeSave || !FieldsEqual(ID_manualClientHostName, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_manualClientHostName))
node->AddNode(new DataNode("manualClientHostName", manualClientHostName));
}
if(completeSave || !FieldsEqual(ID_tunnelSSH, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_tunnelSSH))
node->AddNode(new DataNode("tunnelSSH", tunnelSSH));
}
if(completeSave || !FieldsEqual(ID_launchProfiles, &defaultObject))
{
addToParent = true;
for(size_t i = 0; i < launchProfiles.size(); ++i)
launchProfiles[i]->CreateNode(node, completeSave, true);
}
for(size_t i = 0; i < launchProfiles.size(); ++i)
launchProfiles[i]->CreateNode(node, completeSave,
completeSave); // (only force an add for a complete save)
if(completeSave || !FieldsEqual(ID_activeProfile, &defaultObject))
{
addToParent = true;
if(completeSave || IsSelected(ID_activeProfile))
node->AddNode(new DataNode("activeProfile", activeProfile));
}
// Add the node to the parent node.
if(addToParent || forceAdd)
parentNode->AddNode(node);
else
delete node;
return (addToParent || forceAdd);
parentNode->AddNode(node);
return true;
}
// ****************************************************************************
// Method: MachineProfile::SetFromNode
//
......@@ -647,6 +610,8 @@ MachineProfile::CreateNode(DataNode *parentNode, bool completeSave, bool forceAd
// Creation: omitted
//
// Modifications:
// Jeremy Meredith, Wed Apr 28 17:26:30 EDT 2010
// For the launch profiles, override old values instead of clearing them.
//
// ****************************************************************************
......@@ -678,6 +643,8 @@ MachineProfile::SetFromNode(DataNode *parentNode)
SetSshPortSpecified(node->AsBool());