-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·44 lines (32 loc) · 1.39 KB
/
Makefile
File metadata and controls
executable file
·44 lines (32 loc) · 1.39 KB
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
39
40
41
42
43
44
###############################################################################################
# Makefile for DoNOF program (Date: May 2026) #
###############################################################################################
PROG=$(PWD)
SOU=$(PROG)/src
EXC=$(PROG)/exe
TEST=$(PROG)/test
Cln=/bin/rm -rf
LIBS = -lcint -llapack -lblas
#
SFLAGSg = -fdefault-real-8 -fdefault-double-8 -cpp -ffpe-summary=none -O2
CXXg = gcc
F90g = gfortran $(SFLAGSg)
MPIF90g = mpif90 -DMPI -fallow-argument-mismatch $(SFLAGSg)
#
F90_FILES = $(SOU)/*.f90
###############################################################################################
all: serialg ompg mpig
###############################################################################################
serialg:
cd $(PROG)/src && $(CXXg) -c nr_ecp.c
cd $(PROG)/src && $(F90g) -o DoNOFg.x nr_ecp.o $(F90_FILES) $(LIBS)
mv $(SOU)/DoNOFg.x $(EXC)/DoNOFg.x
mpig:
cd $(PROG)/src && $(CXXg) -c nr_ecp.c
cd $(PROG)/src && $(MPIF90g) -o DoNOFmpig.x nr_ecp.o $(F90_FILES) $(LIBS)
mv $(SOU)/DoNOFmpig.x $(EXC)/DoNOFmpig.x
ompg:
cd $(PROG)/src && $(CXXg) -c nr_ecp.c
cd $(PROG)/src && $(F90g) -fopenmp -o DoNOFompg.x nr_ecp.o $(F90_FILES) $(LIBS)
mv $(SOU)/DoNOFompg.x $(EXC)/DoNOFompg.x
###############################################################################################