@@ -4,6 +4,9 @@ SHELL = /bin/zsh
44# Multiprocessing library name (MPI or OMP)
55whichmp? =MPI
66
7+ CC_NONE = gcc
8+ CFLAGS_NONE = -g -O3 -Wall -D__MP_NONE__
9+
710# Compiler settings (OpenMP)
811CC_OMP = gcc
912CFLAGS_OMP = -g -O3 -Wall -fopenmp
@@ -20,6 +23,11 @@ CFLAGS = $(CFLAGS_$(whichmp))
2023SRC_DIR = src/$(whichmp )
2124OBJ_DIR = obj/$(whichmp )
2225
26+ # Use OMP sources if NONE is selected
27+ ifeq ($(whichmp ) ,NONE)
28+ SRC_DIR = src/OMP
29+ endif
30+
2331# Source and compiled objects
2432SRCS = $(wildcard $(SRC_DIR ) /* .c)
2533OBJS = $(patsubst $(SRC_DIR ) /% .c, $(OBJ_DIR ) /% .o, $(SRCS ) )
@@ -65,6 +73,7 @@ arguments_medpub = --docs 106330 \
6573--threshold 0.3 \
6674".datasets/medpub"
6775
76+ RUN_NONE = ./$(EXEC ) -n 1 $(arguments_$(dataset ) )
6877RUN_OMP = ./$(EXEC ) -n $(processes ) $(arguments_$(dataset ) )
6978RUN_MPI = mpiexec -n $(processes ) --oversubscribe ./$(EXEC ) $(arguments_$(dataset ) )
7079
@@ -112,7 +121,9 @@ report: exists-dataset
112121 export TIMEFMT="$(dataset),$(whichmp),$$i,%E,%U,%S,%P" ; \
113122 echo "Running on $(whichmp) with $$i processes" ; \
114123\
115- if [[ "$(whichmp)" == "OMP" ]]; then \
124+ if [[ "$(whichmp)" == "NONE" ]]; then \
125+ { time ./$(EXEC) -n 1 $(arguments_$(dataset)) 2> /dev/null ; } 2>> $(TIME_FILE) ; \
126+ elif [[ "$(whichmp)" == "OMP" ]]; then \
116127 { time ./$(EXEC) -n $$i $(arguments_$(dataset)) 2> /dev/null ; } 2>> $(TIME_FILE) ; \
117128 elif [[ "$(whichmp)" == "MPI" ]]; then \
118129 { time mpiexec -n $$i --oversubscribe ./$(EXEC) $(arguments_$(dataset)) 2> /dev/null ; } 2>> $(TIME_FILE) ; \
0 commit comments