<commit_before>GRAPPA_HOME?=$(shell /bin/bash -c '(while [[ ! -e include.mk && "`pwd`" != "/" ]]; do cd ..; done; pwd )')
# check if autodetect GRAPPA_HOME is consistent
AUTO_HOME=$(shell /bin/bash -c '(while [[ ! -e include.mk && "`pwd`" != "/" ]]; do cd ..; done; pwd )')
ifneq ($(GRAPPA_HOME), $(AUTO_HOME))
$(warning warning: Environment variable GRAPPA_HOME was set but does not match the autodetected home: env=$(GRAPPA_HOME), auto=$(AUTO_HOME))
endif

# Grappa system source directory
GRAPPA_SYS=$(GRAPPA_HOME)/system

# Graph500
APP_GRAPH500=../graph500

# Grappa Graph500 csr generation
APP_BFS=$(APP_GRAPH500)/grappa

# Grappa Graph500 graph tuples generation
GEN=$(APP_GRAPH500)/generator

#ENV_VARIABLES+= GLOG_vmodule=pagerank*=5,spmv*=5,GlobalCompletionEvent*=5
#ENV_VARIABLES+= GLOG_vmodule=pagerank*=5,spmv*=5,make_graph*=5

# for building Grappa applications
include $(GRAPPA_SYS)/Makefile

TARGET:= spmv_mult.exe

CFLAGS += -I$(GRAPPA_SYS) -I$(APP_GRAPH500) -I$(GEN) -I$(APP_BFS)
CFLAGS += -g -Drestrict=__restrict__ -ffast-math -DGRAPH_GENERATOR_GRAPPA #-Wall

# for make_graph.h
CFLAGS += -D_GRAPPA

SOURCES = spmv_mult.o $(APP_BFS)/oned_csr.o $(APP_GRAPH500)/prng.o

mult.exe: mult_main.o $(SOURCES) $(HEADERS) $(GEN)/generator.a $(GRAPPA_SYS)/libGrappa.a
	$(ENV_VARIABLES) $($(MPITYPE)_LD) $(LDFLAGS) mult_main.o $(SOURCES) $(GEN)/generator.a $(GRAPPA_SYS)/libGrappa.a $(LIBRARIES) -o $@ $(LIBS)

pagerank.exe: pagerank.o $(SOURCES) $(HEADERS) $(GEN)/generator.a $(GRAPPA_SYS)/libGrappa.a
	$(ENV_VARIABLES) $($(MPITYPE)_LD) $(LDFLAGS) pagerank.o $(SOURCES) $(GEN)/generator.a $(GRAPPA_SYS)/libGrappa.a $(LIBRARIES) -o $@ $(LIBS)

# use graph500 makefile
$(APP_GRAPH500)/prng.o:
	cd $(APP_GRAPH500); $(MAKE) prng.o

# use Grappa graph generation makefile
# pass on the DEBUG flag
$(GEN)/generator.a:
	cd $(GEN); $(MAKE) DEBUG=$(DEBUG) -f Makefile.grappa genlib

clean:<commit_msg>pass CC on to prng.o build to make sure symbols ar ok<commit_after>GRAPPA_HOME?=$(shell /bin/bash -c '(while [[ ! -e include.mk && "`pwd`" != "/" ]]; do cd ..; done; pwd )')
# check if autodetect GRAPPA_HOME is consistent
AUTO_HOME=$(shell /bin/bash -c '(while [[ ! -e include.mk && "`pwd`" != "/" ]]; do cd ..; done; pwd )')
ifneq ($(GRAPPA_HOME), $(AUTO_HOME))
$(warning warning: Environment variable GRAPPA_HOME was set but does not match the autodetected home: env=$(GRAPPA_HOME), auto=$(AUTO_HOME))
endif

# Grappa system source directory
GRAPPA_SYS=$(GRAPPA_HOME)/system

# Graph500
APP_GRAPH500=../graph500

# Grappa Graph500 csr generation
APP_BFS=$(APP_GRAPH500)/grappa

# Grappa Graph500 graph tuples generation
GEN=$(APP_GRAPH500)/generator

#ENV_VARIABLES+= GLOG_vmodule=pagerank*=5,spmv*=5,GlobalCompletionEvent*=5
#ENV_VARIABLES+= GLOG_vmodule=pagerank*=5,spmv*=5,make_graph*=5

# for building Grappa applications
include $(GRAPPA_SYS)/Makefile

TARGET:= spmv_mult.exe

CFLAGS += -I$(GRAPPA_SYS) -I$(APP_GRAPH500) -I$(GEN) -I$(APP_BFS)
CFLAGS += -g -Drestrict=__restrict__ -ffast-math -DGRAPH_GENERATOR_GRAPPA #-Wall

# for make_graph.h
CFLAGS += -D_GRAPPA

SOURCES = spmv_mult.o $(APP_BFS)/oned_csr.o $(APP_GRAPH500)/prng.o

mult.exe: mult_main.o $(SOURCES) $(HEADERS) $(GEN)/generator.a $(GRAPPA_SYS)/libGrappa.a
	$(ENV_VARIABLES) $($(MPITYPE)_LD) $(LDFLAGS) mult_main.o $(SOURCES) $(GEN)/generator.a $(GRAPPA_SYS)/libGrappa.a $(LIBRARIES) -o $@ $(LIBS)

pagerank.exe: pagerank.o $(SOURCES) $(HEADERS) $(GEN)/generator.a $(GRAPPA_SYS)/libGrappa.a 
	$(ENV_VARIABLES) $($(MPITYPE)_LD) $(LDFLAGS) pagerank.o $(SOURCES) $(GEN)/generator.a $(GRAPPA_SYS)/libGrappa.a $(LIBRARIES) -o $@ $(LIBS)


# use graph500 makefile
$(APP_GRAPH500)/prng.o:
	cd $(APP_GRAPH500); $(MAKE) CC=$(CC) prng.o  # pass on compiler

# use Grappa graph generation makefile
# pass on the DEBUG flag
$(GEN)/generator.a:
	cd $(GEN); $(MAKE) DEBUG=$(DEBUG) -f Makefile.grappa genlib

clean:
{'fraction_non_alphanumeric': 0.17764007229537826, 'fraction_numerical': 0.021688613477924088, 'mean_word_length': 5.714038128249567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2337227', 'n_tokens_mistral': 1660, 'n_tokens_neox': 1529, 'n_words': 326}