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

'psi4 --version' times out #404

Closed
yurivict opened this issue May 20, 2023 · 1 comment
Closed

'psi4 --version' times out #404

yurivict opened this issue May 20, 2023 · 1 comment

Comments

@yurivict
Copy link

The timeout occurs when QCEngine is run from a psi4 testcase, see this psi4 report.

This equivalent code doesn't timeout:

from qcengine.programs.psi4 import Psi4Harness

print(f"psi4.version={Psi4Harness().get_version()}")

But when run from the testcase it times out:

[yuri@freebsd13 /usr/ports/science/psi4/work/psi4-1.8/samples/cc24]$ psi4 test.in
Traceback (most recent call last):
  File "/usr/local/bin/psi4", line 374, in <module>
    exec(content)
  File "<string>", line 31, in <module>
  File "/usr/local/lib/python3.9/site-packages/psi4/driver/driver.py", line 613, in gradient
    plan.compute()
  File "/usr/local/lib/python3.9/site-packages/psi4/driver/driver_findif.py", line 1308, in compute
    t.compute(client=client)
  File "/usr/local/lib/python3.9/site-packages/psi4/driver/task_base.py", line 201, in compute
    self.result = qcng.compute(
  File "/usr/local/lib/python3.9/site-packages/qcengine/compute.py", line 105, in compute
    output_data = executor.compute(input_data, config)
  File "/usr/local/lib/python3.9/site-packages/qcengine/programs/psi4.py", line 121, in compute
    pversion = parse_version(self.get_version())
  File "/usr/local/lib/python3.9/site-packages/qcengine/programs/psi4.py", line 90, in get_version
    exc["proc"].wait(timeout=30)
  File "/usr/local/lib/python3.9/subprocess.py", line 1189, in wait
    return self._wait(timeout=timeout)
  File "/usr/local/lib/python3.9/subprocess.py", line 1909, in _wait
    raise TimeoutExpired(self.args, timeout)

subprocess.TimeoutExpired: Command '['/usr/local/bin/psi4', '--version']' timed out after 30 seconds

Printing out the relevant lines from the Psithon --> Python processed input file:
    core.IO.set_default_namespace("h2o")
    core.set_global_option("REFERENCE", "uhf")
    core.set_global_option("BASIS", "DZ")
    core.set_global_option("ROOTS_PER_IRREP", [0, 0, 1, 0])
    analytic_grad = gradient('eom-ccsd')
--> findif_grad = gradient('eom-ccsd', dertype=0)
    compare_matrices(analytic_grad, findif_grad, 5, "UHF-EOM-CCSD finite-diff. (3-pt.) vs. analytic gradient to 10^-5")
    core.set_local_option("FINDIF", "POINTS", 5)
    findif_grad = gradient('eom-ccsd', dertype=0)
    compare_matrices(analytic_grad, findif_grad, 6, "UHF-EOM-CCSD finite-diff. (5-pt.) vs. analytic gradient to 10^-7")


!----------------------------------------------------------------------------!
!                                                                            !
!  Command '['/usr/local/bin/psi4', '--version']' timed out after 30 seconds !
!                                                                            !
!----------------------------------------------------------------------------!
@loriab
Copy link
Collaborator

loriab commented Oct 31, 2023

I've tweaked psi4 --version so that it skips the import psi4 step that can be slow on network drives. It's psi4/psi4#3064 that's in master and has been backported to the v1.8.2 _2 release on conda-forge.

Note that qcengine info and other uses of get_version() on the Psi4 harness will be less reliable indicators that psi4 is in working order (e.g., numpy might be missing or mkl libraries missing).

@loriab loriab closed this as completed Oct 31, 2023
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