-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove superbuild #43
Conversation
@maxscheurer current status:
Questions:
|
I think the enormous change is probably not worth it for now, unless it'll make Win stuff easier? @loriab any hints on making the tests run on Win? (See comments above) |
It might make the windows stuff easier, but I think it's really within reach as things stand right now. Also, the Windows conda package builds, so we can skip running tests here for now, make a new release, and revisit later. |
What if instead of building w/ CMake, we run |
On the Windows testing, it doesn't look like you're installing cppe anymore, and I wonder if that might help. There's only one mention of the |
Indeed the Python package ends up in |
OK, now tests run and pass on all 3 platforms. On Windows, the failure was a combination of 4 things:
Now I have to modify the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing important here -- just thought I'd read through and see what other projects are doing.
.github/workflows/ci.yml
Outdated
environment-file: .github/environment.yml | ||
channel-priority: strict | ||
python-version: ${{ matrix.python-version }} | ||
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You risk running out of packages soon and having inexplicable can't-solve environments with this since c-f is only serving up .conda
packages now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've seen that somewhere else. I just wanted to get caching to work and it seems that tar-bz2 option is needed for that.
.github/workflows/ci.yml
Outdated
python -m pytest --capture=no --log-cli-level=INFO --pyargs cppe | ||
else | ||
export PYTHONPATH=$PYTHONPATH:Software/lib/python${{ matrix.python-version }}/site-packages | ||
python -m pytest --capture=no --log-cli-level=INFO --pyargs cppe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations on your hard-won pytest line :-)
Adding --color yes
makes it prettier.
if(CMAKE_CXX_COMPILER_ID MATCHES Intel) | ||
set(ARCH_FLAG "-xHost") | ||
endif() | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case it's handy, here's a modernized xhost set: https://github.com/jturney/ambit/blob/master/cmake/xhost.cmake . it gets combined with https://github.com/jturney/ambit/blob/master/CMakeLists.txt#L68
auto-update-conda: true | ||
auto-activate-base: false | ||
activate-environment: cppe-gha | ||
environment-file: .github/environment.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it ever starts being painful to solve, I'm a fan of mamba in CI: https://github.com/psi4/psi4/blob/master/.github/workflows/ecosystem.yml#L255-L256
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried mamba actually, but for some reason it failed to solve 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh, gtk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But i think it's because of my insistence on tar.bz2. I'll bust the cache and retry without that option. Let's see. Maybe I get the caching cake and I eat it too with mamba
cd | ||
|
||
if [ "${{ matrix.os }}" == "windows-latest" ]; then | ||
export KMP_DUPLICATE_LIB_OK=TRUE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anyone knows or reads a good explanation of the threading situation on Windows, please forward. I've avoided the KMP_DUPLICATE route for psi4 by using Intel OpenMP and the build solution inherited from Raimondas, https://github.com/conda-forge/psi4-feedstock/blob/main/recipe/meta.yaml#L66-L77 . More library and compiler confusion here https://gitlab.kitware.com/cmake/cmake/-/issues/23241#note_1145997 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went on the (lazy) path of least resistance and used the KMP_DUPLICATE_LIB_OK hack... Maybe the solution by Raimondas is the best thing to do if problems arise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The principle of what Raimondas did seems sound, but hiding away an old import lib at GH to link against is decidedly weird -- I'm a little shocked it made it through staged-recipes review. My path of least resistance was to take trouble at the build stage and avert showing KMP_DUPLICATE weakness to the user. :-) No idea which is better -- I'm just fishing for guidance. I'll let you know if I hear of any trouble with the Raimondas route.
I guess other than that, just the PyPI pipeline needs to be refactored, but I can take care of that in a separate PR. |
Yes, you can squash-merge this. If you're willing to wait a couple more days I can do the overhaul of |
Sure, that'd be great 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
See discussion here conda-forge/cppe-feedstock#22
pyproject.toml
it can be in therequires
of the build system, so that pip itself figures out how to satisfy the dependency.setup.py
to usescikit-build
.git grep
returns mentions ofscikit-build
but I can't see it used.