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 windows version and outfile psiapi mode #201

Merged
merged 17 commits into from
Dec 21, 2019
Merged

Conversation

loriab
Copy link
Collaborator

@loriab loriab commented Dec 16, 2019

Description

Fixes in conjunction with psi4 ddd. Still needs printing cleared out, after I confirm working.

Changelog description

  • Switch psi4 --version collection to only grab the last line. This should fix version collection on Windows #200, but I can't say for sure because chocolatey is down again.
  • Use an independent tmpdir for each psi4 run in psiapi mode, not just exe.
  • Reset the scratch dir for psi4 in psiapi mode, so set guess read in distributed driver has a chance.
  • Add a connection to a postclean kwarg to cleanup the qcschema_tmpfile at end of routine (suitable for psiapi) rather than at atexit

Status

  • Code base linted
  • Ready to go SQUASH!

@codecov
Copy link

codecov bot commented Dec 16, 2019

Codecov Report

Merging #201 into master will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@dgasmith
Copy link
Collaborator

Squash merge when you are ready.

@loriab
Copy link
Collaborator Author

loriab commented Dec 21, 2019

This PR will also end up fixing the Windows error in execute below, though I haven't yet identified the minimum fix.

Traceback (most recent call last):
  File "D:\a\1\b\install\bin\psi4", line 331, in <module>
    exec(content)
  File "<string>", line 32, in <module>
  File "D:\a\1\b\install\lib\psi4\driver\driver.py", line 622, in gradient
    plan.compute()
  File "D:\a\1\b\install\lib\psi4\driver\driver_findif.py", line 1034, in compute
    t.compute(client=client)
  File "D:\a\1\b\install\lib\psi4\driver\task_base.py", line 156, in compute
    local_options={"memory": core.get_memory()/1000000000, "ncores": core.get_num_threads()}
  File "D:\a\1\b\install\lib\qcengine\compute.py", line 91, in compute
    output_data = executor.compute(input_data, config)
  File "D:\a\1\b\install\lib\qcengine\programs\psi4.py", line 171, in compute
    run_cmd, input_files, ["data.msgpack"], as_binary=["data.msgpack"], scratch_directory=tmpdir
  File "D:\a\1\b\install\lib\qcengine\util.py", line 459, in execute
    with popen(command, popen_kwargs=popen_kwargs) as proc:
  File "C:\tools\miniconda3\lib\contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "D:\a\1\b\install\lib\qcengine\util.py", line 285, in popen
    ret = {"proc": subprocess.Popen(args, **popen_kwargs)}
  File "C:\tools\miniconda3\lib\subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "C:\tools\miniconda3\lib\subprocess.py", line 991, in _execute_child
    args = list2cmdline(args)
  File "C:\tools\miniconda3\lib\subprocess.py", line 481, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg

TypeError: argument of type 'WindowsPath' is not iterable

@dgasmith
Copy link
Collaborator

I guess we need to spin up windows CI as well.

@loriab
Copy link
Collaborator Author

loriab commented Dec 21, 2019

Yeah, psi will effectively catch a lot for you, but half hour build is trying. I assume qcng will head azure-wards, too, eventually.

There's still something really bad in the detci+windows+psiapi+qcengine+subsequent_calc combination, but I have my fingers crossed that these Path changes may help that, too.

@dgasmith
Copy link
Collaborator

I think GHA+Windows will be the builds over Azure windows images. Pretty big fan of GHA once the codecov issue is patched up.

@loriab
Copy link
Collaborator Author

loriab commented Dec 21, 2019

Going with this version since it gives a clean DDD psi4/psi4#1351. Goodness knows the tmpdir commented line looks necessary, but detci on windows sure hates it. I didn't go back to psiexe and confirm I caught the important line for WindowPath error, but I bet I did, and I can always refix. Final result -- 17 commits for 7 lines.

@dgasmith dgasmith merged commit 55c1b6d into MolSSI:master Dec 21, 2019
@loriab loriab deleted the winver branch December 24, 2019 19:11
muammar added a commit to muammar/QCEngine that referenced this pull request Jan 9, 2020
* master: (29 commits)
  CI for NWChem (MolSSI#212)
  Make sure input extras tags get to the output
  Added NWChem to the canonical harness tests
  Calls to rtdb must use all threads
  Remove assumption that NWChem uses original order of atoms
  Fixed test for cores_per_rank
  Correctly determine memory sizes, when MPI should be used
  Account for cores_per_rank when computing total ranks
  Added a more difficult test for the nwchem hessian
  Read hessian array in proper order
  Use pep8 variable names
  Rotate gradients and hessian to match input molecule
  Linted with black
  Added Hessian support and improved gradient accuracy
  Allow for methods that are combinations of several functionals
  psi4 windows version and outfile psiapi mode (MolSSI#201)
  NWCHEM:  added keyword dft to xc_functionals list.  If method == "dft" (MolSSI#204)
  entos: Updated QCER hash and program_overview.rst
  black reformatting
  entos: AO reordering added to unrestricted wavefunction properties
  ...
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

Successfully merging this pull request may close these issues.

version collection on Windows
2 participants