numat / RASPA2

NO LONGER UPDATED. Use the official repository.
https://github.com/iraspa/RASPA2
Other
73 stars 72 forks source link

MakeGrid issue of N2 #26

Closed headhuanglan closed 7 years ago

headhuanglan commented 7 years ago

The N_n2 atom type VDW can be grid correctly. But I can not get the Ewald grid. The program will stop without any error. I chekced the 'grid.c' code, but I can not figure out why the program halts.

Is there a N2 grid example available ?

headhuanglan commented 7 years ago

problem solved. There is not enough memory to allocate the grid. If the author could add some warning to this situation, it could be better.

  // Allocate the memory for this grid
  CoulombGrid=(float****)calloc(NumberOfCoulombGridPoints.x+1,sizeof(float***));
  for(i=0;i<=NumberOfCoulombGridPoints.x;i++)
  {
    CoulombGrid[i]=(float***)calloc(NumberOfCoulombGridPoints.y+1,sizeof(float**));
    for(j=0;j<=NumberOfCoulombGridPoints.y;j++)
    {
      CoulombGrid[i][j]=(float**)calloc(NumberOfCoulombGridPoints.z+1,sizeof(float*));
      for(k=0;k<=NumberOfCoulombGridPoints.z;k++)
        CoulombGrid[i][j][k]=(float*)calloc(8,sizeof(float));
    }
  }
patrickfuller commented 7 years ago

This repo is a mirror. I'd recommend emailing the author (David Dubbeldam) directly to add in some warning logic.

chdashtyj commented 5 years ago

Hello there, I encounter the same problem when compute C2H6 Ewald grid. The program just gave "killed" word and finished. So if this is a problem about memory insufficient, and how can I solve this problem thank you.