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

Linux arm64 binaries #619

Open
tueda opened this issue Feb 7, 2025 · 5 comments · May be fixed by #620
Open

Linux arm64 binaries #619

tueda opened this issue Feb 7, 2025 · 5 comments · May be fixed by #620

Comments

@tueda
Copy link
Collaborator

tueda commented Feb 7, 2025

GitHub now provides Linux arm64 hosted runners. We can build arm64-linux binaries using CI.

@tueda
Copy link
Collaborator Author

tueda commented Feb 8, 2025

The test cases moebius_1, moebius_2 and moebius_3 fail on ubuntu-22.04-arm. For example:

===============================================================================
moebius_1 (features.frm:113) FAILED
===============================================================================
FORM 5.0.0-beta.1 (Jan 24 2025, v5.0.0-beta.1-116-g3fa59b8)  Run: Sat Feb  8 03:42:25 2025
    S i,x;
    L F = sum_(i,1,200,moebius_(i)*x^i);
    P;
    .end:result;

Time =       0.00 sec    Generated terms =        122
               F         Terms in output =        122
                  result Bytes used      =       2940

   F =
      x + x^2 + x^3 + x^5 + x^6 + x^7 + x^10 + x^11 + x^13 + x^14 + x^15 + 
      x^17 + x^19 + x^21 + x^22 + x^23 + x^26 + x^29 + x^30 + x^31 + x^33 + 
      x^34 + x^35 + x^37 + x^38 + x^39 + x^41 + x^42 + x^43 + x^46 + x^47 + 
      x^51 + x^53 + x^55 + x^57 + x^58 + x^59 + x^61 + x^62 + x^65 + x^66 + 
      x^67 + x^69 + x^70 + x^71 + x^73 + x^74 + x^77 + x^78 + x^79 + x^82 + 
      x^83 + x^85 + x^86 + x^87 + x^89 + x^91 + x^93 + x^94 + x^95 + x^97 + 
      x^101 + x^102 + x^103 + x^105 + x^106 + x^107 + x^109 + x^110 + x^111 + 
      x^113 + x^114 + x^115 + x^118 + x^119 + x^122 + x^123 + x^127 + x^129 + 
      x^130 + x^131 + x^133 + x^134 + x^137 + x^138 + x^139 + x^141 + x^142 + 
      x^143 + x^145 + x^146 + x^149 + x^151 + x^154 + x^155 + x^157 + x^158 + 
      x^159 + x^161 + x^163 + x^165 + x^166 + x^167 + x^170 + x^173 + x^174 + 
      x^177 + x^178 + x^179 + x^181 + x^182 + x^183 + x^185 + x^186 + x^187 + 
      x^190 + x^191 + x^193 + x^194 + x^195 + x^197 + x^199;

  0.00 sec out of 0.00 sec
===============================================================================

This is because the current implementation of the Moebius() function assumes char is signed. If this is not the case, the function does not work properly and always returns non-negative numbers.

@jodavies
Copy link
Collaborator

jodavies commented Feb 8, 2025

When I once tested form on a Power machine I needed to compile with -fsigned-char if I remember correctly. Maybe this is the easiest fix, probably moebius is not the only potentially problematic code?

@tueda
Copy link
Collaborator Author

tueda commented Feb 8, 2025

Well, I think using signed char instead of char when a signed char is required is the most portable and elegant approach.

@jodavies
Copy link
Collaborator

jodavies commented Feb 8, 2025

You are right, of course, but there are very many uses of char in the source files. When I had problems with this in the past, it was not with moebius, that function didn't exist at the time. The information about that was, I think, on the old forums.

@tueda
Copy link
Collaborator Author

tueda commented Feb 8, 2025

Hmm, it seems that problems with this occur only for moebius_ on arm64 for now. We may encounter more issues when we expand the test coverage.

@tueda tueda linked a pull request Feb 8, 2025 that will close this issue
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 a pull request may close this issue.

2 participants