Skip to content

Commit e447d02

Browse files
authored
Merge pull request #350 from PDoakORNL/kagome_example
initial kagome example
2 parents 1446a43 + 362ee1d commit e447d02

3 files changed

Lines changed: 143 additions & 0 deletions

File tree

examples/kagome/gen_temps.awk

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/awk -f
2+
BEGIN {
3+
# Configuration - modify these values
4+
output_file = "input.sp.in"
5+
directory_prefix = "T_"
6+
temp_tag = "BETA"
7+
temp_list = "1.0,0.4,0.25"
8+
ntemps = split(temp_list, temps, ",")
9+
prev_temp_tag = "PREVIOUS_TEMP"
10+
current_temp_tag = "CURRENT_TEMP"
11+
# Constant tag replacements
12+
tags["DENS"] = "0.5"
13+
tags["HUBBARDU"] = "4"
14+
tags["VEC1"] = "[2,0]"
15+
tags["VEC2"] = "[0,2]"
16+
tags["ITERS"] = "3"
17+
}
18+
19+
# Skip BEGIN block for actual processing
20+
FNR == 1 {
21+
# Read the entire template into memory
22+
template = ""
23+
}
24+
25+
{
26+
template = template $0 "\n"
27+
}
28+
29+
END {
30+
# Process for each value in range
31+
for (i = 1; i <= ntemps; i++) {
32+
outdir = directory_prefix temps[i]
33+
status = system("mkdir " outdir)
34+
outfile = outdir "/" output_file
35+
# Start with template
36+
content = template
37+
# Replace varying tag
38+
beta = 1.0 / temps[i]
39+
gsub(temp_tag, beta, content)
40+
gsub(current_temp_tag, temps[i], content)
41+
prev_temp = "zero"
42+
if (i != 1) {
43+
prev_temp = "./" directory_prefix temps[i - 1] "/dca_sp.hdf5"
44+
}
45+
gsub(prev_temp_tag, prev_temp, content)
46+
# Replace constant tags
47+
for (tag in tags) {
48+
gsub(tag, tags[tag], content)
49+
}
50+
# Write output file
51+
printf("%s", content) > outfile
52+
close(output_file)
53+
print "Created " output_file
54+
}
55+
}

examples/kagome/input_sp.json.in

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"output": {
3+
"directory": "./T_CURRENT_TEMP/",
4+
"output-format": "HDF5",
5+
"filename-dca": "dca_sp.hdf5",
6+
"filename-profiling": "profiling.json",
7+
"dump-lattice-self-energy": true,
8+
"dump-cluster-Greens-functions": true,
9+
"dump-Gamma-lattice": false,
10+
"dump-chi-0-lattice": false
11+
},
12+
"physics": {
13+
"beta": BETA,
14+
"density": DENS,
15+
"chemical-potential": 0.,
16+
"adjust-chemical-potential": true
17+
},
18+
"Kagome-Hubbard-model": {
19+
"t": 1.,
20+
"U": HUBBARDU
21+
},
22+
"DCA": {
23+
"initial-self-energy": "PREVIOUS_TEMP",
24+
"iterations": ITERS,
25+
"accuracy": 0.,
26+
"self-energy-mixing-factor": 0.75,
27+
"interacting-orbitals": [0],
28+
29+
"coarse-graining": {
30+
"k-mesh-recursion": 3,
31+
"periods": 0,
32+
"quadrature-rule": 1,
33+
"threads": 1,
34+
"tail-frequencies": 0
35+
}
36+
},
37+
"domains": {
38+
"real-space-grids": {
39+
"cluster": [VEC1,
40+
VEC2],
41+
"sp-host": [[10, 10],
42+
[10,-10]]
43+
},
44+
"imaginary-time": {
45+
"sp-time-intervals": 256
46+
},
47+
"imaginary-frequency": {
48+
"sp-fermionic-frequencies": 256
49+
}
50+
},
51+
52+
"Monte-Carlo-integration": {
53+
"seed": random,
54+
"warm-up-sweeps": 100,
55+
"sweeps-per-measurement": 1.,
56+
"measurements": 100000,
57+
58+
"threaded-solver": {
59+
"walkers": 3,
60+
"accumulators": 3,
61+
"shared-walk-and-accumulation-thread": true
62+
}
63+
},
64+
65+
"CT-AUX": {
66+
"expansion-parameter-K": 4.,
67+
"initial-configuration-size": 16,
68+
"initial-matrix-size": 16,
69+
"max-submatrix-size": 256,
70+
"neglect-Bennett-updates": false,
71+
"additional-time-measurements": false
72+
}
73+
}

examples/kagome/submit_conv.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
#SBATCH -A cph102
4+
#SBATCH -J DCA_kagome
5+
#SBATCH -o %x-%j.out
6+
#SBATCH -t 00:30:00
7+
#SBATCH -p batch
8+
#SBATCH -q debug
9+
#SBATCH -N 8
10+
#SBATCH --threads-per-core=1
11+
#SBATCH -C nvme
12+
13+
srun --ntasks-per-node 7 -m block:cyclic --gpus-per-task=1 --gpu-bind=closest -n 56 -c 1 ../../applications/dca/main_dca T_1.0/input.sp.in
14+
srun --ntasks-per-node 7 -m block:cyclic --gpus-per-task=1 --gpu-bind=closest -n 56 -c 1 ../../applications/dca/main_dca T_0.4/input.sp.in
15+
srun --ntasks-per-node 7 -m block:cyclic --gpus-per-task=1 --gpu-bind=closest -n 56 -c 1 ../../applications/dca/main_dca T_0.25/input.sp.in

0 commit comments

Comments
 (0)