-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
38 lines (29 loc) · 842 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
BIN = mc_p ge_p ge_scalapack
MODS=readMatrix.o
#module load OpenMPI
#module load ScaLAPACK
MODSRC=$(patsubst %.o,%.f,$(MODS))
MODMPI=$(patsubst %.o,%mpi.o,$(MODS))
DEBUG = -g
CFLAGS = -Wall -c $(DEBUG)
LFLAGS = -Wall $(DEBUG)
LIBS=-lscalapack -lblas
mc_p: mc_p.o $(MODMPI)
mpifort -o $@ $^ $(LFLAGS)
ge_p: ge_p.o $(MODMPI)
mpifort -o $@ $^ $(LFLAGS)
ge_scalapack: ge_scalapack.o $(MODMPI)
mpifort -o $@ $^ $(LFLAGS) $(LIBS)
mc_p.o: mc_p.f95 $(patsubst %.o,%mpi.o,$(MODS))
mpifort -o $@ $< $(CFLAGS) -O3
ge_p.o: ge_p.f95 $(patsubst %.o,%mpi.o,$(MODS))
mpifort -o $@ $< $(CFLAGS) -O3
ge_scalapack.o: ge_scalapack.f $(patsubst %.o,%mpi.o,$(MODS))
mpifort -o $@ $< $(CFLAGS) -O3
$(MODS) : $(MODSRC)
gfortran -o $@ $< $(CFLAGS)
$(MODMPI) : $(MODSRC)
mpifort -o $@ $< $(CFLAGS)
.PHONY: clean
clean:
rm -f *.o *~ core $(BIN) *.mod