A History of Code Management at D0

This history details the evolution of the D0 Code management system we are using for RunII code development. It is organized in chronalogical order.

D0 code management during Run I

These links describe the Code Management system that D0 used during RunI. This system was DEC VMS based. It relied on CMS as the code repository, MMS as the basic build tool along with a large number of home grown programs and home grown programs to do the code distribution.
The Run I D0library
describes the Run I D0library, it's organization, strengths and weaknesses.
D0 Code Management
describes the Run I code management system we used.
D0 Release Procedures
describes the Run I code release procedures.

Why the RunI system had to change and why did it turn out the way it did?

The design and implementation of the Code Management System have been driven by a number of factors: The first of these points meant that neither D0 nor CDF could use any of the components of the systems that they used in the past. These were strictly VMS based. The last implies that we needed to find, beg, borrow and steal components to build the new system.

For a number of reasons found in other sections on this site, cvs, the Concurrent Versioning System was chosen as the code repository, cpp was chosen as the code preprocessor for all languages and UPS/UPD the Unix Package System and Unix Package Distribution developed here at Fermilab were adopted as the version setup and distribution mechanisms respectively. All of these products are in the public domain and work well. Also, for most users the details of what they do and how they do it are unimportant. Developers have to know a few cvs commands and how to write "#include"s and "#ifdef"s for cpp. Everyone needs to know how to "setup <product> [<version>]". These have very short learning curves.

However, the second and third points above force major changes in not only how the code is released, but in how often it's released and what people have to know and do if they want to deviate at all from the "standard" versions of packages. Those requirements, especially the second, the move to C++ present some really tough problems.

The main problem arises because of the use of header (include) files in C and especially C++. In Fortran it is easily possible to change an include file in such a way that previously compiled modules don't need to be recompiled to run correctly. This is not for C++ headers. There are, apparently no changes that can be made to a C++ header that won't cause some compilers on some operating systems to create code which crashes or gives incorrect results. The reason for this is that in Fortran, most decisions, such as how much space needs to be allocated to store an array, is made at compile time. So once the code is compiled, that decision can't be changed. In C++, many of these decisions are made at run time.

What this means is that all code that depends on a given header file must be recompiled any time that header file changes. In addition, there must be a way for the system to guarantee that all object code archives (.a files) used in a given link were all compiled using the same header files. These problems were solved elegantly (but not necessarily "easily" (for the developer and user)) by adopting the SoftRelTools package developed by the BaBar experiment at SLAC.


How was the new system designed?

The reasons given above that required totally rewritting the code management system at D0 used for Run I were recognised early on. The same reasons were also true at CDF and within the Computer Division. There was an early working group in the CD that considered many of these questions and issued Computing Division Working Group Report (1994): Code Management Under Unix. Subsequently a joint CD/D0/CDF working group was formed to consider joint solutions to the problems. The Joint CD/D0/CDF Run II Configration Management Working Group web pages document their deliberations and the resultant decisions and design. Since they issued their Final Requirements Document the group has remained active developing the system. The details of what has been developed, and is still being developed are detailed in other sections of these pages.
Alan Jonckheere
Last modified: Sat Jan 17 14:53:44 CST 1998