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

Update CI runners #2122

Merged
merged 6 commits into from
Dec 11, 2024
Merged

Update CI runners #2122

merged 6 commits into from
Dec 11, 2024

Conversation

albinahlback
Copy link
Collaborator

In particular, remove x86 macOS runner since they are deprecated on Github.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edgarcosta How can I find Clang systematically here? I believe Clang is not on the path, so I have to manually get the path, but I don't want to guess the version of llvm (see line 219).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got the runner working with the latest llvm, but then make check fails

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, newer LLVM doesn't seem to like FLINT.

@albinahlback albinahlback force-pushed the ci_update branch 2 times, most recently from 04e9e93 to 2f3f58f Compare December 9, 2024 14:03
albinahlback and others added 3 commits December 9, 2024 14:03
In particular, remove x86 macOS runner since they are deprecated on
Github.

Co-authored-by: Edgar Costa <edgarc@mit.edu>
It currently segfaults when compiling some tests.  Hence, currently
allow this to fail without failing the whole action.
@albinahlback
Copy link
Collaborator Author

@fredrik-johansson I think I have fixed a lot of errors for generic macros (like add_s{n}a{2n}). We cannot have something like

# define add_ssaaaa(s1, s0, a1, a0, b1, b0) \
  do { \
    ulong __t0 = (a0); \
    (s0) = (a0) + (b0); \
    (s1) = (a1) + (b1) + ((ulong) (s0) < __t0); \
  } while (0)

# define add_sssaaaaaa(s2, s1, s0, a2, a1, a0, b2, b1, b0) \
  do { \
    ulong __t0, __t1; \
    add_ssaaaa(__t0, s0, (ulong) 0, a0, (ulong) 0, b0); \
    add_ssaaaa(__t1, s1, (ulong) 0, a1, (ulong) 0, b1); \
    add_ssaaaa(s2, s1, (a2) + (b2), s1, __t1, __t0); \
  } while (0)

since __t0 is used in both add_sssaaaaaa and add_ssaaaa. Not sure why it causes a problem, though, just that this fixes the problem. src/test, mpn_extras and ulong_extras seems to work fine now, but one matrix multiplication in nfloat seems to fail; I'm unable to track where this error stems from. Temporarily, we can check the fails on generic macros by commenting out everything between line 28 and line 58 in longlong.h, but we should integrate this into our CI.

@fredrik-johansson
Copy link
Collaborator

How should I configure FLINT to reproduce the nfloat failure?

@albinahlback
Copy link
Collaborator Author

How should I configure FLINT to reproduce the nfloat failure?

You can configure as normal, but just comment out every longlong_*.h inclusion inside longlong.h (so only generic macros are being used).

@fredrik-johansson
Copy link
Collaborator

Found it: FLINT_MPN_MUL_2X2H in nfloat/dot.c needs unique variable names too.

@edgarcosta
Copy link
Member

Well done!

@fredrik-johansson
Copy link
Collaborator

Best I guess would be to choose very unique names for the temporaries in add_ssaaaa et al to minimize the risk of downstream breakage.

@albinahlback
Copy link
Collaborator Author

I will merge this when all GCC tests passes. Clang seems to be really buggy -- we have two different bugs popping up. For Ubuntu Clang, it doesn't want to compile a test file, and for Apple M1 it wrongly assumes that __builtin_clzl always returns something non-zero, which results in the failure of sdiv_qrnnd.

@fredrik-johansson
Copy link
Collaborator

I guess as a workaround on M1 you can cast the result of clz to a volatile variable or something like that.

Couldn't compile part of program on x86 systems.  Therefore, split part
of the test function to its own function to avoid segfaults.
@albinahlback albinahlback merged commit cbdc611 into flintlib:main Dec 11, 2024
12 checks passed
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.

3 participants