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

"leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers" from '1.00.01' cudacpp version #1013

Closed
valassi opened this issue Oct 3, 2024 · 0 comments · Fixed by #1014 or #1012
Assignees

Comments

@valassi
Copy link
Member

valassi commented Oct 3, 2024

I am doing some post-release tests.

I have upgraded 1,00,00 to 1,00,01 in init.py. This fails.

There are several issues:

    1. the error from bin/mg5aMC is very unfriendly, it is difficult to understand what goes on
    1. the actual problem is that the import of the plugin fails because of the 1,00,01 format

Now, one could say that I should not have used 1,00,00 to start with, true. But I liked having more digits, and this worked ok. I will try to fix it.

(1) More details on point 1.

This is not user friendly

[avalassi@itscrd90 gcc11/usr] /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo> PYTHONPATH=../MG5aMC_PLUGIN ./bin/mg5_aMC -m CUDACPP_OUTPUT
Running MG5 in debug mode
ERROR: CUDACPP_OUTPUT is not present in the PLUGIN directory. Please install it first

Is it possible to expose the error message from import, at least in some cases?

This would be a small patch in bin/mg5amc

(2) More details on point 2

The real issue is here

[avalassi@itscrd90 gcc11/usr] /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo> PYTHONPATH=../MG5aMC_PLUGIN/ python3
Python 3.9.18 (main, Jan 24 2024, 00:00:00) 
[GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> __import__('CUDACPP_OUTPUT')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/MG5aMC_PLUGIN/CUDACPP_OUTPUT/__init__.py", line 69
    __version__ = (1,00,01) # NB the release infrastructure expects 1-digit major and 2-digit minor and patch versions (n,nn,nn)
                         ^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers

I guess that there is no way out here. That statement in __init__py is not good python

__version__ = (1,00,01)

The only way is to change this into

__version__ = (1,0,1)

and the delegate to the release scripts the fact that this should be called 1.00.01 and not 1.0.1.

So this second issue is a fix in gitTag.sh probably (no need to touch the archiver.sh/py/yml)

@valassi valassi self-assigned this Oct 3, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 3, 2024
…s leading zeros in decimal integer literals are not permitted (madgraph5#1013)
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 3, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 3, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment