<commit_before>dbsym_dir = $(shell python defaults.py dbsym_dir)
ahmed_dir = $(shell python defaults.py ahmed_dir)
sql_dir   = $(shell python defaults.py sql_dir)
petsc4py_dir = $(shell python defaults.py petsc4py_dir)

export PYTHONPATH := ${petsc4py_dir}:$(sql_dir):$(ahmed_dir):$(dbsym_dir):$(PYTHONPATH)

gf = gfortran -fopenmp -ffree-line-length-none -fPIC -O3 -funroll-loops
f2 = f2py --f90flags="-ffree-line-length-none -fopenmp"

export LD_LIBRARY_PATH=/home/eab/git/difwave/bie/

solve:
	mpiexec.mpich -n 4 python mpislae.py -ksp_monitor

params.f90: common.py
	python -c "from common import common; c = common(); c.write_module()"

set_params.f90: common.py
	python -c "from common import common; c = common(); c.write_set_module()"

params.o: params.f90
	$(gf) -c params.f90

phi.o: phi.f90 params.o
	$(gf) -c phi.f90

dbsym/dbsym.o: dbsym/dbsym.f90
	cd dbsym && make dbsym.o

dbsym/fast_dbsym.o: dbsym/fast_dbsym.f90
	cd dbsym && make fast_dbsym.o

dbsym/dbsym.so: dbsym/dbsym.f90
	cd dbsym && make dbsym.so

libphi.so: phi.f90 params.o set_params.f90
	$(gf) -shared params.o phi.f90 -o libphi.so

phi.so: libphi.so
	test -s phi.so || f2py -m phi --overwrite-signature -h phi.pyf phi.f90
	test -s phi.so || $(f2) -m phi -L. -lphi -c phi.pyf phi.f90

libinteg.so: dbsym/dbsym.o dbsym/fast_dbsym.o integ.f90 kernels.f90 params.o set_params.f90 libphi.so
	$(gf) -shared -I$(dbsym_dir) dbsym/dbsym.o dbsym/toms_mod.o dbsym/fast_dbsym.o params.o phi.o integ.f90 -o libinteg.so

integ.so: params.o phi.o libinteg.so
	test -s integ.so || f2py -m integ --overwrite-signature -h integ.pyf integ.f90
	test -s integ.so || $(f2) -m integ -lgomp -I$(dbsym_dir) -L. -linteg -c integ.pyf cover.f90

test:
	rm -f libinteg.so
	make testcase tn=.testBIEsmall

test2:
	make testsql

test3:
	rm -f libinteg.so
	@make testcase tn=.testBIEmedium
<commit_msg>rm dbsym.so<commit_after>dbsym_dir = $(shell python defaults.py dbsym_dir)
ahmed_dir = $(shell python defaults.py ahmed_dir)
sql_dir   = $(shell python defaults.py sql_dir)
petsc4py_dir = $(shell python defaults.py petsc4py_dir)

export PYTHONPATH := ${petsc4py_dir}:$(sql_dir):$(ahmed_dir):$(dbsym_dir):$(PYTHONPATH)

gf = gfortran -fopenmp -ffree-line-length-none -fPIC -O3 -funroll-loops
f2 = f2py --f90flags="-ffree-line-length-none -fopenmp"

export LD_LIBRARY_PATH=/home/eab/git/difwave/bie/

solve:
	mpiexec.mpich -n 4 python mpislae.py -ksp_monitor

params.f90: common.py
	python -c "from common import common; c = common(); c.write_module()"

set_params.f90: common.py
	python -c "from common import common; c = common(); c.write_set_module()"

params.o: params.f90
	$(gf) -c params.f90

phi.o: phi.f90 params.o
	$(gf) -c phi.f90

dbsym/dbsym.o: dbsym/dbsym.f90
	cd dbsym && make dbsym.o

dbsym/fast_dbsym.o: dbsym/fast_dbsym.f90
	cd dbsym && make fast_dbsym.o

libphi.so: phi.f90 params.o set_params.f90
	$(gf) -shared params.o phi.f90 -o libphi.so

phi.so: libphi.so
	test -s phi.so || f2py -m phi --overwrite-signature -h phi.pyf phi.f90
	test -s phi.so || $(f2) -m phi -L. -lphi -c phi.pyf phi.f90

libinteg.so: dbsym/dbsym.o dbsym/fast_dbsym.o integ.f90 kernels.f90 params.o set_params.f90 libphi.so
	$(gf) -shared -I$(dbsym_dir) dbsym/dbsym.o dbsym/toms_mod.o dbsym/fast_dbsym.o params.o phi.o integ.f90 -o libinteg.so

integ.so: params.o phi.o libinteg.so
	test -s integ.so || f2py -m integ --overwrite-signature -h integ.pyf integ.f90
	test -s integ.so || $(f2) -m integ -lgomp -I$(dbsym_dir) -L. -linteg -c integ.pyf cover.f90

test:
	rm -f libinteg.so
	make testcase tn=.testBIEsmall

test2:
	make testsql

test3:
	rm -f libinteg.so
	@make testcase tn=.testBIEmedium

{'fraction_non_alphanumeric': 0.14336818932306, 'fraction_numerical': 0.02971931755641167, 'mean_word_length': 3.7392438070404173, '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': '3964787', 'n_tokens_mistral': 1758, 'n_tokens_neox': 1684, 'n_words': 375}