Suite101

Keep a Clear Head with ClearCase


© Adam Hughes

As was discussed last week, many computational scientists are finding themselves in the role of software engineer as hardware capabilities improve and allow for the study of more complex problems using increasingly sophisticated methods. When the development effort moves beyond a couple of people, it often becomes tough for the researcher to keep track of exactly what is going on in his blossoming software package. This is often the point where he will consider enlisting the help of a configuration management tool. In this article, we'll look at one of these tools in particular, ClearCase.

ClearCase is a Software Configuration Management (SCM) developed and maintained by Rational Software, Inc. Like most SCM devices, ClearCase provides mechanisms for maintaining multiple versions of the same source code, including building and installing executables. One useful feature of ClearCase is that it can be run through either a graphical user interface (GUI) or a command-line interface. The command-line interface is very similar in feel and function to a normal Unix terminal, which should be a comforting thought for most scientists.

While the above features make ClearCase both powerful and accessible, it is its unique method of version control that really sets it apart from other SCM packages. ClearCase utilizes logical devices called "views" to give code access to developers on a project. Basically, ClearCase creates a tree structure for a software development project, and the original version resides on the main "trunk". Then, when someone begins a new phase of development, he creates a "branch" for the coming work. ClearCase then sets up a view from the new branch to the trunk, so that the developer can view all of the code, but he can't make revisions. To actually edit a file, the scientist must perform a checkout of the document, after which clearcase makes a copy of the original in the current branch. The programmer is then free to edit this file.

Interestingly, when the programmer checks to see what files he has, he'll be given a list of all the files in the code. However, some of them, the ones he's checked out, will actually be copies that he can write to without disturbing the originals. Both copies exist simultaneously, but only the one in the present view will be apparent without some explicit instructions. This setup allows continual development without disturbing the parent code, so it is quite possible to revert to literally any version of the code that has existed in the past.

This process can be repeated starting from any point in the code tree so that any branch can serve as a seed for a new

Go To Page: 1 2


The copyright of the article Keep a Clear Head with ClearCase in Scientific Computing is owned by Adam Hughes. Permission to republish Keep a Clear Head with ClearCase in print or online must be granted by the author in writing.

Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo