Skip to content

Commit

Permalink
Adds parallelization options to Makefile. Accelerates 8 times by defa…
Browse files Browse the repository at this point in the history
…ult (if so many cores are available).
  • Loading branch information
myurkin committed Jun 13, 2024
1 parent 42ae398 commit e303191
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions devtools/build_debug
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function compile_debug {
# main code; we do not do any special cleaning, since believe that make tracks all dependences
cd ./../src
compile_debug all ""
# the following causes a minor warning from Makefile, due to combination with DEBUG
compile_debug all "DEBUGFULL"
compile_debug all "FFT_TEMPERTON"
compile_debug all "NO_FORTRAN"
Expand Down
4 changes: 2 additions & 2 deletions devtools/release_sequence.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Use some normal shell, under Windows - this can be MSYS. Then 'sh' can be omitted in the following commands.
Use some normal shell, under Windows - this can be the one from w64devkit. Then 'sh' can be omitted in the following commands.

1) Test for compiler warnings (about 10 min)
1) Test for compiler warnings (a few minutes)
> sh build_debug 2> log_debug

2) Build and test the current source (a few hours)
Expand Down
8 changes: 8 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ ifeq ($(filter else-if,$(.FEATURES)),)
$(error make does not support else-if)
endif

# Parallelization options. The number can be adjusted according to the number of cores. Alternatively, it can be turned
# of (overridden) by adding -j1 to the make invocation
MAKEFLAGS += -j8
ifneq ($(filter output-sync,$(.FEATURES)),)
# this compromises clearness of the output with interactivity. --output-sync=recurse is the most robust, but the
# ouput will appear only at the end (for such scenarios, one can use -s instead)
MAKEFLAGS += --output-sync=target --no-print-directory
endif
#=======================================================================================================================
# Fixed definitions for non-compilation targets
#=======================================================================================================================
Expand Down

0 comments on commit e303191

Please sign in to comment.