MPICH2 Home Page
News
Download
MPICH2 FAQ
Documentation
License
Information for Developers
Student Projects
Bug Reports
ANL's MPI Page
MPI Forum

MPICH1 Home Page

Fixing Bugs in the Current Release

It is sometimes desirable to fix bugs in the current release so that a patch release can be created between major releases. A patch release must still be carefully tested, so fixes need to be carefully applied. In order to simplify the creation of a patch release, a separate bugfix branch is created with MPICH2 is released. This release has the name MPICH2_X.Y.Zpo. To work in the patch release, the best option is to check out this branch:
cd --someplace-where-you-keep-projects--
cvs -d /homes/MPI/cvsMaster checkout -d mpich2-X.Y.Zbugfix \
        -r MPICH2_X_Y_Zp0 mpich2allWithMPE
cvs -q update -d -P
There are two ways in which to apply bug fixes: directly to the branch or in a separate branch (see Using CVS branches to manage patches and code development for more details). Directly appling the patch is often the best approach if the patch is very simple. To do this, simply make the fix in the checked-out branch, then commit the changed file with a detailed message. Make sure that the fix is also applied to the development branch, as changes made to the patch branch are not part of the main tree. You can apply the changes from one file to the main branch either manually (make sure that you edit the main file, do not simply copy the fixed file in the branch to the main trunk as that will discard changes already made to the main truck) or use cvs update with explicit release numbers, as in
    cd mpich2 --- main development trunk ---
    cvs update -j 1.43 -j 1.43.2.1 filename
    cvs commit -m 'Applied update to fix req 2345' filename

Also, make sure that any files that you wish to add or remove (with cvs add or cvs rm) are marked with those cvs commands after the branch is tagged; otherwise, they will apply to the previous branch.

If the fix is more involved, either in terms of the number of lines in one file or in the use of multiple files, or it involves a file on which others might be working (such as configure), it may be best to create a private branch. This both isolates your changes and makes it easy to apply the same fix to the main branch. To do this, follow these steps (these are also described in Using CVS branches to manage patches and code development):

  1. Create a new branch. Use your name and a patch number to keep this branch name distinct from any others (if there is an MPICH2 bug request number, consider using that in the name). For example, for req 2345, you could use
        cd mpich2-X.Y.Zbugfix
        cvs -q tag -b MPICH2_X_Y_Zp0_gropp_2345 files
        cvs update -r MPICH2_X_Y_Zp0_gropp_2345 files
    
    where mpich2-X.Y.Zbugfix is the patch directory checked out above, and X, Y, and Z are the current release numbers (e.g., MPICH2_1_0_4). files should be the files and/or directories that you will be changing for the bugfix. Often, you can just tag the one directory in which you need make the change. Alternately, you can use the Unix find command to create a list of the files. For example, the update the configure macros (in confdb) and many of the configure scripts, you could use:
        cvs -q tag -b MPICH2_X_Y_Zp0_gropp_2345 confdb `find . -name configure.in -print`
    
    The cvs update step moves you to your newly-tagged branch.
  2. Make and test the bug fix
  3. Commit the changes with cvs -q commit -m 'explanation' filenames.
  4. Create another tag for the current update:
        cvs -q tag MPICH2_X_Y_Zp0_gropp_2345_fix files
    
    Make sure you tag the same files. If you do not, the update step below will delete the other files!
  5. Merge your changes into the development branch. Do this in a checked out copy of the development version, not the patch release version.
         cd mpich2
         cvs -q update -j MPICH2_X_Y_Zp0_gropp_2345 \
                       -j MPICH2_X_Y_Zp0_gropp_2345_fix files
    
    Make sure that the list of files is the same as for the tags steps.
Once you have fixed the bug, make sure that you answer the bug report and if appropriate, resolve the request.
MCS Division Argonne National Laboratory University of Chicago


Last modified Fri Aug 4 11:12:20 2006