shankar1729 / jdftx

JDFTx: software for joint density functional theory
http://jdftx.org
84 stars 54 forks source link

"####.fillings" reading error #137

Closed Leyu-Liu closed 4 years ago

Leyu-Liu commented 4 years ago

Dear Shankar: I want to read output file "####.fillings" from the previous calculation, but when i do this, it gives the following error: `---------- Setting up k-points, bands, fillings ---------- Adding inversion symmetry to k-mesh for non-inversion-symmetric unit cell. Reduced to 13 k-points under symmetry. Computing the number of bands and number of electrons Reading initial fillings from file common.fillings. Length of 'common.fillings' was 33440 instead of the expected 21736 bytes.

End date and time: Wed Sep 23 00:53:37 2020 (Duration: 0-0:00:00.11) Failed. ` it seems the output file "common.fillings" is too big? Do you know why this happens? Thanks!

shankar1729 commented 4 years ago

This could typically be due to a change in number of kpoints, bands or symmetries. Compare the number of reduced k points between the original and the new simulation to see if it changed. If you are not specifying the number of bands, make sure you don't have a change in whether you use smearing or not, because the default number of bands depends on this.

If you post the old and new log files, we can help determine the issue here too.

Best, Shankar

Leyu-Liu commented 4 years ago

Yes, it seems the number of reduced k points have changed between the original and the new simulation, is it because I do the structure optimization during the original calculation and so the stucture and symmetries have changed in this process? could you gives me some suggestions to solve it ? (I do not specify the number of bands and use the same smearing(0.01) in all my simulation)

Thanks!

1.log 2.log

shankar1729 commented 4 years ago

Indeed, it seems to have happened because the H relaxed into a symmetric position whereas the original position was less symmetric.

You should not / can't continue the state after the symmetry has changed. Delete the fillings and wfns, or omit the initial-state command.

Alternatively, you can choose not to use the new symmetry by specifying the symmetry matrices from the old calculation manually. Since you had only one symmetry before, it must be identity, so you can specify that using:

symmetries manual
symmetry-matrix \
 1 0 0 \
 0 1 0 \
 0 0 1 \
 0 0 0

However, I would recommend the simpler solution of removing the state and enforcing the new symmetries.

Best, Shankar

J-Plankton commented 2 years ago

Dear Shankar: I have same similar problems with this issue. I also try to read output file "####.fillings" from the previous calculation, but when I do this, it gives the following error: ---------- Setting up k-points, bands, fillings ---------- Adding inversion symmetry to k-mesh for non-inversion-symmetric unit cell. Reduced to 5 k-points under symmetry. Computing the number of bands and number of electrons Reading initial fillings from file vacuum.fillings. Length of 'vacuum.fillings' was 10160 instead of the expected 5960 bytes.

End date and time: Tue Jan 11 20:11:11 2022 (Duration: 0-0:00:00.27) Failed.

But the diffrence from Liuly98's issue, I do not optimize the structure for the fist calculation. I just do single point calculation in vacuum, then try to run a solvated calculation from vacuum state. I am confused that where the number of kpoints, bands or symmetries are changed. I have attached my outfiles of the 1.log two calculations. Thank you very much :D

Best, J 1.log 2.log

shankar1729 commented 2 years ago

Your first input had elec-smearing, while your second one did not. This changed the number of bands: smearing requires extra states with some empty (and picks this automatically if elec-n-bands not specified), while without smearing defaults to only occupied bands.

Additionally, note that you are running with MPI processes >> nStates. Please take a look at the getting started page and other issues posted here to ensure that you use hybrid MPI - threads effectively and keep number of processes <= nStates. (Otherwise remaining processes will simply remain idle.)

Best, Shankar

J-Plankton commented 2 years ago

Dear Shankar: Thanks for your reply! This time I turned off the command of elec-smearing in my first calculation and tried to read the "####.fillings" file for the second calculation. But the same errors occurred again: ---------- Setting up k-points, bands, fillings ---------- Adding inversion symmetry to k-mesh for non-inversion-symmetric unit cell. Reduced to 5 k-points under symmetry. Computing the number of bands and number of electrons Reading initial fillings from file vacuum.fillings. Length of 'vacuum.fillings' was 10160 instead of the expected 5960 bytes.

End date and time: Wed Jan 12 09:05:30 2022 (Duration: 0-0:00:00.28) Failed.

Can you give me some suggestions about this issue? I have attached two output files of the new calculations below. Can I just follow your suggestion above that removes the states of my first calculation and enforces the second calculation? BTW, thanks for your suggestion about using the MPI :D. My level of Linux is rudimentary to say the least, but I'm willing to work through it.

Thanks again, J 1.log 2.log

shankar1729 commented 2 years ago

Delete the 'vacuum.fillings' file. That was output by the previous round of runs and is still of the wrong size.

Without smearing i.e. with constant fillings, the 'State' output by jdftx does not include fillings. (If you need the trivial fillings output, you can add Fillings explicitly to your dump command.) Only the wfns are needed for continuing the calculation, and so only that is output. Consequently, your new 1.log run did not overwrite that file.

Best, Shankar

DaisyWang20 commented 2 years ago

Hi, dear Shankar, So, from the disscusion above, we can not first use K111, and then use K221 and read the output file of k111 (this method is often used in VASP to save time) to accelerate the calculation speeds? As you said, delete .wfns and .fillings. files otherwise it will output an error. While can other output files like .fluidState and .eigenvals be read in in k221 calculation and accelerate the overall process?

shankar1729 commented 2 years ago

You can read the density (.n) or potential (.Vscloc) files between different k-meshes. Only the wavefunctions, eigenvalues and fillings explicitly depend on the k-mesh and cannot be transferred. I suspect VASP also only uses the density / potential and not the wavefunctions etc.