Making the CI compatible with a maintained python version (Reprise of #1350)#1363
Making the CI compatible with a maintained python version (Reprise of #1350)#1363Iximiel wants to merge 9 commits intoplumed:masterfrom
Conversation
369b10c to
a2fa8b4
Compare
|
@Luthaf I moved the required python modules in a file within the pytorch package. (I need to check if the url can be specified within the requirements files). So that it is possible to change them without having to remember to change them also in the CI or in other exotic places. (and can be used as an hash for the pip cache in future). Are you ok with this? |
|
I'm not sure this makes sense, these where dependencies for CI, not the actual code. I pulled We could put them in |
Separating ci requirements from actual requirements is a good idea. I would still prefer to encapsulate things the more possible in their own directory and to make change propagate automatically (see how it snowballed "removing" cython here). To avoid backtracking problems for "future-us" or for the next one that will have to touch the code. I was thinking at something crunchy like: requirements_ci.txt: (you can write the requirement file as it is the pip install command line and use all the possible options (-r,-i...)) For installing the accelerated version, maybe it will be better to change the extra-index-url in the main requirements file |
Now Cython will automatically installed in the build phase and will not need to appear in the work environment plumed.c and plumed.pyx will get the configure configure.ac treatment in the next commit
dd4de16 to
d1f7a3c
Compare
|
@GiovanniBussi @gtribello here's the funny thing in the python interface: in
I think something is left behind in the "destructor" of the plumed object in the |
|
Do you mean it is a bug in the python interpreter? I think it should not happen |
|
I think it is more something like we some resource gets blocked and stops the because if you go back to some old run you get the error in the ci with -degug- when i switched to python 3.10. In the CI the problem is in |
The pyx changes save some diskspace when calling the inputbuilder by deleting the test file
|
On my pc I get the error ib=plumed.InputBuilder()
p=plumed.Plumed()but not if I setup the IB like this. p=plumed.Plumed()
ib=plumed.InputBuilder()In the CI this seems not to be a problem. On my laptop with a cranky WSL I do no get the error even without the declared plumed in the tests. So the |
Note
I will likely reopen this as a standard PR soon I have finished
The original PR is #1350
I am doing some researches on testing with python 3.10.
Since I am getting a segmentation fault, following this blogpost, I started trying to use
pytest --collect-onlyto have a list of tests and then "bisect" it to find the culprit.The problem is that instead of getting the list of error I get a segmentation fault...
So I dug a little by manipulating the test collection. Turns out that if I hide
test_input_builder.pyI do not get the segmentation fault in the collection phase (I still get it while running the tests, but that is a future me problem for now). This is strange because in #1350 it works (at least not in dbg mode).I did some "manipulation" to
test_input_builder.pyand the culprit for the segmentation fault seems to be the initialization of theplumed.InputBuilder.And this Is what I get when I try to run something similar directly in the interpreter:
funnily this one below does not segfault, it loads the kernel twice (one for plmd, and one for guessing where to load the vim syntax file in ib) but goes smoothly
###EDIT
I am breaking this PR in multiple more focused pr: