# Presentation: 464129

## 

Testing, Integration, Validation, and/or XML

Erik DeBenedictis
Sandia National Labs

**Testing, Integration, Validation, and/or XML**
**Erik DeBenedictis**
**Sandia National Labs**

- Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company,for the United States Department of Energy under contract DE-AC04-94AL85000.

**T-I-V-X Group Report**

## Objectives

**Stated Purpose**
**Testing, integration, validation**
**Something has to exist before you can test it**
**Not ready**
**Adopted Purpose**
**If XML is used, the schema can be validated before it is implemented**
**Up and running**

**Action to Date**
**Group leader (me) participates in PM & RM working groups and contributes to XML discussion for both**
**Validated XML posted to T-I-V-X notebook**

## Role of XML Schema

**Role of XML Schema**

**Excerpt from MPI**

**MPI Specification written in English**
**Consistency dependent on humans**
**Not machine readable**
**SciDAC SSS Possibility**
**English +**
**XML Schema**

## What is an XML Schema?

**XML for a Letter**
**.xml file**

**Schema for Letters in XML**
**.xsd file**

**<letterBody>****  <salutation>****  Dear Mr.<name>Robert Smith</name>.****  </salutation>****  Your order of <quantity>1</quantity>****  <productName>Baby Monitor</productName>****  shipped from our warehouse on****  <shipDate>1999-05-21</shipDate>. ....****</letterBody>**

**<xsd:element name="letterBody">**** <xsd:complexType mixed="true">****  <xsd:sequence>****   <xsd:element name="salutation">****    <xsd:complexType mixed="true">****     <xsd:sequence>****      <xsd:element name="name" type="xsd:string"/>****     </xsd:sequence>****    </xsd:complexType>****    </xsd:element>****    <xsd:element name="quantity“****      type="xsd:positiveInteger"/>****    <xsd:element name="productName“****      type="xsd:string"/>****   <xsd:element name="shipDate“****      type="xsd:date" minOccurs="0"/>****   <!-- etc. -->****  </xsd:sequence>**** </xsd:complexType>****</xsd:element>**

## What is an XML Schema?

**XML for a Letter**
**.xml file**

**<letterBody>****  <salutation>****  Dear Mr.<name>Robert Smith</name>.****  </salutation>****  Your order of <quantity>1</quantity>****  <productName>Baby Monitor</productName>****  shipped from our warehouse on****  <shipDate>1999-05-21</shipDate>. ....****</letterBody>**

## What is an XML Schema?

**Schema for****Letters in XML**
**.xsd file**

**<xsd:element name="letterBody">**** <xsd:complexType mixed="true">****  <xsd:sequence>****   <xsd:element name="salutation">****    <xsd:complexType mixed="true">****     <xsd:sequence>****      <xsd:element name="name”****	****type="xsd:string"/>****     </xsd:sequence>****    </xsd:complexType>****    </xsd:element>****    <xsd:element name="quantity“****      type="xsd:positiveInteger"/>****    <xsd:element name="productName“****      type="xsd:string"/>****   <xsd:element name="shipDate“****      type="xsd:date" minOccurs="0"/>****   <!-- etc. -->****  </xsd:sequence>**** </xsd:complexType>****</xsd:element>**

## Multiple Roles for XML Schema

**Multiple Roles for XML Schema**

- SCIDAC SSSStandardsDocument

- ResourceManager

- ProcessManager

- OtherServers

- OtherXML

- PM
- XML

- GlobalXML

- RM
- XML

- English TextXMLEnglish TextXMLEnglish Text

## Organizing XML

**Global Definitions**
**Unix command line**
**Executable**
**Args**
**Network address**
**Internet hostname**
**Port or service name**
**MPP addressing schemes**
**Authentication credentials**
**Etc.**

**Server-Specific Definitions**
**Job manager**
**<Submit-Process...>**
**<Kill-Process...>**
**Process manager**
**<Create-Process...>**
**<Kill-Process...>**
**Etc.**

## XML Software Infrastructure

**Parsing**
**Free parsers available in all popular languages**
**Two functions:**
**Stream parsers parse on the fly and “callback” to the main program when complete constructs are available**
**Document parsers parse whole documents at once**

**Validating**
**A few free validators are available in many popular langauges**
**I use Xerces C++**
**Tools**
**XML “authoring” tools are available**
**Best ones cost $**

## XML Namespaces

**Proposed Names**
**Global Definitions**
**urn:scidac-org:sss:global**
**Process Manager**
**urn:scidac-org:sss:pm**
**Scheduler**
**urn:scidac-org:sss:sched**
**Accounting Module**
**urn:scidac-org:sss:acct**
**Acknowledgement to Eric Roman**

**Topics for the Group**
**Are these names OK?**
**What other namespaces are needed and what should the names be?**

## How Far to Take XML?

**Issue: How Far to Take XML?**
**Exemplary Issue: Net Addresses**
**Opaque:**
**value=“host10.sandia.gov:234”**
**Opaque with Structure:**
**family=“2” port=“234” addr=“1023”**
**Fully Structured:**
**<INET host=“host10.sandia.gov” port=“234” />**
**Other Families?**
**MPP (ASCI Red)**
**Myricom**

**Points of Wisdom**
**XML schema technology only goes so far**
**Lusk/Desai’s PM XML**
**Over constraining the XML may limit flexibility**
**Group Decisions**
**Pertinent members of each group need to decide on the level of detail in the XML schema for each issue**

## Global Definitions

**Proposed Names**
**Stdio-type**
**Exec-type**
**Env-type**
**Args-type**
**Address-type**
**Intracommunicator-type**
**Intercommunicator-type**
**Host-type**
**CWD-type**

**Topics for the Group**
**These types were NOT systematically derived and there has been no group discussion**
**However, the choice of these types will form the “glue” that will bind the processes into a coherent whole**
**Let’s discuss...**

## Style Consistency 

**What Delimiter Should be Used for XML Attributes?**
**<address zip=‘12345’>**
**<address zip=“12345”>**
**Group to Decide:**
**Single quote**
**Double quote**
**Doesn’t matter**

**Advantage to a Decision**
**Consistency**