-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
486 lines (436 loc) · 10.6 KB
/
Copy pathCMakeLists.txt
File metadata and controls
486 lines (436 loc) · 10.6 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
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
#
# Homogeneous electron gas (HEG) tests
#
#
# Tests for HEG with 14 electrons at the gamma point and various wavefunctions
# See tests/heg/heg_14_gamma/README for full details
#
#
# Short HEG 14 gamma tests
#
#
# HEG14G - non-interacting Slater only VMC (exact)
#
list(APPEND HEG14GSNI_SCALARS "totenergy" " 0.627711 0.000001") # total energy
list(APPEND HEG14GSNI_SCALARS "variance" " 0.000000 0.000001") # energy variance
qmc_run_and_check(
short-heg_14_gamma-ni
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_NI
heg-short-NI.xml
1
16
TRUE
0
HEG14GSNI_SCALARS)
#
# HEG14G - non-interacting Slater only DMC (exact)
#
list(APPEND HEG14GSNI_DMC_SCALARS "totenergy" " 0.627711 0.000001") # total energy
list(APPEND HEG14GSNI_DMC_SCALARS "variance" " 0.000000 0.000001") # energy variance
qmc_run_and_check(
short-heg_14_gamma-ni_dmc
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_NI_dmc
heg-short-NI-dmc.xml
1
16
TRUE
1
HEG14GSNI_DMC_SCALARS # DMC
)
#
# HEG14G - Slater only VMC (Hartree-Fock)
#
list(APPEND HEG14GSHF_SCALARS "totenergy" "-0.812484 0.000271") # total energy
list(APPEND HEG14GSHF_SCALARS "variance" " 0.193169 0.018612") # energy variance
qmc_run_and_check(
short-heg_14_gamma-hf
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_HF
heg-short-HF.xml
1
16
TRUE
0
HEG14GSHF_SCALARS # VMC
)
#
# HEG14G - Slater-Jastrow VMC
#
list(APPEND HEG14GSSJ_SCALARS "totenergy" "-1.073323 0.000271") # total energy
list(APPEND HEG14GSSJ_SCALARS "variance" " 0.024574 0.000181") # energy variance
qmc_run_and_check(
short-heg_14_gamma-sj
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_SJ
heg-short-SJ.xml
1
16
TRUE
0
HEG14GSSJ_SCALARS # VMC
)
#
# HEG14G - Slater-Jastrow VMC with newer input format
#
list(APPEND HEG14GSSJ_NEW_SCALARS "totenergy" "-1.073286 0.000271") # total energy
list(APPEND HEG14GSSJ_NEW_SCALARS "variance" " 0.024564 0.000342") # energy variance
# legacy driver
qmc_run_and_check(
short-heg_14_gamma-sj_new
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_SJ_new
heg-short-SJ-new.xml
1
16
TRUE
0
HEG14GSSJ_NEW_SCALARS # VMC
)
# batch driver
qmc_run_and_check(
short-heg_14_gamma-sj_batch
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma/batch"
short_heg_SJ_batch
short-heg-SJ-batch.xml
1
16
TRUE
0
HEG14GSSJ_NEW_SCALARS # VMC
)
list(APPEND HEG14GSSJ_DMC_SCALARS "totenergy" "-1.110199 0.000322") # total energy
list(APPEND HEG14GSSJ_DMC_SCALARS "variance" " 0.022894 0.000060") # energy variance
qmc_run_and_check(
short-heg_14_gamma-sj-dmc_batch
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma/batch"
short_heg_SJ_dmc_batch
short-heg-SJ-dmc-batch.xml
1
16
TRUE
1
HEG14GSSJ_DMC_SCALARS # DMC
)
# batch driver energy density
qmc_run_and_check(
short-heg_14_gamma-sj_eden_batch
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma/batch"
short_heg_SJ_eden_batch
short-heg-SJ-eden-batch.xml
4
4
TRUE
0
HEG14GSSJ_NEW_SCALARS # VMC
)
# batch driver energy density
qmc_run_and_check(
short-heg_14_gamma-sj_dmc_eden_batch
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma/batch"
short_heg_SJ_dmc_eden_batch
short-heg-SJ-dmc-eden-batch.xml
4
4
TRUE
1
HEG14GSSJ_DMC_SCALARS # DMC
)
function(add_heg_eden_stats_check test_name output_prefix series reference_filename)
set(full_name "${test_name}-r4-t4")
set(check_name "${full_name}-energydensity")
if(QMC_OMP AND HAVE_MPI AND NOT TEST_MAX_PROCS LESS 16)
add_test(
NAME ${check_name}
COMMAND
${Python3_EXECUTABLE}
${qmcpack_SOURCE_DIR}/tests/scripts/check_stats.py
-s
${series}
-q
energydensity,EDcell
-e
2
-c
8
-p
${output_prefix}
-r
${reference_filename}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${full_name}")
set_property(TEST ${check_name} APPEND PROPERTY DEPENDS ${full_name})
set_property(TEST ${check_name} APPEND PROPERTY LABELS "QMCPACK-checking-results")
endif()
endfunction()
add_heg_eden_stats_check(
short-heg_14_gamma-sj_eden_batch
short_heg_SJ_eden_batch
0
qmc-ref/short_heg_SJ_eden_batch.s000.stat_ref_energydensity.dat)
add_heg_eden_stats_check(
short-heg_14_gamma-sj_dmc_eden_batch
short_heg_SJ_dmc_eden_batch
1
qmc-ref/short_heg_SJ_dmc_eden_batch.s001.stat_ref_energydensity.dat)
# batch deterministic
if(QMC_MIXED_PRECISION)
list(APPEND DET_HEG14GSSJ_SCALARS "totenergy" "-1.24699382 0.00002")
list(APPEND DET_HEG14GSSJ_SCALARS "kinetic" "0.77668442 0.000005")
list(APPEND DET_HEG14GSSJ_SCALARS "potential" "-2.02367775 0.00002")
else()
list(APPEND DET_HEG14GSSJ_SCALARS "totenergy" "-1.24699388 0.000001")
list(APPEND DET_HEG14GSSJ_SCALARS "kinetic" "0.77668380 0.000001")
list(APPEND DET_HEG14GSSJ_SCALARS "potential" "-2.02367769 0.000001")
endif()
qmc_run_and_check(
deterministic-heg_14_gamma-sj-batch
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma/batch"
deter_heg_SJ_batch
deter-heg-SJ-batch.xml
1
1
TRUE
0
DET_HEG14GSSJ_SCALARS # VMC
)
#
# HEG14G - Slater-Jastrow DMC
#
list(APPEND HEG14GSSJ_DMC_SCALARS "totenergy" "-1.110199 0.000322") # total energy
list(APPEND HEG14GSSJ_DMC_SCALARS "variance" " 0.022894 0.000060") # energy variance
qmc_run_and_check(
short-heg_14_gamma-sj_dmc
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_SJ_dmc
heg-short-SJ-dmc.xml
1
16
TRUE
2
HEG14GSSJ_DMC_SCALARS # DMC
)
#
# Long HEG 14 gamma tests
#
#
# HEG14G - non-interacting Slater only VMC (exact)
#
list(APPEND HEG14GLNI_SCALARS "totenergy" " 0.627711 0.000001") # total energy
list(APPEND HEG14GLNI_SCALARS "variance" " 0.000000 0.000001") # energy variance
qmc_run_and_check(
long-heg_14_gamma-ni
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_NI
heg-long-NI.xml
1
16
TRUE
0
HEG14GLNI_SCALARS # VMC
)
#
# HEG14G - non-interacting Slater only DMC (exact)
#
list(APPEND HEG14GLNI_DMC_SCALARS "totenergy" " 0.627711 0.000001") # total energy
list(APPEND HEG14GLNI_DMC_SCALARS "variance" " 0.000000 0.000001") # energy variance
qmc_run_and_check(
long-heg_14_gamma-ni_dmc
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_NI_dmc
heg-long-NI-dmc.xml
1
16
TRUE
1
HEG14GLNI_DMC_SCALARS # DMC
)
#
# HEG14G - Slater only VMC (Hartree-Fock)
#
list(APPEND HEG14GLHF_SCALARS "totenergy" "-0.812484 0.000090") # total energy
list(APPEND HEG14GLHF_SCALARS "variance" " 0.193169 0.006142") # energy variance
qmc_run_and_check(
long-heg_14_gamma-hf
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_HF
heg-long-HF.xml
1
16
TRUE
0
HEG14GLHF_SCALARS # VMC
)
#
# HEG14G - Slater-Jastrow VMC
#
list(APPEND HEG14GLSJ_SCALARS "totenergy" "-1.073323 0.000090") # total energy
list(APPEND HEG14GLSJ_SCALARS "variance" " 0.024574 0.000060") # energy variance
qmc_run_and_check(
long-heg_14_gamma-sj
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_SJ
heg-long-SJ.xml
1
16
TRUE
0
HEG14GLSJ_SCALARS # VMC
)
#
# HEG14G - Slater-Jastrow VMC with newer input format
#
list(APPEND HEG14GLSJ_NEW_SCALARS "totenergy" "-1.073286 0.000090") # total energy
list(APPEND HEG14GLSJ_NEW_SCALARS "variance" " 0.024564 0.000113") # energy variance
qmc_run_and_check(
long-heg_14_gamma-sj_new
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_SJ_new
heg-long-SJ-new.xml
1
16
TRUE
0
HEG14GLSJ_NEW_SCALARS # VMC
)
#
# HEG14G - Slater-Jastrow DMC
#
list(APPEND HEG14GLSJ_DMC_SCALARS "totenergy" "-1.110199 0.000106") # total energy
list(APPEND HEG14GLSJ_DMC_SCALARS "variance" " 0.022894 0.000020") # energy variance
qmc_run_and_check(
long-heg_14_gamma-sj_dmc
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_SJ_dmc
heg-long-SJ-dmc.xml
1
16
TRUE
2
HEG14GLSJ_DMC_SCALARS # DMC
)
#
# HEG14G - Slater-Jastrow-Backflow VMC
# Run 16x1, 4x4, 1x16 to test SJB cloning
#
list(APPEND HEG14GSSJB_SCALARS "totenergy" "-1.084963 0.0006") # total energy
list(APPEND HEG14GSSJB_SCALARS "variance" " 0.022667 0.000764") # energy variance
qmc_run_and_check(
short-heg_14_gamma-sjb
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_SJB
heg-short-SJB.xml
16
1
TRUE
0
HEG14GSSJB_SCALARS # VMC
)
qmc_run_and_check(
short-heg_14_gamma-sjb
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_SJB
heg-short-SJB.xml
4
4
TRUE
0
HEG14GSSJB_SCALARS # VMC
)
qmc_run_and_check(
short-heg_14_gamma-sjb
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_short_SJB
heg-short-SJB.xml
1
16
TRUE
0
HEG14GSSJB_SCALARS # VMC
)
#
# HEG14G - Slater-Jastrow-Backflow VMC
# Run 16x1, 4x4, 1x16 to test SJB cloning
#
list(APPEND HEG14GLSJB_SCALARS "totenergy" "-1.084963 0.000083") # total energy
list(APPEND HEG14GLSJB_SCALARS "variance" " 0.022667 0.000252") # energy variance
qmc_run_and_check(
long-heg_14_gamma-sjb
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_SJB
heg-long-SJB.xml
16
1
TRUE
0
HEG14GLSJB_SCALARS # VMC
)
qmc_run_and_check(
long-heg_14_gamma-sjb
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_SJB
heg-long-SJB.xml
4
4
TRUE
0
HEG14GLSJB_SCALARS # VMC
)
qmc_run_and_check(
long-heg_14_gamma-sjb
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
heg_long_SJB
heg-long-SJB.xml
1
16
TRUE
0
HEG14GLSJB_SCALARS # VMC
)
if(QMC_MIXED_PRECISION)
list(APPEND DET_HEG14GSSJB_SCALARS "totenergy" "-0.92843602 0.00002")
list(APPEND DET_HEG14GSSJB_SCALARS "kinetic" "0.76941696 0.000005")
list(APPEND DET_HEG14GSSJB_SCALARS "potential" "-1.69785298 0.00002")
else()
list(APPEND DET_HEG14GSSJB_SCALARS "totenergy" "-0.92845399 0.000001")
list(APPEND DET_HEG14GSSJB_SCALARS "kinetic" "0.76941751 0.000001")
list(APPEND DET_HEG14GSSJB_SCALARS "potential" "-1.69787150 0.000001")
endif()
qmc_run_and_check(
deterministic-heg_14_gamma-sjb
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
det_heg_short_SJB
det_heg-short-SJB.xml
1
1
TRUE
0
DET_HEG14GSSJB_SCALARS # VMC
)
if(NOT QMC_MIXED_PRECISION)
simple_run_and_check(
deterministic-heg_14_gamma-sjb-opt
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
det_heg-short-SJB_opt.xml
1
1
check_opt.py
-s
1
-p
det_heg_short_SJB
-r
./qmc-ref/ref_det_heg_short_SJB.s001.opt.xml)
list(APPEND DET_HEG14GSSJB_OPT_SCALARS "totenergy" "-0.93078813 0.000001")
qmc_run_and_check(
deterministic-heg_14_gamma-sjb-opt_vmc
"${qmcpack_SOURCE_DIR}/tests/heg/heg_14_gamma"
det_heg_short_SJB
det_heg-short-SJB_opt.xml
1
1
TRUE
2
DET_HEG14GSSJB_OPT_SCALARS # VMC
)
endif()