Author Topic: MaxNumberOfCoulombicSites  (Read 74 times)

Mozhdeh

  • Newbie
  • *
  • Posts: 6
    • View Profile
MaxNumberOfCoulombicSites
« on: September 29, 2019, 07:11:59 AM »
Dear Pro. Dubbledam

I have encounter a message from program as:


Realloc MaxNumberOfCoulombicSites: 4672
Realloc MaxNumberOfCoulombicSites: 5184

I lookup in the algorithms and I found three part of it: first time

 // Read the definitions of the components
  MaxNumberOfCoulombicSites=0;
  LargestNumberOfCoulombicSites=0;
  MaxNumberOfBondDipoleSites=0;
  LargestNumberOfBondDipoleSites=0;
then
 // components have been read and the maximum amount of molecules has been determined for NVT
  if(!Swapable)
  {
    // the +1 molecule for the Widom particle insertion particle
    MaxNumberOfCoulombicSites=LargestNumberOfCoulombicSites+2*MaxNumberOfBeads;
    MaxNumberOfBondDipoleSites=LargestNumberOfBondDipoleSites+2*MaxNumberOfBeads;

    Adsorbates=(ADSORBATE_MOLECULE**)calloc(NumberOfSystems,sizeof(ADSORBATE_MOLECULE*));

and then

// default: start with 512 atoms in addition to a possible framework
    MaxNumberOfCoulombicSites=LargestNumberOfCoulombicSites+MAX2(MaxNumberOfBeads,512);
    MaxNumberOfBondDipoleSites=LargestNumberOfBondDipoleSites+MAX2(MaxNumberOfBeads,512);
 // default: start with 256 adsorbates
    Adsorbates=(ADSORBATE_MOLECULE**)calloc(NumberOfSystems,sizeof(ADSORBATE_MOLECULE*));
    for(i=0;i<NumberOfSystems;i++)
    {
      MaxNumberOfAdsorbateMolecules=256;
      Adsorbates=(ADSORBATE_MOLECULE*)calloc(MaxNumberOfAdsorbateMolecules,sizeof(ADSORBATE_MOLECULE));
    }

Does the message means that the number of adsorbates exceeds a specific number? does the system stuck in a loop or some thing like that?

David Dubbeldam

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
Re: MaxNumberOfCoulombicSites
« Reply #1 on: September 29, 2019, 11:45:36 AM »
In open ensembles (Gibbs, grand-canonical ensemble) the number of molecules fluctuates. So if more memory is needed the code needs to realloc the memory to make it larger.

Mozhdeh

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: MaxNumberOfCoulombicSites
« Reply #2 on: October 01, 2019, 03:28:39 PM »
Thanks for the fast respond.
For me, It seems that the run stuck in the initialization part. It takes two days for a structure with more than 2600 atoms and nothing happens after appearance of this message. And actually I found out that running simultaneous jobs of 1 structure with different conditions, for example different pressures, gives wrong results. So the jobs should be run individually. Since I am using a 6-core system (each with 2 thread)  with 16 GB of memory I wonder, Is there a way to manage memory allocation to use the total power of a given PC?
Regards

David Dubbeldam

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
Re: MaxNumberOfCoulombicSites
« Reply #3 on: October 04, 2019, 01:18:16 PM »
You could do some basic debugging, like setting the PrintEvery to 1 and see if it is just slow or that you are really stuck at step 0.
The latter can happen if you try to put in more molecules than fit in the simulation volume.