-
-
Notifications
You must be signed in to change notification settings - Fork 3
DEV: setup pixi #6
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
Conversation
7c5bcc5
to
faf3164
Compare
b90e9de
to
8c71035
Compare
pixi.toml
Outdated
|
||
[feature.build.tasks.build-only] | ||
# Just build without configure | ||
cmd = ["cmake", "--build", "build", "-j2"] |
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 -j2
is supposed to be specific to the CI environment. I saw SciPy hardcoded some -j2
s for parallel execution in some of its workflows on Linux and copied that. I considered using $(nproc)
in CI and maybe we should still do that. I'm not sure what the default should be. Locally I build with "-j24".
Thanks for being proactive @lucascolley! I was planning to ping you about this to see if you wanted to pick it up again. |
should be ready from my side if CI is happy! BTW, I am consistently getting 2 failures locally:
|
Thanks @lucascolley. At this point local failures are expected unless you're using 64 bit Linux with GCC. The tolerances are stored in parquet files and should be platform specific, but currently we only have tolerances for one platform. I think what I'll do is first write some logic that detects the platform and applies a looser tolerance to a default tol file if there's no platform specific tol file. That should give a short term fix to the annoyance of local failures at least. |
With Pixi in this PR I would expect CI to be using the same compilers as I am on Linux64 locally, so I'm not sure where the discrepancy is... but as long as CI is passing :) |
Oh, that's interesting. You're also using 64 bit Linux locally with GCC? What's your GCC version? Locally I have 11.4.0, which should be the same as in CI. It's just what ships with Ubuntu 22.04. The values in the parquet tolerance files are the (extended) relative error values that I got locally. When the actual tests are run, there's currently a 4x multiplier applied over this to get the tolerances and it looks like you're seeing more than another 2x on top of that. Probably some optimization that's messing with results. Stephen Moshier, the Cephes author told me that whenever we see an optimization messing with accuracy like this, we should consider it a compiler bug. Apparently he used to submit patches to compilers fixing things like this when he was actively developing Cephes. |
One thing. How can one pass a |
You can see in CI (https://github.com/scipy/xsf/actions/runs/14275292967/job/40017104296?pr=6) that it is using
which should be exactly reproducible locally on Linux with |
likewise |
Oh, doubly interesting. You also have GCC 13.3.0 locally but you're still seeing local failures? |
I've switched off my linux box for the night, but if both in CI and locally the compilers installed by Pixi are used, then they should be identical (==what is specfied in |
Thanks @lucascolley, I know it's very late in your timezone so please disregard until a more reasonable time. That makes sense. I didn't realize |
I tried it out on my Mac mini and am getting weird type conversion bugs from the Parquet |
Yep very doable, see e.g. Ralf's work at https://github.com/rgommers/pixi-dev-scipystack/blob/main/scipy/pixi.toml which is a lot more complex than xsf. Simple things like generating a matrix of envs with different GCC versions are completely trivial to do. |
I tried it out. This was close. It should be
|
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.
Thanks @lucascolley. I've never used pixi
before, but it seems convenient so I'm happy to do this. I'm going to go ahead and merge this. We can iterate from here.
pixi run configure-tests | ||
pixi run build-only -j2 | ||
pixi run tests -j2 |
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.
This is not quite right, since xsref isn't cloned until the last step.
pixi run configure-tests | |
pixi run build-only -j2 | |
pixi run tests -j2 | |
pixi run clone-xsref | |
pixi run configure-tests | |
pixi run build-only -j2 | |
pixi run --skip-deps tests -j2 |
I get these on osx-arm64 too. Looks like the problem is with Lines 65 to 76 in 99ad371
|
Good catch. Yes, that's the problem. It should look like this template <typename U>
void fill_element(U &element) {
if constexpr (std::is_same_v<U, std::complex<remove_complex_t<U>>>) {
using V = remove_complex_t<U>;
V real;
V imag;
*stream_ >> real >> imag;
element = U(real, imag);
} else if constexpr (std::is_same_v<U, std::ptrdiff_t>) {
std::int64_t val;
*stream_ >> val;
element = static_cast<std::ptrdiff_t>(val);
} else{
*stream_ >> element;
}
} This is related to the NumPy default |
Initially following https://github.com/prefix-dev/pixi/blob/main/examples/cpp-sdl/pixi.toml