Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot output quasiparticle data by -sdata #35

Open
zhangxiaoyu2046 opened this issue Oct 28, 2024 · 1 comment
Open

cannot output quasiparticle data by -sdata #35

zhangxiaoyu2046 opened this issue Oct 28, 2024 · 1 comment

Comments

@zhangxiaoyu2046
Copy link

zhangxiaoyu2046 commented Oct 28, 2024

Hi everyone,

I want to obtain the lifetime of each phonon mode. When I tried to obtain the quasiparticle phonon data by running:
$ dynaphopy input_file TRAJECTORY -sdata
there was an error:

Traceback (most recent call last):
File "/home/wa9055/miniconda3/envs/phonopy2.22/bin/dynaphopy", line 376, in
calculation.write_quasiparticles_data(with_extra=args.save_extra_properties)
File "/home/wa9055/miniconda3/envs/phonopy2.22/lib/python3.12/site-packages/dynaphopy/init.py", line 1239, in write_quasiparticles_data
quasiparticle_data = self.get_commensurate_points_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wa9055/miniconda3/envs/phonopy2.22/lib/python3.12/site-packages/dynaphopy/init.py", line 1101, in get_commensurate_points_data
phonopy_dos = pho_interface.obtain_phonopy_dos(self.dynamic.structure,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wa9055/miniconda3/envs/phonopy2.22/lib/python3.12/site-packages/dynaphopy/interface/phonopy_link.py", line 166, in obtain_phonopy_dos
phonon.run_mesh(mesh)
File "/home/wa9055/miniconda3/envs/phonopy2.22/lib/python3.12/site-packages/phonopy/api_phonopy.py", line 1716, in run_mesh
self._mesh.run()
File "/home/wa9055/miniconda3/envs/phonopy2.22/lib/python3.12/site-packages/phonopy/phonon/mesh.py", line 303, in run
self._set_phonon()
File "/home/wa9055/miniconda3/envs/phonopy2.22/lib/python3.12/site-packages/phonopy/phonon/mesh.py", line 437, in _set_phonon
dynmat = run_dynamical_matrix_solver_c(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wa9055/miniconda3/envs/phonopy2.22/lib/python3.12/site-packages/phonopy/harmonic/dynamical_matrix.py", line 1222, in run_dynamical_matrix_solver_c
dynmat = np.zeros((len(qpoints), len(p2s) * 3, len(p2s) * 3), dtype=np.complex64) #dtype_complex
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 13.8 TiB for an array with shape (8400, 15000, 15000) and data type complex64

seems that the numpy array is too large to be created? my structure has 5000 atoms, and the velocity.lammpstrj is about 14 GB.
when I switched to a fat computation node with very large RAM, there is no output after 3 days while the process was stucked somewhere of dynaphopy code.
when I tried to test on a smaller structure with less atoms (162 atoms), there was another error:

/var/spool/slurmd/job09243/slurm_script: line 17: 83200 Segmentation fault dynaphopy input velocity.lammpstrj -ts 0.001 -r -5 60 -sdata

I don't know where I was wrong, could someone explain a bit about the workflow of generating the quasiparticle info? Is it necessary to perform a peak analysis by $ dynaphopy input_file TRAJECTORY -pa, before I run the -sdata command?

Many thanks!

@abelcarreras
Copy link
Owner

dear @zhangxiaoyu2046,

I think that, as you say, the size of your trajectory does not fit into the available RAM and numpy cannot allocate the memory.
You can take a look at this section of dynaphopy's manual:

https://abelcarreras.github.io/DynaPhoPy/special.html

There, I describe different strategies that you can use to deal with large trajectories.

About the second error I don't know. Segmentation fault is too vague to figure out what is happening. Maybe it is also some memory issue. Did you try to run some of the provided examples (which are much smaller) to make sure that the installation is correct?.

The way dynaphopy work is to first read all the data from the trajectory in memory to compute the atomic velocities and then the power spectrum (this is where the memory usage is highest). Then, -sdata option just tells dynaphopy to store the results in a file. This latter part should not impact much to the memory usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants