News:

SMF - Just Installed!

Main Menu

MaxNumberOfCoulombicSites

Started by Mozhdeh, September 29, 2019, 08:11:59 AM

Previous topic - Next topic

Mozhdeh

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

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

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

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.

yimin88

Yes, this way can work to check whether your script is right or not. This message is telling that you program will run slowly to get results. from my experience, it may take 6 hours to get 100 cycle from my PC (16G RAM, 4 CPU core).

AntonioDouglas

Hello everyone!
I am having the same problem when trying to use RASPA 2.0.47. At the time, I am running calculations in a highthroughput screening scheme. However, only a part of the .cif files that constitute the group of structures I am studying are calculated. The other structures fall into a loop that returns the following calculation status in a slurm file:
"
[...]
unknown: 1,000
unknown: 1,000
unknown: 1,000
End reading cif-file
Shift all potentials
'force_field.def' file not found and therefore not used
Realloc MaxNumberOfCoulombicSites: 2048
realloc(): invalid next size
_cell_length_a: 7.119000
_cell_length_b: 21.580000
_cell_length_c: 9.100000
_cell_length_alpha: 90.000000
_cell_length_beta: 90.000000
_cell_length_gamma: 90.000000
_symmetry_space_group_name_H-M: P 1 found space group: 1
_symmetry_Int_Tables_number: 1
space group found from symmetry elements: 1 (nr elements: 1)
unknown: 1,000
unknown: 1,000
[...]
unknown: 1,000
unknown: 1,000
unknown: 1,000
End reading cif-file
Shift all potentials
'force_field.def' file not found and therefore not used
free(): invalid pointer
Realloc MaxNumberOfCoulombicSites: 2048
realloc(): invalid next size
free(): invalid pointer
Realloc MaxNumberOfCoulombicSites: 2048
realloc(): invalid next size
free(): invalid pointer
free(): invalid pointer
Realloc MaxNumberOfCoulombicSites: 2048
realloc(): invalid next size
free(): invalid pointer
"
And then the calculation crashes in an abnormal termination.

I am a beginner with RASPA. I looked in the manual, chapter 5 "the source code" and found no mention of the part of the code that deals with the subject raised (MaxNumberOfCoulombicSites).

Can you tell me where, in which file contained in the /src/ folder I can find the code, and what is the best way to modify it so that I can overcome this problem?

Thank you in advance, thank you very much.