-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile.arch
164 lines (159 loc) · 3.17 KB
/
Makefile.arch
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
ifndef ARCHES
# if spack is running, get the arch from it.
ifndef ARCHGUESS
ifneq (, $(shell which spack))
#do we have an environment loaded?
ifeq ("==> No active environment", "$(shell spack env status)")
#get the current architecture
SPACKGUESS = $(shell spack arch)
else
#get the environment
SPACKGUESS = $(lastword $(shell spack env status))
endif
#either way, have we already set up a build directory? If so, use that.
ifneq (, $(wildcard build/${SPACKGUESS}/CMakeCache.txt))
ARCHGUESS = ${SPACKGUESS}
endif
endif
endif
ifndef ARCHGUESS
# guess hostname with hostname command, stripping off all numbers
HOSTNAME := $(shell hostname -s | sed 's/[0-9]*//g')
ifeq ($(HOSTNAME),bgqfen)
ARCHGUESS = spi
# ARCHGUESS = q32
endif
ifeq ($(HOSTNAME),rzuseqlac)
ARCHGUESS = bgq-spi
endif
ifeq ($(HOSTNAME),seqlac)
ARCHGUESS = bgq-spi
endif
ifeq ($(HOSTNAME),vulcanlac)
ARCHGUESS = bgq-spi
endif
ifeq ($(HOSTNAME),dawn)
ARCHGUESS = bgp
endif
ifeq ($(HOSTNAME),dawndev)
ARCHGUESS = bgp
endif
ifeq ($(HOSTNAME),udawn)
ARCHGUESS = bgp
endif
ifeq ($(HOSTNAME),tambo)
ARCHGUESS = tambo
endif
ifeq ($(HOSTNAME),rzdawndev)
ARCHGUESS = bgp
endif
ifeq ($(HOSTNAME),bgl)
ARCHGUESS = bgl
endif
ifeq ($(HOSTNAME),ubgl)
ARCHGUESS = bgl
endif
ifeq ($(HOSTNAME),atlas)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),oslic)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),ansel)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),aztec)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),cab)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),syrah)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),surface)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),quartz)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),edge)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),minos)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),rhea)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),hopi)
ARCHGUESS = peloton
endif
ifeq ($(HOSTNAME),tux)
ARCHGUESS = linux_gnu
endif
ifeq ($(HOSTNAME),sole)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),largo)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),silence)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),polgara)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),blackcomb)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),whistler)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),cypress)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),soifon)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),rzmanta)
ARCHGUESS = gpu-clang-default
endif
ifeq ($(HOSTNAME),pascal)
ARCHGUESS = gpu-clang-default
endif
ifeq ($(HOSTNAME),ray)
ARCHGUESS = gpu-clang-default
endif
ifeq ($(HOSTNAME),surface)
ARCHGUESS = gpu-clang-default
endif
ifeq ($(HOSTNAME),sierra)
ARCHGUESS = sierra
endif
ifeq ($(HOSTNAME),prince)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),clogin)
ARCHGUESS = r92
endif
ifeq ($(HOSTNAME),pascal)
ARCHGUESS = pascal
endif
ifeq ($(HOSTNAME),crestone)
ARCHGUESS = osx
endif
ifeq ($(HOSTNAME),lassen)
ARCHGUESS = sierra
endif
ifeq ($(HOSTNAME),araboth)
ARCHGUESS = myopenmpi
endif
endif
#fall back if everything else fails
ifndef ARCHGUESS
ARCHGUESS = mpi-default
$(info Unrecognized build host. Edit Makefile.arch)
$(info Using $(ARCHGUESS))
endif
endif