MPICH2 Parallel Build

From Mpich
Revision as of 21:42, 31 July 2009 by Kumudb (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Library Build

During the MPICH2 previous build process, the object files were being archived to the top level libraries each time source files were compiled in the sub-directories. This made it unfeasible to build MPICH2 in parallel using multiple make jobs because multiple archiving being done to the same file at the same time could ruin the file. The make does not serialize the multiple archiving commands on the same file. Hence, we proposed a solution where source files in multiple subdirectories could be compiled in parallel but archived only in the end serially by the top level make. To enable this, the top level make had to be aware of the name of the object files, the location and the library that they are to be archived to. Hence, we first created a file named libname.(a/la).manifest with the name and the location of all the object files to be archived to the library libname. In the top level make we included target for each library to be built. We modified the top-level to accomplish this. Since the user has to be able to decide whether certain libraries such as libmpif90 is to be built through configure option, this had to be reflected in the top level make. To address this problem, we introduced the variable LIB_SUBSYSTEM, which contains name of the targets in the top-level make corresponding to the libraries determined during the configure time to be made. Note that the libmpiexec, a local library residing in the directory src/pm/util, now resides in the directory lib and is created depending on the process manager chosen by the user during the configure time.


Previously, the executables were being created during the same recursive descent through the subdirectories as the one when libraries were created. With the modified build system, first the object files and manifest files are created during the first recursive descent, then they are archived into respective libraries at the top level make, lastly, a second recursive descent is made through the subdirectories which creates necessary executables. The Makefile in each subdirectory has a target all-executable whose pre-requisite is all-executable-local. The target all-executable-local can be user defined target in or the one generated by the simplemake with all the executables to be created in particular subdirectory as its prerequisites.

FORTRAN 77 Library

Previously, the object files belonging to FORTRAN 77 libraries were being archived into MPICH main library libmpich. With the new built, the FORTRAN 77 objects are archived into FORTRAN library libfmpich. This library is linked both in mpif77 and mpif90.

ROMIO Library

With the earlier built, all the ROMIO object files were being archived into MPICH main library libmpich. Since this will again cause an indeterminate behavior in new parallel make, we create a separate ROMIO library called libmpio and archive all the ROMIO object files into this library instead. The library is then linked in mpicc, mpicxx, mpif90 and mpif77.