diff options
| author | Connor Moore <connor@hhmoore.ca> | 2026-02-10 11:15:11 -0500 |
|---|---|---|
| committer | Connor Moore <connor@hhmoore.ca> | 2026-02-10 11:15:11 -0500 |
| commit | 014262c99b83799f3e8b73e48d5f1d98cfa697e0 (patch) | |
| tree | 3e41dd0f66c6fcf6a6c38d8ab584de90c93dc18f | |
| parent | 258970eaf49a77897ae6ae8a8019ed86983c9e0d (diff) | |
Fixed regression in Makefile
| -rw-r--r-- | Makefile | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -22,16 +22,6 @@ S_STEP := 100 L_END := 12000 L_STEP := 500 - -all: - # This target simply compiles the binaries - @mkdir -p bin/ - @echo "$(MAGENTA)Compiling serial and parallel binaries with $(OPTFLAGS)$(RESET)" - $(GCC) matrixproduct.f90 -o bin/$(GCC).serial.out -$(OPTFLAGS) -fexternal-blas -lopenblas -march=native - $(oneAPI) matrixproduct.f90 -o bin/$(oneAPI).serial.out -qmkl=sequential -$(OPTFLAGS) -heap-arrays -xHost - $(GCC) matrixproduct.f90 -o bin/$(GCC).parallel.out -$(OPTFLAGS) -fexternal-blas -lopenblas -march=native -fopenmp - $(oneAPI) matrixproduct.f90 -o bin/$(oneAPI).parallel.out -qmkl=parallel -$(OPTFLAGS) -heap-arrays -xHost -fopenmp - tests: clean # Run the parametric tests and sweep over compiler flags @mkdir -p results/ @@ -49,6 +39,15 @@ tests: clean ## the enivronment variables for OMP/MKL they need to be run as one "big" command ## serially. The backslash is the 'line continuation' operator that does this. +all: + # This target simply compiles the binaries + @mkdir -p bin/ + @echo "$(MAGENTA)Compiling serial and parallel binaries with $(OPTFLAGS)$(RESET)" + $(GCC) matrixproduct.f90 -o bin/$(GCC).serial.out -$(OPTFLAGS) -fexternal-blas -lopenblas -march=native + $(oneAPI) matrixproduct.f90 -o bin/$(oneAPI).serial.out -qmkl=sequential -$(OPTFLAGS) -heap-arrays -xHost + $(GCC) matrixproduct.f90 -o bin/$(GCC).parallel.out -$(OPTFLAGS) -fexternal-blas -lopenblas -march=native -fopenmp + $(oneAPI) matrixproduct.f90 -o bin/$(oneAPI).parallel.out -qmkl=parallel -$(OPTFLAGS) -heap-arrays -xHost -fopenmp + serial: ./bin/gfortran.serial.out ./bin/ifx.serial.out # run the serial tests. ensures that only one thread is used for blas and mkl export OMP_NUM_THREADS=1 && \ @@ -61,8 +60,8 @@ serial: ./bin/gfortran.serial.out ./bin/ifx.serial.out parallel: ./bin/gfortran.parallel.out ./bin/ifx.parallel.out # run the parallel tests. ensures that all threads are used for the loops, blas, and mkl export OMP_NUM_THREADS=1 && \ - export OMP_NUM_THREADS=${NPROC} && \ - export MKL_NUM_THREADS=${NPROC} && \ + export OMP_NUM_THREADS=$(NPROC) && \ + export MKL_NUM_THREADS=$(NPROC) && \ ./bin/$(GCC).parallel.out $(S_START) $(S_END) $(S_STEP) yes | tee results/$(GCC)_short_parallel_$(OPTFLAGS)_$(NPROC).out; \ ./bin/$(oneAPI).parallel.out $(S_START) $(S_END) $(S_STEP) yes | tee results/$(oneAPI)_short_parallel_$(OPTFLAGS)_$(NPROC).out; \ ./bin/$(GCC).parallel.out $(S_END) $(L_END) $(L_STEP) no | tee results/$(GCC)_long_parallel_$(OPTFLAGS)_$(NPROC).out; \ |
