By modifying the makefile to reflect the changes illustrated above, we will now be processing each directory serially and parallelize the individual makes within each directory. The modified Makefile is invoked as follows:
$ make PREFIX=’srun
Go through the directories in parallel and have the make procedure within each directory be serial.
For the purpose of this exercise we are only parallelizing the “make all” component. The “clean” and “veryclean” components can be parallelized in a similar fashion.
Modified makefile:
all:
$(MAKE) $(MAKE_J) struct_matrix_vector/libHYPRE_mv.a
struct_linear_solvers/libHYPRE_ls.a utilities/libHYPRE_utilities.a
$(PREFIX) $(MAKE)
struct_matrix_vector/libHYPRE_mv.a:
$(PREFIX) $(MAKE)
struct_linear_solvers/libHYPRE_ls.a:
$(PREFIX) $(MAKE)
utilities/libHYPRE_utilities.a:
$(PREFIX) $(MAKE)
The modified Makefile is invoked as follows:
$ make PREFIX=’srun
Go through the directories in parallel and have the make procedure within each directory be parallel. For the purpose of this exercise, we are only parallelizing the “make all” component. The “clean” and “veryclean” components can be parallelized in a similar fashion.
Modified makefile:
all:
$(MAKE) $(MAKE_J) struct_matrix_vector/libHYPRE_mv.a
struct_linear_solvers/libHYPRE_ls.a utilities/libHYPRE_utilities.a
$(PREFIX) $(MAKE) $(MAKE_J)
struct_matrix_vector/libHYPRE_mv.a:
$(PREFIX) $(MAKE) $(MAKE_J)
struct_linear_solvers/libHYPRE_ls.a:
$(PREFIX) $(MAKE) $(MAKE_J)
Developing Applications