16 #include "FirstMultiply.h" 17 #include "expec_energy_flct.h" 18 #include "common/setmemory.h" 19 #include "wrapperMPI.h" 45 long unsigned int u_long_i;
52 #pragma omp parallel default(none) private(i, mythread, u_long_i, dsfmt) \ 53 shared(v0, v1, nthreads, myrank, rand_i, X, stdoutMPI, cLogCheckInitComplex, cLogCheckInitReal) \ 57 for (i = 1; i <= i_max; i++) {
66 mythread = omp_get_thread_num();
71 dsfmt_init_gen_rand(&dsfmt, u_long_i);
77 for (i = 1; i <= i_max; i++)
78 v1[i] = 2.0*(dsfmt_genrand_close_open(&dsfmt) - 0.5) + 2.0*(dsfmt_genrand_close_open(&dsfmt) - 0.5)*I;
82 for (i = 1; i <= i_max; i++)
83 v1[i] = 2.0*(dsfmt_genrand_close_open(&dsfmt) - 0.5);
92 #pragma omp parallel for default(none) private(i) shared(v1, i_max) reduction(+: dnorm) 93 for(i=1;i<=i_max;i++){
94 dnorm += conj(
v1[i])*
v1[i];
99 #pragma omp parallel for default(none) private(i) shared(v0,v1) firstprivate(i_max, dnorm) 100 for(i=1;i<=i_max;i++){
113 #pragma omp parallel for default(none) private(i) shared(v0, v1, list_1) firstprivate(i_max, Ns, LargeValue, myrank) 114 for(i = 1; i <= i_max; i++){
119 #pragma omp parallel for default(none) private(i) shared(v0) firstprivate(i_max) reduction(+: dnorm) 120 for(i=1;i<=i_max;i++){
121 dnorm += conj(
v0[i])*
v0[i];
126 #pragma omp parallel for default(none) private(i) shared(v0) firstprivate(i_max, dnorm) 127 for(i=1;i<=i_max;i++){
struct DefineList Def
Definision of system (Hamiltonian) etc.
void StartTimer(int n)
function for initializing elapse time [start]
double complex SumMPI_dc(double complex norm)
MPI wrapper function to obtain sum of Double complex across processes.
unsigned long int idim_max
The dimension of the Hilbert space of this process.
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
int FirstMultiply(int rand_i, struct BindStruct *X)
Multiplication at the first step for TPQ mode ( is the random or inputted vector).
int nthreads
Number of Threads, defined in InitializeMPI()
unsigned int NsiteMPI
Total number of sites, differ from DefineList::Nsite.
const char * cFileNameTimeKeep
long int initial_iv
Seed of random number for initial guesss of wavefunctions.
int myrank
Process ID, defined in InitializeMPI()
int expec_energy_flct(struct BindStruct *X)
Parent function to calculate expected values of energy and physical quantities.
int iInitialVecType
Switch for type of inital vectors. 0:complex type, 1: real type. default value is set as 0 in readdef...
struct CheckList Check
Size of the Hilbert space.
int TimeKeeperWithRandAndStep(struct BindStruct *X, const char *cFileName, const char *cTimeKeeper_Message, const char *cWriteType, const int irand, const int istep)
Functions for writing a time log.