Skip to content

Commit 97c3171

Browse files
committed
Fix parallel builds with GNU make
In order for `make -j` to work correctly, the top level makefile should not be parallel, otherwise it may happen that some files within `SRC` start being compiled before the compilation of BLACS is completed. Also, the child make processes must be launched with `$(MAKE)` so that the `-j` option is propagated correctly.
1 parent 452d4db commit 97c3171

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

BLACS/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
all : lib tester
22

33
clean:
4-
( cd TESTING ; make clean )
5-
( cd SRC ; make clean )
4+
( cd TESTING ; $(MAKE) clean )
5+
( cd SRC ; $(MAKE) clean )
66

77
tester :
8-
( cd TESTING ; make )
8+
( cd TESTING ; $(MAKE) )
99

1010
lib :
11-
( cd SRC ; make )
11+
( cd SRC ; $(MAKE) )

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ PRECISIONS = single double complex complex16
4747
#
4848
############################################################################
4949

50+
.NOTPARALLEL:
51+
5052
all: lib exe example
5153

5254
lib: blacslib toolslib pblaslib redistlib scalapacklib

0 commit comments

Comments
 (0)