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

[Meta-issue] Fix the FORM5 regressions #475

Open
1 task
tueda opened this issue Feb 23, 2024 · 8 comments
Open
1 task

[Meta-issue] Fix the FORM5 regressions #475

tueda opened this issue Feb 23, 2024 · 8 comments

Comments

@tueda
Copy link
Collaborator

tueda commented Feb 23, 2024

Update: 2024-03-15

This is the meta issue to track regressions introduced in 5.0.0-beta. To be updated occasionally.

Known regressions

Tests disabled in CI

Currently, the test cases Diagrams_1 to Diagrams_4 are temporarily disabled to allow the CI process to pass.

To run the disabled tests, use the -f option of check.rb:

./check/check.rb build/sources/form -s -f 'Diagrams_*'

Merged PRs that are likely to have no side effects or negligible performance regressions

We think these changes are OK, but if you encounter any noticeable regressions on the master branch when comparing it to version 4.3.1, please let us know.

@tueda tueda pinned this issue Feb 23, 2024
@tueda
Copy link
Collaborator Author

tueda commented Mar 14, 2024

I will start merging postponed PRs that are complete and likely to have no or negligible side effects such as #477, #482 and #490. They will be listed in this issue as those that could potentially introduce some regressions (albeit unlikely). In this way, test users can easily access versions incorporating the latest PR merges, with awareness of potential regressions.

@jodavies
Copy link
Collaborator

jodavies commented Apr 22, 2024

Before FORM 5, I would like to resolve at least the following. For some of these I know roughly what the problem is, but would benefit from a discussion with Jos to check that I really understand things. The workshop in May would be a good place to do this I expect.

#230
#292
#420 and #484
#468

Maybe we should also start to work through the open issues and close + tag as "question" or "wontfix" where appropriate, to clean up the issue tracker a bit.

@tueda
Copy link
Collaborator Author

tueda commented Apr 22, 2024

Do we need another 5.0 beta version (and a 4.3 version with backported bug fixes) before the workshop? This could serve as a good starting point for discussions at the workshop.

If the workshop successfully resolves the issues you mentioned, we could then proceed with another (beta) release afterwards.

Related to the tags:
The question and good first issue tags are abused in ways that differ from the GitHub defaults: the former had been used for "questions by users" (though I haven't put question tag recently because of this difference) and an example of the latter is #300. We might consider creating new tags with more specific meanings. At least, adding a documentation tag (as the default meaning) would be good.

@jodavies
Copy link
Collaborator

I am not sure a specific beta "release" is necessary for the workshop. The current master branch is in reasonable shape to work from (diagram generator issues aside), and the results of the workshop can inform what a final beta of FORM 5 should look like before a testing period and final release.

We should also look through the issues labelled as "enhancement" and think about what would be good to include in FORM 5. (Personally I would like to look at #436 at least).

Since "question" has been used previously to tag questions about the use of FORM, my opinion would be to just keep that convention now.

@jodavies
Copy link
Collaborator

jodavies commented Jun 4, 2024

Here is a bit of a summary of some discussions at the workshop.

Diagrams/topologies:

  • The new diagrams_ should have all of the functionality of the old topologies_, which
    is there for backwards compatibility. But it could also be removed from FORM5. Then
    the open bugs regarding this are "resolved".
  • A good set of tests for diagrams_ is still needed before release, though.

32bit builds:

  • No one at the workshop uses or knows anyone who uses 32bit builds. Remove support from FORM5.
  • Various tests already don't work in 32bit mode, and the float mode doesn't seem to work either.
  • FORM 4.3.1 (and 4.3.2) can keep the 32bit build in its current form?

Parform:

  • Similarly, no one uses or knows anyone who uses Parform these days. Support could be removed from FORM5 in principle.
  • This is a larger change to the code than removing 32bit support, though, and it would be harder to "put back".
  • My opinion would be, for a first step, to break the build: ("--enable-parform" just prints a deprecation message and instructs the user to open an Issue. Maybe add "--enable-parform-force" in the mean time?). If nobody complains by "FORM 5.1", remove it?

A few easy-seeming ideas which have been/could be implemented for FORM5:

Harder-seeming changes, for the future:

  • Workspace realloc: harder to catch infinite loops. But nice for heavy users of the optimizer (eg, pySecDec @magv). Maybe user-configurable setting, off by default?
  • Use FLINT for polyratfun operations.
  • Remove maxtermsize limitation (or allow it to be much larger) -- small buffer becomes an array of dynamically allocated regions. IObuffer sizes need to be checked on term-read from patches. TODO: find the many other places where this will cause problems...
  • Parallelize processing on expr definition, save file load, copyspectator (tform).

Please comment, if I have forgotten anything.

@tueda
Copy link
Collaborator Author

tueda commented Jun 4, 2024

Thanks for summarising the discussions!

How about Windows? Is there no need to run FORM on any platform other than Linux/macOS x86_64?

@jodavies
Copy link
Collaborator

jodavies commented Jun 4, 2024

Ah, indeed we discussed this also: people think that it is nice, particularly for students, if form run on windows. At the very least, we should make sure that it works OK under WSL.

As for proper windows support, this basically comes down to how close you think you are with your branch. Personally, I have no development experience at all under windows.

@tueda
Copy link
Collaborator Author

tueda commented Jun 4, 2024

Actually, the Windows version doesn't use any Windows APIs (except for timers, I think). It simply maps all FORM IO routines to the corresponding C standard library functions:

form/sources/form3.h

Lines 517 to 533 in 83e3d41

#define FILES FILE
#define Uopen(x,y) fopen(x,y)
#define Uflush(x) fflush(x)
#define Uclose(x) fclose(x)
#define Uread(x,y,z,u) fread(x,y,z,u)
#define Uwrite(x,y,z,u) fwrite(x,y,z,u)
#define Usetbuf(x,y) setbuf(x,y)
#define Useek(x,y,z) fseek(x,y,z)
#define Utell(x) ftell(x)
#define Ugetpos(x,y) fgetpos(x,y)
#define Usetpos(x,y) fsetpos(x,y)
#define Usync(x) fflush(x)
#define Utruncate(x) _chsize(_fileno(x),0)
#define Ustdout stdout
#define MAX_OPEN_FILES FOPEN_MAX
#define bzero(b,len) (memset((b), 0, (len)), (void)0)
#define GetPID() ((LONG)GetCurrentProcessId())

You don't need to know Windows (unless you want to implement missing functionalities based on special POSIX routines).

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

No branches or pull requests

2 participants