Open elect86 opened 1 month ago
I think f2py
has changed from the version other users were using. Compiling with your compiler is fine, compiling with the compile flags is fine, the problems only seem to be with f2py
with suddenly requires paths and packages it did not used to. I think we need to dive deeper into this.
Sorry to hear of that experience @elect86. The total energy module can be a bit tricky to build, most notably because we have to manually update it when something in QE changes.
Here's my guess on what is/was happening.
gfortran13
because that's the recent version included in the gcc
package. Downgrading this may not easily be possible, since some other libraries and stuff you have installed may link to this. gfortran13
. That is fine in and of itself, EXCEPT for the fact that part of the QE 7.2 code may not be natively compatible. For a regular QE user this is not a problem - they would simply use the latest version of QE to build, which fixes this. Since we haven't updated the TEM in a while, you run into this issue. -fallow-argument-mismatch
usually fixes these problems. It does in your case. I had a similar problem about a year and a half ago, where I then finally updated our TEM because we were out of touch and getting this compilation errors all too regularly. meson
. meson
was NOT a requirement for f2py
for me. In fact, it is not even on my machine. My installation (OS, python, compilers) is about one and a half years old, and not thoroughly updated (yes, shame on me, something something dissertation something something running system).My best guess is that your f2py
version is significantly more recent than mine and as a result, something in the installation script isn't working anymore. Point in case is that you said you had to add a path manually - this should NOT be the case. We provide all the paths. But if something in the f2py
workflow changed, this may be the reason.
To confirm - which version does f2py -v
give you? It is 1.23.5
for me. Yours is most likely way more recent, as is your python version.
Now for a solution: First I would advise checking out whether the f2py
version is indeed different. If so, I would bet this is the reason. The only meaningful solution, in my opinion would then be to investigate what has changed and update the TEM and install script. It will take me at least until next week to find time to do this. If you need this urgently, let's coordinate via message if I can point you to some things that you can do in this regard.
Thanks for the elaborate investigation. Regarding f2py and meson, I ran into the same issue with one of my packages. Starting with Python 3.12, numpy enforces meson over distutils.
Good to know that it is not only a MALA specific thing and indeed just an update in the entire toolchain. I guess we will fix this issue by upgrading MALA and the scripts it comes with to a more recent python version, and fixing/documenting that version, which ties to #526 . Will try to take care of this soon!
Agreed. As it stands, we support up to Python 3.11.
Thanks for the elaborate investigation. Regarding f2py and meson, I ran into the same issue with one of my packages. Starting with Python 3.12, numpy enforces meson over distutils.
I fixed this in the package above, which may serve as a reference, see these commits: build and CI. This works for Python >= 3.9 .
So, I've been trying to tackle this for a while now and I got so close, but I was stopped by one damn last issue, nonetheless
I'm on Ubuntu
I've been trying to follow the docs here:
apt install openmpi-bin
I had these issues, which I managed to fix by getting OpenMPI using these packages here
sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev
I need to install, in addition,
gfortran
otherwise./configure
won't see any compilerOne difference is that
gfortran
will install the last one, that isgfortran-13
, while @RandomDefaultUser has a working scenario with 11, I tried to install that, but./configure
doesn't detect it as wellAlso,
gfortran
will actually installgfortran-13 gfortran-13-x86-64-linux-gnu libgfortran-13-dev
So, in order to match Lenz specs, I tried the same for 11, but
Interesting, the very same error with 12
So, I gave up on that front and went forward with 13, which is fine under this point of view
Then, trying to compile, these problems
I managed to fix them by adding these flags into make.inc
as
Then this, which I managed to fix by installing
meson
Then this, which I noticed that running the very same command in terminal after having copy/pasted
force_mod.mod
into the upper directory was returning the next.mod
missing, I solved by adding a-I$root_dir/PW/src
to theproject_inc_folders
inbuild_total_energy_module.sh
Then I had to add the directory to my Python path, I did as they said here
Then I hope this to be over, but when I run
ex05_run_predictions.py
I gotAnd here I'm stuck so far..