2022-03-11 17:52:38 +00:00
|
|
|
|
|
|
|
CPP=g++
|
|
|
|
MPICPP=mpic++
|
|
|
|
CPPFLAGS= -std=c++17 -O3 -Wall -Wpedantic -pedantic
|
|
|
|
OUT=main
|
|
|
|
|
|
|
|
seriel: main.cpp Matrix.h Solver.h
|
|
|
|
$(CPP) main.cpp $(CPPFLAGS) -o $(OUT)_seriel
|
|
|
|
|
|
|
|
mpi: main.cpp Matrix.h Solver.h
|
|
|
|
$(MPICPP) main.cpp $(CPPFLAGS) -DUSE_MPI -o $(OUT)_mpi
|
|
|
|
|
|
|
|
all: seriel mpi
|
|
|
|
|
2022-03-13 16:58:02 +00:00
|
|
|
test: seriel mpi
|
|
|
|
./$(OUT)_seriel 1D 120 1000
|
|
|
|
mpirun -n 4 ./$(OUT)_mpi 2D 120 1000
|
|
|
|
# for script in *.R; do R --vanilla < $${script}; done
|
2022-03-11 17:52:38 +00:00
|
|
|
|
|
|
|
clean:
|
2022-03-13 16:58:02 +00:00
|
|
|
rm -f *.o *.R main $(OUT)_seriel $(OUT)_mpi
|