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

Problem with array reshaping #157

Closed
vvp-nsk opened this issue Sep 21, 2022 · 10 comments
Closed

Problem with array reshaping #157

vvp-nsk opened this issue Sep 21, 2022 · 10 comments

Comments

@vvp-nsk
Copy link

vvp-nsk commented Sep 21, 2022

Hi!

I am trying to perform a production run by using only CPU version of IPIE. My calculation crashed with the following error message:

# Constructing half rotated Cholesky vectors.
# Shape of alpha half-rotated Cholesky: (1456, 15576)
# Shape of beta half-rotated Cholesky: (1456, 14632)
# Only performing half-rotation of the reference determinant
Traceback (most recent call last):
File "/home/Develop/ipie/bin/ipie", line 63, in
main(sys.argv[1])
File "/home/Develop/ipie/bin/ipie", line 57, in main
(afqmc, comm) = setup_calculation(options.remaining_options[0])
File "/home/Develop/ipie/ipie/qmc/calc.py", line 43, in setup_calculation
afqmc = get_driver(options, comm)
File "/home/Develop/ipie/ipie/qmc/calc.py", line 60, in get_driver
afqmc = AFQMCBatch(
File "/home/Develop/ipie/ipie/qmc/afqmc_batch.py", line 220, in init
self.trial = get_trial_wavefunction(
File "/home/Develop/ipie/ipie/trial_wavefunction/utils.py", line 104, in get_trial_wavefunction
trial.half_rotate(system, hamiltonian, scomm)
File "/home/Develop/ipie/ipie/trial_wavefunction/multi_slater.py", line 771, in half_rotate
self._rH1b = self._rH1b.reshape(nb, M)
ValueError: cannot reshape array of size 15576 into shape (62,236)

Could you please advise me on how to fix the error and proceed further with AFQMC calculation?

With best regards,
Victor

@linusjoonho
Copy link
Collaborator

It seems like some of the input variables are inconsistent. Would you show us your input?

@vvp-nsk
Copy link
Author

vvp-nsk commented Sep 21, 2022

Hi!

Attached please find corresponding 'input.json'

input.json.zip

With best regards,
Victor

@linusjoonho
Copy link
Collaborator

I think this might have been solved by #153
Are you using the latest master branch?

@vvp-nsk
Copy link
Author

vvp-nsk commented Sep 21, 2022

Hi!

The problem is reproducible within the latest master branch. Would it help if I share 'hamiltonian.h5' (~620MB), and 'wavefunction.h5' files?

With best regards,
Victor

@linusjoonho
Copy link
Collaborator

Would you share a code (or a procedure) you used to generate these files? Also, if you can reproduce these in a much smaller molecule, that'd be very useful too. This seems to only happen if # of alpha electrons != # of beta electrons.

@fdmalone
Copy link
Collaborator

fdmalone commented Sep 22, 2022

Could you also paste all of the standard output here? I tried to reproduce the issue with both single and multi determinant trials with nalpha != nbeta and didn't hit it.

@vvp-nsk
Copy link
Author

vvp-nsk commented Sep 22, 2022

Hi!

Would you share a code (or a procedure) you used to generate these files? Also, if you can reproduce these in a much smaller molecule, that'd be very useful too. This seems to only happen if # of alpha electrons != # of beta electrons.

python pyscf_to_ipie.py -i 'scf.chk' -j 'input.json'

Could you also paste all of the standard output here? I tried to reproduce the issue with both single and multi determinant trials with nalpha != nbeta and didn't hit it.

Enclosed please find corresponding log.
ipie.out.zip

I am puzzled a bit because of the warnings:

/home/vivy/distros/2022/2/intelpython/latest/lib/python3.9/site-packages/numba_dppy/config.py:57: UserWarning: Please install dpctl 0.8.* or higher.
warnings.warn(msg, UserWarning)
/home/vivy/distros/2022/2/intelpython/latest/lib/python3.9/site-packages/numba/core/cpu.py:97: UserWarning: Numba extension module 'numba_dppy.numpy_usm_shared' failed to load due to 'ImportError(Importing numba_dppy failed)'.
numba.core.entrypoints.init_all()

In fact, the dpctl as well as numba-dppy packages are installed:

dpctl 0.12.0 py39h6461980_0 file:///home/vivy/distros/2022/2/conda_channel
numba-dppy 0.18.0 py39h87db2bc_0 file:///home/vivy/distros/2022/2/conda_channel

With best regards,
Victor

@fdmalone
Copy link
Collaborator

Are you using a ROHF trial wavefunction? Could you paste the pyscf script used to generate scf.chk?

@vvp-nsk
Copy link
Author

vvp-nsk commented Sep 22, 2022

Hi again!

Yes, I am using the MF ROHF trial wavefunction. Right now I can surely share the *.h5 files, but I doubt about PySCF input.

With best regards,
Victor

@fdmalone
Copy link
Collaborator

ok, #158 should fix the issue when merged. In future if it's not possible to share the pyscf input it would be helpful to know molecular size (nalpha, nbeta, nmo, nchol) and the form of trial wavefunction (single determinant RHF/UHF/ROHF/....) or multi determinant. This helps narrow down the source of the error.

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

3 participants