<commit_before>include common/makefile.gnu.config

PIN_BIN=$(PIN_HOME)/pin
PIN_TOOL=pin/bin/pin_sim
#PIN_RUN=$(MPI_DIR)/bin/mpirun -np 1 $(PIN_BIN) -pause_tool 20 -mt -t $(PIN_TOOL) 
PIN_RUN=$(MPI_DIR)/bin/mpirun -np 1 $(PIN_BIN) -mt -t $(PIN_TOOL) 
PIN_RUN_DIST=$(MPI_DIR)/bin/mpirun -np 2 $(PIN_BIN) -mt -t $(PIN_TOOL) 

TESTS_DIR=./common/tests

CORES=4
..PHONY: cores
PROCESS=mpirun
..PHONY: process

all:
	$(MAKE) -C common 
	$(MAKE) -C pin
	$(MAKE) -C qemu

pinbin:
	$(MAKE) -C common
	$(MAKE) -C pin

qemubin:
	$(MAKE) -C common
	$(MAKE) -C qemu

clean:
	$(MAKE) -C common clean
	$(MAKE) -C pin clean
	$(MAKE) -C qemu clean
	-rm -f *.o *.d *.rpo output_files/*

squeaky: clean
	$(MAKE) -C common squeaky
	$(MAKE) -C pin squeaky
	$(MAKE) -C qemu squeaky
	-rm -f *~

empty_logs :
	rm output_files/* ; true

regress_quick: clean simple_test io_test ping_pong_test mutex_test barrier_test cannon_msg cannon simple_test_dist cannon_msg_dist ring_msg_pass dynamic_threads

regress: regress_quick clean_benchmarks build_benchmarks 1djacobi_test_quick 

clean_benchmarks:
	make $@ -C $(TESTS_DIR)

build_benchmarks:
	make $@ -C $(TESTS_DIR)

simple_test: all empty_logs
	$(MAKE) -C $(TESTS_DIR)/simple
	$(PIN_RUN) -mdc -mpf -msys -np 1 -tc 2 -- $(TESTS_DIR)/simple/simple_test 0

dynamic_threads: all empty_logs
	$(MAKE) -C $(TESTS_DIR)/dynamic_threads
	$(PIN_RUN) -mdc -mpf -msys -np 1 -tc 2 -- $(TESTS_DIR)/dynamic_threads/dynamic_threads

simple_test_dist: all empty_logs
	$(MAKE) -C $(TESTS_DIR)/simple_test_dist
	$(MPI_DIR)/bin/mpirun -np 2 $(PIN_BIN) -mt -t $(PIN_TOOL) -mdc -mpf -msys -np 2 -tc 2 -- $(TESTS_DIR)/simple_test_dist/simple_test_dist 0

cannon_msg_dist: all empty_logs
	$(MAKE) -C $(TESTS_DIR)/cannon_msg_dist
	$(MPI_DIR)/bin/mpirun -np 2 $(PIN_BIN) -mt -t $(PIN_TOOL) -mdc -mpf -msys -np 2 -tc 5 -- $(TESTS_DIR)/cannon_msg_dist/cannon_msg_dist -m 4 -s 4<commit_msg>[misc] Add support for starting and stopping mpd from the makefile.<commit_after>include common/makefile.gnu.config

PIN_BIN=$(PIN_HOME)/pin
PIN_TOOL=pin/bin/pin_sim
#PIN_RUN=$(MPI_DIR)/bin/mpirun -np 1 $(PIN_BIN) -pause_tool 20 -mt -t $(PIN_TOOL) 
PIN_RUN=$(MPI_DIR)/bin/mpirun -np 1 $(PIN_BIN) -mt -t $(PIN_TOOL) 
PIN_RUN_DIST=$(MPI_DIR)/bin/mpirun -np 2 $(PIN_BIN) -mt -t $(PIN_TOOL) 

TESTS_DIR=./common/tests

CORES=4
..PHONY: cores
PROCESS=mpirun
..PHONY: process

all:
	$(MAKE) -C common 
	$(MAKE) -C pin
	$(MAKE) -C qemu

pinbin:
	$(MAKE) -C common
	$(MAKE) -C pin

qemubin:
	$(MAKE) -C common
	$(MAKE) -C qemu

clean:
	$(MAKE) -C common clean
	$(MAKE) -C pin clean
	$(MAKE) -C qemu clean
	-rm -f *.o *.d *.rpo output_files/*

squeaky: clean
	$(MAKE) -C common squeaky
	$(MAKE) -C pin squeaky
	$(MAKE) -C qemu squeaky
	-rm -f *~

empty_logs :
	rm output_files/* ; true

run_mpd:
	$(MPI_DIR)/bin/mpd

stop_mpd:
	$(MPI_DIR)/bin/mpdallexit


regress_quick: clean simple_test io_test ping_pong_test mutex_test barrier_test cannon_msg cannon simple_test_dist cannon_msg_dist ring_msg_pass dynamic_threads

regress: regress_quick clean_benchmarks build_benchmarks 1djacobi_test_quick 

clean_benchmarks:
	make $@ -C $(TESTS_DIR)

build_benchmarks:
	make $@ -C $(TESTS_DIR)

simple_test: all empty_logs
	$(MAKE) -C $(TESTS_DIR)/simple
	$(PIN_RUN) -mdc -mpf -msys -np 1 -tc 2 -- $(TESTS_DIR)/simple/simple_test 0

dynamic_threads: all empty_logs
	$(MAKE) -C $(TESTS_DIR)/dynamic_threads
	$(PIN_RUN) -mdc -mpf -msys -np 1 -tc 2 -- $(TESTS_DIR)/dynamic_threads/dynamic_threads

simple_test_dist: all empty_logs
	$(MAKE) -C $(TESTS_DIR)/simple_test_dist
	$(MPI_DIR)/bin/mpirun -np 2 $(PIN_BIN) -mt -t $(PIN_TOOL) -mdc -mpf -msys -np 2 -tc 2 -- $(TESTS_DIR)/simple_test_dist/simple_test_dist 0

cannon_msg_dist: all empty_logs
	$(MAKE) -C $(TESTS_DIR)/cannon_msg_dist
	$(MPI_DIR)/bin/mpirun -np 2 $(PIN_BIN) -mt -t $(PIN_TOOL) -mdc -mpf -msys -np 2 -tc 5 -- $(TESTS_DIR)/cannon_msg_dist/cannon_msg_dist -m 4 -s 4
{'fraction_non_alphanumeric': 0.1497559722578988, 'fraction_numerical': 0.010788594913948112, 'mean_word_length': 4.143989431968296, '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': '6548536', 'n_tokens_mistral': 1769, 'n_tokens_neox': 1647, 'n_words': 415}