-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
149 lines (120 loc) · 5.12 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
################################################################################
##
## University of Illinois/NCSA Open Source License
## http://otm.illinois.edu/disclose-protect/illinois-open-source-license
##
## Parfu is copyright © 2017, The Trustees of the University of Illinois.
## All rights reserved.
##
## Parfu was developed by:
## The University of Illinois
## The National Center For Supercomputing Applications (NCSA)
## Blue Waters Science and Engineering Applications Support Team (SEAS)
## Craig P Steffen <[email protected]>
##
## https://github.com/ncsa/parfu_archive_tool
## http://www.ncsa.illinois.edu/People/csteffen/parfu/
##
## For full licnse text see the LICENSE file provided with the source
## distribution.
##
################################################################################
###### site configuration options
# generally speaking, you may have to tweak stuff in this section to get the
# code to build on your machine
#
# This is obviously an oversimplifed architecture-select section.
# This is mainly so that we can maintain the same Makefile while we're
# building, developing and testing on different systems.
#
# If you're just building and running parfu on a single machine, feel free to
# set a line like this in the Makefile so that you don't have to mess with
# environment values:
# ARC="cray"
# (or whatever)
#
ifeq ($(ARC),jyc_slurm)
MY_CC=~jphillip/openmpi/bin/mpicc
MY_CXX=~jphillip/openmpi/bin/mpiCC
endif
ifeq ($(ARC),cray)
MY_CC=cc
MY_CXX=CC
export CRAYPE_LINK_TYPE=dynamic
export XTPE_LINK_TYPE=dynamic
#export CRAYPE_LINK_TYPE=static
#export XTPE_LINK_TYPE=static
endif
ifeq ($(ARC),Wrangler)
MY_CC=mpicc
MY_CXX=mpic++
endif
ifeq ($(ARC),Stampede2)
MY_CC=mpicc
MY_CXX=mpicxx
endif
ifeq ($(ARC),)
default:
@echo
@echo You must select an architecture with \"ARC=XXX\"
@echo Do this by running \"make ARC=XXX\" or else set
@echo the ARC variable in your environment.
@echo Currently valid values of ARC are:
@echo \"cray\", \"Stampede2\", and \"Wrangler\".
@echo
@echo FYI: this build generally assumes gnu-style compilers
@echo So for instance, on a Cray system, swap to the
@echo PrgEnv-gnu module before building.
@echo
endif
# this is assuming the C compiler is a relatively recent gcc variant
# CFLAGS := -g -I. -Wall -Wmissing-prototypes -Wstrict-prototypes
#CFLAGS := -g -I. -Wall -Wmissing-prototypes -Wstrict-prototypes -O3 -static
#CXXFLAGS := -g -I. -Wall -O3 -static
CFLAGS := -g -I. -Wall -Wmissing-prototypes -Wstrict-prototypes -O3
CXXFLAGS := -g -I. -Wall -O3
# The TARGETS variable sets what gets built.
# By default, this Makefile builds the basic proof-of-concept test code.
# TARGETS := parfu_all_test_001 parfu_bench_test_002 parfu_write_test
TARGETS := parfu_0_5_1 parfu_0_6_test
# Using TARGETS line would also build two utilty test codes, which are
# probably only interesting for historical or internal testing reasons.
# TARGETS := parfu_file_util_test parfu_create_test_1 parfu_all_test_001
#
# end of user configuration options
######
######
# If you need to touch anything below here to get your code to build, please report
# it as a bug.
# header and utility function definitions
PARFU_HEADER_FILES := parfu_primary.h tarentry.hh parfu_main.hh parfu_file_system_classes.hh parfu_rank_move_data.hh parfu_worker_node.hh parfu_boss_functions.hh
#PARFU_OBJECT_FILES := parfu_file_list_utils.o parfu_buffer_utils.o parfu_data_transfer.o parfu_behavior_control.o tarentry.o
PARFU_OBJECT_FILES := parfu_2021_legacy.o parfu_file_list_utils.o parfu_buffer_utils.o parfu_data_transfer.o tarentry.o
PARFU_TEST_OBJECT_FILES := parfu_2021_legacy.o parfu_file_system_classes.o tarentry.o parfu_rank_move_data.o parfu_worker_node.o parfu_boss_functions.o parfu_parse_args.o
default: ${TARGETS}
test: parfu_0_6_test
# executables
parfu: ${PARFU_OBJECT_FILES} ${PARFU_HEADER_FILES}
echo "done!"
parfu_file_util_test: parfu_file_util_test.o ${PARFU_OBJECT_FILES} ${PARFU_HEADER_FILES}
${MY_CXX} -o $@ ${CFLAGS} parfu_file_util_test.o ${PARFU_OBJECT_FILES}
parfu_create_test_1: parfu_create_test_1.o ${PARFU_OBJECT_FILES} ${PARFU_HEADER_FILES}
${MY_CXX} -o $@ ${CFLAGS} parfu_create_test_1.o ${PARFU_OBJECT_FILES}
parfu_all_test_001: parfu_all_test_001.o ${PARFU_OBJECT_FILES} ${PARFU_HEADER_FILES}
${MY_CXX} -o $@ ${CFLAGS} parfu_all_test_001.o ${PARFU_OBJECT_FILES}
parfu_bench_test_002: parfu_bench_test_002.o ${PARFU_OBJECT_FILES} ${PARFU_HEADER_FILES}
${MY_CXX} -o $@ ${CFLAGS} parfu_bench_test_002.o ${PARFU_OBJECT_FILES}
parfu_write_test: parfu_write_test.o ${PARFU_HEADER_FILES}
${MY_CXX} -o $@ ${CFLAGS} parfu_write_test.o ${PARFU_OBJECT_FILES}
parfu_0_5_1: parfu_0_5_1_main_versA.o ${PARFU_OBJECT_FILES} ${PARFU_HEADER_FILES}
${MY_CXX} -o $@ ${CFLAGS} parfu_0_5_1_main_versA.o ${PARFU_OBJECT_FILES}
parfu_0_6_test: parfu_main_0_6_test.o ${PARFU_TEST_OBJECT_FILES} ${PARFU_HEADER_FILES}
${MY_CXX} -o $@ ${CFLAGS} ${PARFU_TEST_OBJECT_FILES} parfu_main_0_6_test.o
# utility targets
clean:
rm -f ${TARGETS} *.o
%.o: %.c ${PARFU_HEADER_FILES}
${MY_CC} ${CFLAGS} -c $<
%.o: %.cc ${PARFU_HEADER_FILES}
${MY_CXX} ${CXXFLAGS} -c $<
again: clean default