-
Notifications
You must be signed in to change notification settings - Fork 33
/
OverlapHelement.C
60 lines (43 loc) · 1.23 KB
/
OverlapHelement.C
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
#include "wrapper.h"
#ifndef SERIAL
#include "mpi.h"
#endif
#include "stdio.h"
#include "stdlib.h"
#include <string>
using namespace std;
int main(int argc, char* argv []) {
int rank=0, size=1;
#ifndef SERIAL
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
#endif
initBoostMPI(argc, argv);
ReadInputFromC(argv[1], -1);
int mpsstate=0;
readMPSFromDiskAndInitializeStaticVariables();
initializeGlobalMPS(mpsstate);
if (rank ==0)
printf("Reading file %s\n", argv[2]);
test(argv[2]);
//exit(0);
//
//
/*
double overlap, hvalue;
unsigned long temp=1, occ=0;
string occstring = "1 1 0 0 1 1 0 0 1 1 0 0 0 0 1 1";
intFromString(occ, occstring.c_str());
evaluateOverlapAndHamiltonian(&occ, 1, &overlap, &hvalue);
printf("<D|0> = %18.10f <D|H|0> = %18.10f <D|H|0>/<D|0> = %18.10f \n", overlap, hvalue, hvalue/overlap);
occstring = "1 0 0 1 1 1 0 0 1 1 0 0 0 0 1 1";
intFromString(occ, occstring.c_str());
evaluateOverlapAndHamiltonian(&occ, 1, &overlap, &hvalue);
printf("<D|0> = %18.10f <D|H|0> = %18.10f <D|H|0>/<D|0> = %18.10f \n", overlap, hvalue, hvalue/overlap);
*/
#ifndef SERIAL
MPI_Finalize();
#endif
return 0;
}