issp-center-dev / mVMC

A numerical solver package for a wide range of quantum lattice models based on many-variable Variational Monte Carlo method
http://www.pasums.issp.u-tokyo.ac.jp/mvmc/en/
GNU General Public License v3.0
59 stars 19 forks source link

problem with many sites #12

Closed nikita-astronaut closed 4 years ago

nikita-astronaut commented 4 years ago

Dear developers of the mVMC,

my problem is as follows. I consider a spin system with many sites (6^3 x 4 = O(800)). Not questioning the validity of the method with so many sites, my problem is that mVMC fails to make even one single optimization step.

The number of parameters is 1740 (jastrow) + 3456 (orbitals) + 4 (Gutzwiller). I use Nstore = 0, NSRCG = 1.

In order to make the code not fail, I had to comment out lines like

    //if(loop>100) {
    //  if(rank==0) fprintf(stderr, "error: makeInitialSample: Too many loops\n");
    //  MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
    //} 

in the files like vmcmake.c.

The code run at 36 skylake cores fails to make 1 iteration with 10(!!!) samples. So it seems like it is stuck somewhere. I investigated a bit and the code is stuck at this loop and simply can not initialize the initial spin configuration. Meaning, the result of flag = CalculateMAll_fcmp(eleIdx,qpStart,qpEnd); is always False. But the reason for that is unclear to me. Could you please help me resolve this issue?

tmisawa commented 4 years ago

Dear Nikita Astrakhantsev,

The reason for the failure is that the floating-point overflow occurs during computation of the Pfaffian of a large skew-symmetric matrix.

To avoid this, please change the parameter "D_AmpMax" , which is defined in parameter.c (D_AmpMax=4 is the default setting). By changing D_AmpMax = 0.5, I think it is possible to avoid the overflow.

I hope that this information will be helpful for you.

Best, Takahiro Misawa

nikita-astronaut commented 4 years ago

Dear Takahiro,

thank you. This indeed helped and now the code works.