evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
218 stars 96 forks source link

adapt Libint library for Windows #270

Closed loriab closed 8 months ago

loriab commented 10 months ago

~(currently atop #269)~

(in decreasing order of importance)

loriab commented 9 months ago

@evaleev , don't worry too much about the GHA fails on master. I ran into the "Repo" stage skipping once before and tried to make the "Export" stage skip with https://github.com/evaleev/libint/blob/master/.github/workflows/cmake.yml#L165 (can't run b/c no tarball produced by "Repo" stage), but apparently that doesn't work. I'll try something else.

loriab commented 9 months ago

Ok, this PR is rebased to master, and GHA checks out. ~the GHA is likely to complete successfully.~

evaleev commented 9 months ago

@loriab what's the issue with * in filenames on Windows? My concern with renamings is that existing tests/inputs will stop working ... would it be sufficient to provide symlinks to the "new" names and in Basis constructor add Windows-specific logic to change * to s in basis set names?

loriab commented 9 months ago

I don't recall the actual error with *, only that it was reproducible. Sure, I think symlinks and some constructor logic would work. I'll work on that.

loriab commented 9 months ago

From the install below, it looks like Windows plain wasn't coping with the star character. I've now modified it so the star files don't get installed for Windows. Note that for all OSes, while the *->s basis files are symlinks in the repo, by the time they're exported to tarball, they are duplicate files.

2023-09-18T16:00:31.2068989Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis
2023-09-18T16:00:31.2069645Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis/3-21g.g94
2023-09-18T16:00:31.2070491Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis/6-311gss.g94
2023-09-18T16:00:31.3381459Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis/6-311g.g94
2023-09-18T16:00:31.3974234Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis/6-31g.g94
2023-09-18T16:00:31.4890708Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis/6-31gs.g94
2023-09-18T16:00:31.4895908Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis/6-31gss.g94
2023-09-18T16:00:31.4916508Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis/6-31G.g94
2023-09-18T16:00:31.4917618Z -- Installing: D:/a/libint/libint/installed/share/libint/2.8.0/basis/6-31g.g94
2023
loriab commented 9 months ago

Ok, full GHA passing again. The REGEX ... EXCLUDE lines that work correctly in local Linux testing don't actually prevent the star files from installing on Windows, but I suppose the extra files aren't doing any harm. Tests are passing on all OS w/o the earlier basis name edits.

loriab commented 9 months ago

The below shows some promise (on Linux) for filtering out the star files. I'll try it out when rebasing 271 if there isn't another GHA run before then.

    install(DIRECTORY ${PROJECT_SOURCE_DIR}/lib/basis
        COMPONENT libint2
        DESTINATION "${LIBINT2_INSTALL_DATADIR}"
        FILES_MATCHING REGEX "[A-Za-z0-9\\)].g94"
        )
loriab commented 9 months ago

Install working now -- description in PR frontmatter.

loriab commented 9 months ago

I think this is ready for consideration. After this is merged, there's a couple extra changes I can make to #271 (now that SH ordering isn't a choice at generation-time for multipoles) while doing its rebase. I'm glad to make more changes here, too.

loriab commented 8 months ago

thanks! I'll get #271 prepared.