-
Notifications
You must be signed in to change notification settings - Fork 1
/
SitePackage.lua
358 lines (341 loc) · 18.2 KB
/
SitePackage.lua
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
-- This file lives at https://git.unl.edu/hcc/crane-modules-el8/-/blob/master/SitePackage.lua
--------------------------------------------------------------------------
-- This is a placeholder for site specific functions.
-- @module SitePackage
require("strict")
--------------------------------------------------------------------------------
-- Anything in this file will automatically be loaded everytime the Lmod command
-- is run. Here are two suggestions on how to use your SitePackage.lua file
--
-- a) Install Lmod normally and then overwrite your SitePackage.lua file over
-- this one in the install directory.
-- b) Create a file named "SitePackage.lua" in a different directory separate
-- from the Lmod installed directory. Then you should modify
-- your modules.sh and modules.csh (or however you initialize the "module" command)
-- with:
--
-- (for bash, zsh, etc)
-- export LMOD_PACKAGE_PATH=/path/to/the/Site/Directory
--
-- (for csh)
-- setenv LMOD_PACKAGE_PATH /path/to/the/Site/Directory
--
-- A "SitePackage.lua" in that directory will override the one in the Lmod
-- install directory.
--
-----------------------------------------------------------------------------
-- You should check to see that Lmod finds your SitePackage.lua. If you do:
--
-- $ module --config
--
-- and it reports:
--
-- Modules based on Lua: Version X.Y.Z 3016-02-05 16:31
-- by Robert McLay mclay@tacc.utexas.edu
--
-- Description Value
-- ----------- -----
-- ...
-- Site Pkg location standard
--
-- Then you haven't set things up correctly.
-----------------------------------------------------------------------------
-- Any function here that is called by a module file must be registered with
-- the sandbox. For example you have following functions in your
-- SitePackage.lua file:
--
-- function sam()
-- end
--
-- function bill()
-- end
--
-- Then you have to add any functions defined here that you wish to call inside
-- a modulefile with the sandbox by doing:
-- sandbox_registration{ sam = sam, bill = bill}
------------------------------------------------------------------------
-- DO NOT FORGET TO USE CURLY BRACES "{}" and NOT PARENS "()"!!!!
------------------------------------------------------------------------
-- As an example suppose you want to require that users of a particular package must
-- be in a special group. You can write this function here and use it in any
-- modulefile:
--
--
-- function module_requires_group(group)
-- local grps = capture("groups")
-- local found = false
-- local userId = capture("id -u")
-- local isRoot = tonumber(userId) == 0
-- for g in grps:split("[ \n]") do
-- if (g == group or isRoot) then
-- found = true
-- break
-- end
-- end
-- return found
-- end
--
-- sandbox_registration{ ['required_group'] = module_requires_group }
--
--
-- Then in any module file you can have:
--
--
-- -------------------------
-- foo/1.0.lua:
-- -------------------------
--
-- local err_message="To use this module you must be in a particular group\n" ..
-- "Please contact foo@my.supercomputer.center to join\n"
--
-- local found = required_group("G123456")
--
-- if (not found) then
-- LmodError(err_message)
-- end
--
-- prepend_path("PATH","/path/to/Foo/Bin")
--
-- Note that here I have used the name "required_group" in the modulefile and named the
-- function as "module_requires_group". The key is the name used in the modulefile and
-- the right is what the function is called in SitePackage.lua. The names can be the
-- same.
local hook = require("Hook")
-- By using the hook.register function, this function "load_hook" is called
-- -- every time a module is loaded with the file name and the module name.
function load_hook(t)
-- the arg t is a table:
-- t.modFullName: the module full name: (i.e: gcc/4.7.2)
-- t.fn: The file name: (i.e /apps/modulefiles/Core/gcc/4.7.2.lua)
if (mode() ~= "load") then return end
local user = os.getenv("SLURM_JOB_USER") or os.getenv("USER") or "unknown"
local jobid = os.getenv("SLURM_JOB_ID") or "unknown"
local msg = string.format("user=%s,module=%s,fn=%s,job=%s,cluster=crane",
user, t.modFullName, t.fn, jobid)
pcall(function() os.execute("/bin/logger -t lmod -p local0.info " .. msg) end)
end
hook.register("load",load_hook)
local mapT =
{
en_grouped = {
['/Compilers$'] = "Compilers",
['/Core$'] = "Core Modules",
['/Common$'] = "Core Modules",
['/Compiler/gcc/4.7$'] = "GCC 4.7 modules",
['/Compiler/gcc/4.8$'] = "GCC 4.8 modules",
['/Compiler/gcc/4.9$'] = "GCC 4.9 modules",
['/Compiler/gcc/5.1$'] = "GCC 5.1 modules",
['/Compiler/gcc/5.2$'] = "GCC 5.2 modules",
['/Compiler/gcc/5.3$'] = "GCC 5.3 modules",
['/Compiler/gcc/5.4$'] = "GCC 5.4 modules",
['/Compiler/gcc/5.5$'] = "GCC 5.5 modules",
['/Compiler/gcc/6.1$'] = "GCC 6.1 modules",
['/Compiler/gcc/6.2$'] = "GCC 6.2 modules",
['/Compiler/gcc/6.3$'] = "GCC 6.3 modules",
['/Compiler/gcc/6.4$'] = "GCC 6.4 modules",
['/Compiler/gcc/7.1$'] = "GCC 7.1 modules",
['/Compiler/gcc/7.2$'] = "GCC 7.2 modules",
['/Compiler/gcc/7.3$'] = "GCC 7.3 modules",
['/Compiler/gcc/8.2$'] = "GCC 8.2 modules",
['/Compiler/gcc/9.1$'] = "GCC 9.1 modules",
['/Compiler/gcc/9$'] = "GCC 9 modules",
['/Compiler/gcc/10$'] = "GCC 10 modules",
['/Compiler/intel/11$'] = "Intel 11 modules",
['/Compiler/intel/12$'] = "Intel 12 modules",
['/Compiler/intel/13$'] = "Intel 13 modules",
['/Compiler/intel/14$'] = "Intel 14 modules",
['/Compiler/intel/15$'] = "Intel 15 modules",
['/Compiler/intel/16$'] = "Intel 16 modules",
['/Compiler/intel/17$'] = "Intel 17 modules",
['/Compiler/intel/18$'] = "Intel 18 modules",
['/Compiler/intel/19$'] = "Intel 19 modules",
['/Compiler/intel/20$'] = "Intel 20 modules",
['/Compiler/pgi/11$'] = "PGI 11 modules",
['/Compiler/pgi/12$'] = "PGI 12 modules",
['/Compiler/pgi/13$'] = "PGI 13 modules",
['/Compiler/pgi/14$'] = "PGI 14 modules",
['/Compiler/pgi/15$'] = "PGI 15 modules",
['/Compiler/pgi/16$'] = "PGI 16 modules",
['/Compiler/pgi/17$'] = "PGI 17 modules",
['/Compiler/pgi/18$'] = "PGI 18 modules",
['/Compiler/pgi/19$'] = "PGI 19 modules",
['/Compiler/pgi/20$'] = "PGI 20 modules",
['/MPI/gcc/4.7/openmpi/1.6$'] = "GCC 4.7 + OpenMPI 1.6 modules",
['/MPI/gcc/4.8/openmpi/1.6$'] = "GCC 4.8 + OpenMPI 1.6 modules",
['/MPI/gcc/4.9/openmpi/1.6$'] = "GCC 4.9 + OpenMPI 1.6 modules",
['/MPI/gcc/5.1/openmpi/1.6$'] = "GCC 5.1 + OpenMPI 1.6 modules",
['/MPI/gcc/5.2/openmpi/1.6$'] = "GCC 5.2 + OpenMPI 1.6 modules",
['/MPI/gcc/5.3/openmpi/1.6$'] = "GCC 5.3 + OpenMPI 1.6 modules",
['/MPI/gcc/5.4/openmpi/1.6$'] = "GCC 5.4 + OpenMPI 1.6 modules",
['/MPI/gcc/5.5/openmpi/1.6$'] = "GCC 5.5 + OpenMPI 1.6 modules",
['/MPI/gcc/6.1/openmpi/1.6$'] = "GCC 6.1 + OpenMPI 1.6 modules",
['/MPI/gcc/6.2/openmpi/1.6$'] = "GCC 6.2 + OpenMPI 1.6 modules",
['/MPI/gcc/6.3/openmpi/1.6$'] = "GCC 6.3 + OpenMPI 1.6 modules",
['/MPI/gcc/6.4/openmpi/1.6$'] = "GCC 6.4 + OpenMPI 1.6 modules",
['/MPI/gcc/7.1/openmpi/1.6$'] = "GCC 7.1 + OpenMPI 1.6 modules",
['/MPI/gcc/7.2/openmpi/1.6$'] = "GCC 7.2 + OpenMPI 1.6 modules",
['/MPI/gcc/7.3/openmpi/1.6$'] = "GCC 7.3 + OpenMPI 1.6 modules",
['/MPI/gcc/4.7/openmpi/1.8$'] = "GCC 4.7 + OpenMPI 1.8 modules",
['/MPI/gcc/4.8/openmpi/1.8$'] = "GCC 4.8 + OpenMPI 1.8 modules",
['/MPI/gcc/4.9/openmpi/1.8$'] = "GCC 4.9 + OpenMPI 1.8 modules",
['/MPI/gcc/5.1/openmpi/1.8$'] = "GCC 5.1 + OpenMPI 1.8 modules",
['/MPI/gcc/5.2/openmpi/1.8$'] = "GCC 5.2 + OpenMPI 1.8 modules",
['/MPI/gcc/5.3/openmpi/1.8$'] = "GCC 5.3 + OpenMPI 1.8 modules",
['/MPI/gcc/5.4/openmpi/1.8$'] = "GCC 5.4 + OpenMPI 1.8 modules",
['/MPI/gcc/5.5/openmpi/1.8$'] = "GCC 5.5 + OpenMPI 1.8 modules",
['/MPI/gcc/6.1/openmpi/1.8$'] = "GCC 6.1 + OpenMPI 1.8 modules",
['/MPI/gcc/6.2/openmpi/1.8$'] = "GCC 6.2 + OpenMPI 1.8 modules",
['/MPI/gcc/6.3/openmpi/1.8$'] = "GCC 6.3 + OpenMPI 1.8 modules",
['/MPI/gcc/6.4/openmpi/1.8$'] = "GCC 6.4 + OpenMPI 1.8 modules",
['/MPI/gcc/7.1/openmpi/1.8$'] = "GCC 7.1 + OpenMPI 1.8 modules",
['/MPI/gcc/7.2/openmpi/1.8$'] = "GCC 7.2 + OpenMPI 1.8 modules",
['/MPI/gcc/7.3/openmpi/1.8$'] = "GCC 7.3 + OpenMPI 1.8 modules",
['/MPI/gcc/4.7/openmpi/1.10$'] = "GCC 4.7 + OpenMPI 1.10 modules",
['/MPI/gcc/4.8/openmpi/1.10$'] = "GCC 4.8 + OpenMPI 1.10 modules",
['/MPI/gcc/4.9/openmpi/1.10$'] = "GCC 4.9 + OpenMPI 1.10 modules",
['/MPI/gcc/5.1/openmpi/1.10$'] = "GCC 5.1 + OpenMPI 1.10 modules",
['/MPI/gcc/5.2/openmpi/1.10$'] = "GCC 5.2 + OpenMPI 1.10 modules",
['/MPI/gcc/5.3/openmpi/1.10$'] = "GCC 5.3 + OpenMPI 1.10 modules",
['/MPI/gcc/5.4/openmpi/1.10$'] = "GCC 5.4 + OpenMPI 1.10 modules",
['/MPI/gcc/5.5/openmpi/1.10$'] = "GCC 5.5 + OpenMPI 1.10 modules",
['/MPI/gcc/6.1/openmpi/1.10$'] = "GCC 6.1 + OpenMPI 1.10 modules",
['/MPI/gcc/6.2/openmpi/1.10$'] = "GCC 6.2 + OpenMPI 1.10 modules",
['/MPI/gcc/6.3/openmpi/1.10$'] = "GCC 6.3 + OpenMPI 1.10 modules",
['/MPI/gcc/6.4/openmpi/1.10$'] = "GCC 6.4 + OpenMPI 1.10 modules",
['/MPI/gcc/7.1/openmpi/1.10$'] = "GCC 7.1 + OpenMPI 1.10 modules",
['/MPI/gcc/7.2/openmpi/1.10$'] = "GCC 7.2 + OpenMPI 1.10 modules",
['/MPI/gcc/7.3/openmpi/1.10$'] = "GCC 7.3 + OpenMPI 1.10 modules",
['/MPI/gcc/4.7/openmpi/2.0$'] = "GCC 4.7 + OpenMPI 2.0 modules",
['/MPI/gcc/4.8/openmpi/2.0$'] = "GCC 4.8 + OpenMPI 2.0 modules",
['/MPI/gcc/4.9/openmpi/2.0$'] = "GCC 4.9 + OpenMPI 2.0 modules",
['/MPI/gcc/5.1/openmpi/2.0$'] = "GCC 5.1 + OpenMPI 2.0 modules",
['/MPI/gcc/5.2/openmpi/2.0$'] = "GCC 5.2 + OpenMPI 2.0 modules",
['/MPI/gcc/5.3/openmpi/2.0$'] = "GCC 5.3 + OpenMPI 2.0 modules",
['/MPI/gcc/5.4/openmpi/2.0$'] = "GCC 5.4 + OpenMPI 2.0 modules",
['/MPI/gcc/5.5/openmpi/2.0$'] = "GCC 5.5 + OpenMPI 2.0 modules",
['/MPI/gcc/6.1/openmpi/2.0$'] = "GCC 6.1 + OpenMPI 2.0 modules",
['/MPI/gcc/6.2/openmpi/2.0$'] = "GCC 6.2 + OpenMPI 2.0 modules",
['/MPI/gcc/6.3/openmpi/2.0$'] = "GCC 6.3 + OpenMPI 2.0 modules",
['/MPI/gcc/6.4/openmpi/2.0$'] = "GCC 6.4 + OpenMPI 2.0 modules",
['/MPI/gcc/7.1/openmpi/2.0$'] = "GCC 7.1 + OpenMPI 2.0 modules",
['/MPI/gcc/7.2/openmpi/2.0$'] = "GCC 7.2 + OpenMPI 2.0 modules",
['/MPI/gcc/7.3/openmpi/2.0$'] = "GCC 7.3 + OpenMPI 2.0 modules",
['/MPI/gcc/4.7/openmpi/2.1$'] = "GCC 4.7 + OpenMPI 2.1 modules",
['/MPI/gcc/4.8/openmpi/2.1$'] = "GCC 4.8 + OpenMPI 2.1 modules",
['/MPI/gcc/4.9/openmpi/2.1$'] = "GCC 4.9 + OpenMPI 2.1 modules",
['/MPI/gcc/5.1/openmpi/2.1$'] = "GCC 5.1 + OpenMPI 2.1 modules",
['/MPI/gcc/5.2/openmpi/2.1$'] = "GCC 5.2 + OpenMPI 2.1 modules",
['/MPI/gcc/5.3/openmpi/2.1$'] = "GCC 5.3 + OpenMPI 2.1 modules",
['/MPI/gcc/5.4/openmpi/2.1$'] = "GCC 5.4 + OpenMPI 2.1 modules",
['/MPI/gcc/5.5/openmpi/2.1$'] = "GCC 5.5 + OpenMPI 2.1 modules",
['/MPI/gcc/6.1/openmpi/2.1$'] = "GCC 6.1 + OpenMPI 2.1 modules",
['/MPI/gcc/6.2/openmpi/2.1$'] = "GCC 6.2 + OpenMPI 2.1 modules",
['/MPI/gcc/6.3/openmpi/2.1$'] = "GCC 6.3 + OpenMPI 2.1 modules",
['/MPI/gcc/6.4/openmpi/2.1$'] = "GCC 6.4 + OpenMPI 2.1 modules",
['/MPI/gcc/7.1/openmpi/2.1$'] = "GCC 7.1 + OpenMPI 2.1 modules",
['/MPI/gcc/7.2/openmpi/2.1$'] = "GCC 7.2 + OpenMPI 2.1 modules",
['/MPI/gcc/7.3/openmpi/2.1$'] = "GCC 7.3 + OpenMPI 2.1 modules",
['/MPI/intel/11/openmpi/1.6$'] = "Intel 11 + OpenMPI 1.6 modules",
['/MPI/intel/12/openmpi/1.6$'] = "Intel 12 + OpenMPI 1.6 modules",
['/MPI/intel/13/openmpi/1.6$'] = "Intel 13 + OpenMPI 1.6 modules",
['/MPI/intel/14/openmpi/1.6$'] = "Intel 14 + OpenMPI 1.6 modules",
['/MPI/intel/15/openmpi/1.6$'] = "Intel 15 + OpenMPI 1.6 modules",
['/MPI/intel/16/openmpi/1.6$'] = "Intel 16 + OpenMPI 1.6 modules",
['/MPI/intel/17/openmpi/1.6$'] = "Intel 17 + OpenMPI 1.6 modules",
['/MPI/intel/18/openmpi/1.6$'] = "Intel 18 + OpenMPI 1.6 modules",
['/MPI/intel/11/openmpi/1.8$'] = "Intel 11 + OpenMPI 1.8 modules",
['/MPI/intel/12/openmpi/1.8$'] = "Intel 12 + OpenMPI 1.8 modules",
['/MPI/intel/13/openmpi/1.8$'] = "Intel 13 + OpenMPI 1.8 modules",
['/MPI/intel/14/openmpi/1.8$'] = "Intel 14 + OpenMPI 1.8 modules",
['/MPI/intel/15/openmpi/1.8$'] = "Intel 15 + OpenMPI 1.8 modules",
['/MPI/intel/16/openmpi/1.8$'] = "Intel 16 + OpenMPI 1.8 modules",
['/MPI/intel/17/openmpi/1.8$'] = "Intel 17 + OpenMPI 1.8 modules",
['/MPI/intel/18/openmpi/1.8$'] = "Intel 18 + OpenMPI 1.8 modules",
['/MPI/intel/11/openmpi/1.10$'] = "Intel 11 + OpenMPI 1.10 modules",
['/MPI/intel/12/openmpi/1.10$'] = "Intel 12 + OpenMPI 1.10 modules",
['/MPI/intel/13/openmpi/1.10$'] = "Intel 13 + OpenMPI 1.10 modules",
['/MPI/intel/14/openmpi/1.10$'] = "Intel 14 + OpenMPI 1.10 modules",
['/MPI/intel/15/openmpi/1.10$'] = "Intel 15 + OpenMPI 1.10 modules",
['/MPI/intel/16/openmpi/1.10$'] = "Intel 16 + OpenMPI 1.10 modules",
['/MPI/intel/17/openmpi/1.10$'] = "Intel 17 + OpenMPI 1.10 modules",
['/MPI/intel/18/openmpi/1.10$'] = "Intel 18 + OpenMPI 1.10 modules",
['/MPI/intel/11/openmpi/2.0$'] = "Intel 11 + OpenMPI 2.0 modules",
['/MPI/intel/12/openmpi/2.0$'] = "Intel 12 + OpenMPI 2.0 modules",
['/MPI/intel/13/openmpi/2.0$'] = "Intel 13 + OpenMPI 2.0 modules",
['/MPI/intel/14/openmpi/2.0$'] = "Intel 14 + OpenMPI 2.0 modules",
['/MPI/intel/15/openmpi/2.0$'] = "Intel 15 + OpenMPI 2.0 modules",
['/MPI/intel/16/openmpi/2.0$'] = "Intel 16 + OpenMPI 2.0 modules",
['/MPI/intel/17/openmpi/2.0$'] = "Intel 17 + OpenMPI 2.0 modules",
['/MPI/intel/18/openmpi/2.0$'] = "Intel 18 + OpenMPI 2.0 modules",
['/MPI/intel/19/openmpi/2.0$'] = "Intel 19 + OpenMPI 2.0 modules",
['/MPI/intel/11/openmpi/2.1$'] = "Intel 11 + OpenMPI 2.1 modules",
['/MPI/intel/12/openmpi/2.1$'] = "Intel 12 + OpenMPI 2.1 modules",
['/MPI/intel/13/openmpi/2.1$'] = "Intel 13 + OpenMPI 2.1 modules",
['/MPI/intel/14/openmpi/2.1$'] = "Intel 14 + OpenMPI 2.1 modules",
['/MPI/intel/15/openmpi/2.1$'] = "Intel 15 + OpenMPI 2.1 modules",
['/MPI/intel/16/openmpi/2.1$'] = "Intel 16 + OpenMPI 2.1 modules",
['/MPI/intel/17/openmpi/2.1$'] = "Intel 17 + OpenMPI 2.1 modules",
['/MPI/intel/18/openmpi/2.1$'] = "Intel 18 + OpenMPI 2.1 modules",
['/MPI/intel/19/openmpi/2.1$'] = "Intel 19 + OpenMPI 2.1 modules",
['/MPI/pgi/11/openmpi/1.6$'] = "PGI 11 + OpenMPI 1.6 modules",
['/MPI/pgi/12/openmpi/1.6$'] = "PGI 12 + OpenMPI 1.6 modules",
['/MPI/pgi/13/openmpi/1.6$'] = "PGI 13 + OpenMPI 1.6 modules",
['/MPI/pgi/14/openmpi/1.6$'] = "PGI 14 + OpenMPI 1.6 modules",
['/MPI/pgi/15/openmpi/1.6$'] = "PGI 15 + OpenMPI 1.6 modules",
['/MPI/pgi/16/openmpi/1.6$'] = "PGI 16 + OpenMPI 1.6 modules",
['/MPI/pgi/17/openmpi/1.6$'] = "PGI 17 + OpenMPI 1.6 modules",
['/MPI/pgi/11/openmpi/1.8$'] = "PGI 11 + OpenMPI 1.8 modules",
['/MPI/pgi/12/openmpi/1.8$'] = "PGI 12 + OpenMPI 1.8 modules",
['/MPI/pgi/13/openmpi/1.8$'] = "PGI 13 + OpenMPI 1.8 modules",
['/MPI/pgi/14/openmpi/1.8$'] = "PGI 14 + OpenMPI 1.8 modules",
['/MPI/pgi/15/openmpi/1.8$'] = "PGI 15 + OpenMPI 1.8 modules",
['/MPI/pgi/16/openmpi/1.8$'] = "PGI 16 + OpenMPI 1.8 modules",
['/MPI/pgi/17/openmpi/1.8$'] = "PGI 17 + OpenMPI 1.8 modules",
['/MPI/pgi/11/openmpi/1.10$'] = "PGI 11 + OpenMPI 1.10 modules",
['/MPI/pgi/12/openmpi/1.10$'] = "PGI 12 + OpenMPI 1.10 modules",
['/MPI/pgi/13/openmpi/1.10$'] = "PGI 13 + OpenMPI 1.10 modules",
['/MPI/pgi/14/openmpi/1.10$'] = "PGI 14 + OpenMPI 1.10 modules",
['/MPI/pgi/15/openmpi/1.10$'] = "PGI 15 + OpenMPI 1.10 modules",
['/MPI/pgi/16/openmpi/1.10$'] = "PGI 16 + OpenMPI 1.10 modules",
['/MPI/pgi/17/openmpi/1.10$'] = "PGI 17 + OpenMPI 1.10 modules",
['/MPI/pgi/11/openmpi/2.0$'] = "PGI 11 + OpenMPI 2.0 modules",
['/MPI/pgi/12/openmpi/2.0$'] = "PGI 12 + OpenMPI 2.0 modules",
['/MPI/pgi/13/openmpi/2.0$'] = "PGI 13 + OpenMPI 2.0 modules",
['/MPI/pgi/14/openmpi/2.0$'] = "PGI 14 + OpenMPI 2.0 modules",
['/MPI/pgi/15/openmpi/2.0$'] = "PGI 15 + OpenMPI 2.0 modules",
['/MPI/pgi/16/openmpi/2.0$'] = "PGI 16 + OpenMPI 2.0 modules",
['/MPI/pgi/17/openmpi/2.0$'] = "PGI 17 + OpenMPI 2.0 modules",
['/MPI/pgi/11/openmpi/2.1$'] = "PGI 11 + OpenMPI 2.1 modules",
['/MPI/pgi/12/openmpi/2.1$'] = "PGI 12 + OpenMPI 2.1 modules",
['/MPI/pgi/13/openmpi/2.1$'] = "PGI 13 + OpenMPI 2.1 modules",
['/MPI/pgi/14/openmpi/2.1$'] = "PGI 14 + OpenMPI 2.1 modules",
['/MPI/pgi/15/openmpi/2.1$'] = "PGI 15 + OpenMPI 2.1 modules",
['/MPI/pgi/16/openmpi/2.1$'] = "PGI 16 + OpenMPI 2.1 modules",
['/MPI/pgi/17/openmpi/2.1$'] = "PGI 17 + OpenMPI 2.1 modules",
['/MPI/pgi/18/openmpi/4.0$'] = "PGI 18 + OpenMPI 4.0 modules",
['/MPI/pgi/20/openmpi/4.0$'] = "PGI 20 + OpenMPI 4.0 modules",
['/MPI/gcc/9/openmpi/4.0$'] = "GCC 9 + OpenMPI 4.0 modules",
['/MPI/gcc/10/openmpi/4.0$'] = "GCC 10 + OpenMPI 4.0 modules",
['/MPI/gcc/9/openmpi/4.1$'] = "GCC 9 + OpenMPI 4.1 modules",
['/MPI/gcc/10/openmpi/4.1$'] = "GCC 10 + OpenMPI 4.1 modules",
['/MPI/intel/19/openmpi/4.0$'] = "Intel 19 + OpenMPI 4.0 modules",
['/MPI/intel/20/openmpi/4.0$'] = "Intel 20 + OpenMPI 4.0 modules",
['/MPI/pgi/19/openmpi/4.0$'] = "PGI 19 + OpenMPI 4.0 modules",
},
}
function avail_hook(t)
local availStyle = masterTbl().availStyle
local styleT = mapT[availStyle]
if (not availStyle or availStyle == "system" or styleT == nil) then
return
end
for k,v in pairs(t) do
for pat,label in pairs(styleT) do
if (k:find(pat)) then
t[k] = label
break
end
end
end
end
hook.register("avail",avail_hook)