Makefile 511 Bytes
Newer Older
Pietro Incardona's avatar
Pietro Incardona committed
1 2 3 4 5 6 7 8 9 10
include ../../../example.mk

CC=mpic++

LDIR =

OBJ_EIGEN = main_eigen.o
OBJ_PETSC = main_petsc.o

%.o: %.cpp
11
	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
Pietro Incardona's avatar
Pietro Incardona committed
12 13 14 15 16 17 18 19 20

all: stokes_2d_eigen stokes_2d_petsc

stokes_2d_eigen: $(OBJ_EIGEN)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)

stokes_2d_petsc: $(OBJ_PETSC)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)

21
run: all
incardon's avatar
incardon committed
22
	mpirun -np 3 ./stokes_2d_eigen && mpirun -np 3 ./stokes_2d_petsc
23
	
Pietro Incardona's avatar
Pietro Incardona committed
24 25 26 27 28
.PHONY: clean all

clean:
	rm -f *.o *~ core stokes_2d_eigen stokes_2d_petsc