-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_wheeler
61 lines (48 loc) · 2.04 KB
/
Makefile_wheeler
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
MYDIR := ${CURDIR}
LAMMPS_INSTALL = ${MYDIR}
HPCG_INSTALL = ${MYDIR}
RABBIT_INSTALL = /users/sahba/wheeler-scratch/git/rabbitmq-c
LAMMPS_LIB_LOC = ${LAMMPS_INSTALL}/lib
LAMMPS_INC_LOC = ${LAMMPS_INSTALL}/include/lammps
HPCG_LIB_LOC = ${HPCG_INSTALL}/lib
HPCG_INC_LOC = ${HPCG_INSTALL}/include/hpcg
RABBIT_LIB_LOC = ${RABBIT_INSTALL}/build/librabbitmq
RABBIT_INC_LOC = ${RABBIT_INSTALL}/librabbitmq
SHELL := /bin/bash
CC = mpic++
CFLAGS = -Wall -fopenmp -I /users/sahba/wheeler-scratch/git/sprng5/include
LDFLAGS = -L/users/sahba/wheeler-scratch/git/sprng5/lib
LDLIBS = -lgmp -lgsl -lgslcblas -lm -lsprng -lrabbitmq -lhpcg -llammps -lpng -ljpeg
.PHONY: clean
.PHONY: default
default: bsp_prototype
lammps_runner.o: lammps_runner.h lammps_runner.c
module load libjpeg-9c-gcc-7.3.0-bvi5osg;\
module load gsl-2.5-gcc-7.3.0-i7icadp;\
module load openmpi-3.1.3-gcc-7.3.0-6javta3;\
module load gcc-7.3.0-gcc-7.2.0-rg5awu4;\
$(CC) -Wall -I $(LAMMPS_INC_LOC) -c lammps_runner.c
hpcg_runner.o: hpcg_runner.h hpcg_runner.c
module load gsl-2.5-gcc-7.3.0-i7icadp;\
module load openmpi-3.1.3-gcc-7.3.0-6javta3;\
module load gcc-7.3.0-gcc-7.2.0-rg5awu4;\
$(CC) -Wall -I $(HPCG_INC_LOC) -c hpcg_runner.c
amqp_producer.o: amqp_producer.h amqp_producer.c
module load gsl-2.5-gcc-7.3.0-i7icadp;\
module load openmpi-3.1.3-gcc-7.3.0-6javta3;\
module load gcc-7.3.0-gcc-7.2.0-rg5awu4;\
$(CC) -Wall -I $(RABBIT_INC_LOC) -c amqp_producer.c
bsp_prototype: bsp_prototype.c lammps_runner.o hpcg_runner.o amqp_producer.o
module load libjpeg-9c-gcc-7.3.0-bvi5osg;\
module load gsl-2.5-gcc-7.3.0-i7icadp;\
module load openmpi-3.1.3-gcc-7.3.0-6javta3;\
module load gcc-7.3.0-gcc-7.2.0-rg5awu4;\
$(CC) $^ -o bsp_prototype $(CFLAGS) -I $(LAMMPS_INC_LOC) -I $(HPCG_INC_LOC) -I $(RABBIT_INC_LOC) -L$(LAMMPS_LIB_LOC) -L$(HPCG_LIB_LOC) -L$(RABBIT_LIB_LOC) $(LDFLAGS) $(LDLIBS)
dependencies:
rm -rf include;\
rm -rf lib;\
module load gcc-7.3.0-gcc-7.2.0-rg5awu4;\
bash build_hpcg.sh;\
bash build_lammps.sh
clean:
rm -f lammps_runner.o hpcg_runner.o amqp_producer.o bsp_prototype