From 014262c99b83799f3e8b73e48d5f1d98cfa697e0 Mon Sep 17 00:00:00 2001 From: Connor Moore Date: Tue, 10 Feb 2026 11:15:11 -0500 Subject: Fixed regression in Makefile --- Makefile | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 999c2c5..c6044ae 100644 --- a/Makefile +++ b/Makefile @@ -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; \ -- cgit v1.2.3