cbehan / pycftboot

A free frontend for the conformal bootstrap
MIT License
19 stars 10 forks source link

Search for SDPB #17

Closed definelicht closed 4 years ago

definelicht commented 4 years ago

It seems pycftboot does not fail immediately when it doesn't find SDPB.

This PR does four things:

cbehan commented 4 years ago

Thanks for the commits. There are three things I would like to change though.

  1. We don't need common.py to import modules like os, re and subprocess if bootstrap.py is already doing that.
  2. Unfortunately, the first sdpb didn't have a --version flag. So if find_executable succeeds but the check fails to run afterwards, we should just fall back to sdpb_version = 1.
  3. It might be nice to have some lines near the top of common.py that say sdpb_path_override = "" and such. If these are non-empty, find_executable(name) should just set name_path to name_path_override and return.
definelicht commented 4 years ago
  1. I've moved the extra import to bootstrap.py
  2. If calling --version fails, it assumes version 1 (I don't have SDPB 1.x, so I can't test this myself)
  3. The default behavior is now the same as before: if sdpb_path points to a file, this is used as the SDPB installation.

The downside of this setup is that no error will be thrown if sdpb_path exists, but doesn't work, but probably this is uncommon anyway.