<div>[This is really more sort of a blog post of information than a question that needs answering. But it seems more appropriate to start here, by posting it to the CDash mailing list...]</div><div><br></div><div><br></div>
<div>In CDash, a "site" is a representation of a client testing machine that is submitting builds to it.</div><div><br></div>If you click on the name of a site on a CDash result page, you see information about that computer. For example, the following pages are for Kitware's dashboard machines, dash2win64 and dash1vista32<div>
<a href="http://www.cdash.org/CDash/viewSite.php?siteid=2012&project=1&currenttime=1282698000" target="_blank">http://www.cdash.org/CDash/viewSite.php?siteid=2012&project=1&currenttime=1282698000</a></div>
<div><a href="http://www.cdash.org/CDash/viewSite.php?siteid=20&project=1&currenttime=1282698000" target="_blank">http://www.cdash.org/CDash/viewSite.php?siteid=20&project=1&currenttime=1282698000</a></div>
<div><br></div><div>As you can see from viewing the viewSite.php page, there is a field associated with the site presented as "64 Bits" -- it looks like it should have values of 0 and 1 for different machines. With names like dash2win64 and dash1vista32, you'd probably expect that you'd have a 1 and a 0. But they're both 0... what's going on here?</div>
<div><br></div><div>Well, let's look at the source. The value for "64 Bits" comes to CDash in xml file submissions. Typically, these xml files are produced by ctest running on the client. The Build.xml, Configure.xml and Test.xml files all have a "<Site>" XML element at the top of the file with an "Is64Bits" attribute. The code that writes that attribute value is in the method cmCTest::StartXML, and it looks like this:</div>
<div><br></div><div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:14.0px Menlo"> cmsys::SystemInformation info;</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:14.0px Menlo"> info.RunCPUCheck();</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:14.0px Menlo"> info.RunOSCheck();</p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:14.0px Menlo"> info.RunMemoryCheck();</p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:14.0px Menlo"> ...</p></div><div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:14.0px Menlo">
<< <span style="color:#da2e24">"\tIs64Bits=\""</span> << info.Is64Bits() << <span style="color:#da2e24">"\"\n"</span></p><p style="margin:0.0px 0.0px 0.0px 0.0px;font:14.0px Menlo">
<font color="#DA2E24" face="arial"><span style="font-size:small"><font face="Menlo" size="4"><span style="font-size:14px"><span style="color:rgb(0, 0, 0);font-family:arial;font-size:small"></span></span></font></span></font></p>
<font color="#DA2E24" face="arial"><font face="Menlo" size="4"><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small;"><font class="Apple-style-span" color="#DA2E24" face="Menlo"><span class="Apple-style-span" style="font-size: large;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; "></span></span></font></span></font></p>
<font class="Apple-style-span" color="#000000" face="arial"><font class="Apple-style-span" color="#DA2E24" face="Menlo"><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; ">
...</p></div><div></div></font></font><p></p></div></font></font></div><div><br></div><div>The problem is, the code info.Is64Bits() reflects the answer to the question "is the ctest process that I am running right now built as a 32-bit or 64-bit application". It does *not* answer the question, "is the machine/OS on which I am running capable of running 64-bit applications?"</div>
<div><br></div><div>Here's the implementation:</div><div><br></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo"><span style="color: #c22a9f"> bool</span> SystemInformationImplementation::Is64Bits()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo"> {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #c22a9f"><span style="color: #000000"> </span>return<span style="color: #000000"> (</span>sizeof<span style="color: #000000">(</span>void<span style="color: #000000">*) == </span><span style="color: #2526d3">8</span><span style="color: #000000">);</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo"> }</p></div><div><br></div><div>As you can see, it clearly returns whether the called code was compiled as 64-bit or not... not anything to do with the machine or the OS at all.</div>
<div><br></div><div>Unfortunately for all of us, I think the majority of the people who are looking at this stuff on CDash and in the XML files *assume* incorrectly that Is64Bits means: is the machine a 64-bit machine? In fact, what it really means, is: was the ctest that submitted from this site a 32-bit or a 64-bit build of ctest? And that is essentially useless information in terms of the typical project on the typical CDash server. Especially when folks use the pre-built binaries from Kitware. At present, on Windows, it's always a 32-bit build of ctest, and Is64Bits is always 0.</div>
<div><br></div><div>Much more interesting and useful would be:</div><div>- for the site object, what architectures is the site *capable* of running?</div><div>- for a given build, what is/are the architecture(s) of each library and executable built and tested?</div>
<div>- for a given submission, what are the architectures of the submitting client (ctest itself, may or may not be interesting...)</div><div><br></div><div>This is almost always a list of architectures, not a boolean.</div>
<div><br></div><div>Think: universal binaries on the Mac may contain multiple architectures within the same file. You have to dig and analyze even to figure out which architecture is running as an end-user. And 32-bit Windows apps work just swell on 64-bit machines. Similarly for x86 Linux code on an x86_64 machine. Everybody's got runtime compatibility layers that allow executing software built for earlier architectures on newer hardware and OSes.</div>
<div><br></div><div>Until this "64 Bits" field is eliminated from the viewSite page of CDash, confusion will abound. Hopefully this article clears up a little bit of it. If nothing else, hopefully I've convinced you to stop looking at the "64 Bits" field for now.</div>
<div><br></div><div><br></div><div>David Cole</div><div>Kitware, Inc.</div><div><br></div>