Hi Matt,
thanks for the quick reply! Your instructions worked, Feff8L is up and running.
I have taken the liberty to write down how to install and run Feff8L from the GitHub page that ignores the larch testing (see attachment). This may be helpful for others who just need Feff8L. Feel free to add this file in its present or different form, in full or part to the GitHub page or distribute it any way you see fit (it is essentially just what you told me but in Markdown form, anyway). I doubt I can be of much use in coding for this project but I'll gladly document my experiences with installations and such like if that helps at all.
What went wrong on the first try: I tried to follow the instructions in the README.md file on https://github.com/xraypy/feff85exafs although I should be old enough not to blindly follow instructions on the internet without first figuring out exactly what is going to happen ;) The instructions say:
feff8l> make
feff8l> LD_LIBRARY_PATH='wrappers/python:src/GENFMT' && nosetests --verbosity=3
feff8l> sudo make install
The error I was speaking of occurred in the testing. A look into what "nosetests" does and looking into the scripts in the to paths it is run on I realized that some Python scripts there import larch. So my problem was not as I thought related to the actual Feff8L installation, it's just that the testing does more than test Feff8L. The complete error message (for the record mostly) was:
"
Failure: ImportError (No module named larch) ... ERROR
======================================================================
ERROR: Failure: ImportError (No module named larch)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/al/Software/FEFF/FEFF8l-temp/feff85exafs-master/tests/run_tests.py", line 14, in <module>
import larch
ImportError: No module named larch
----------------------------------------------------------------------
Ran 1 test in 0.073s
FAILED (errors=1)
"
Thanks and best regards,
Anselm
________________________________
From: Ifeffit on behalf of Matt Newville
Sent: Wednesday, June 6, 2018 12:31:30 AM
To: XAFS Analysis using Ifeffit
Subject: Re: [Ifeffit] FEFF question
Hi Anselm,
On Mon, Jun 4, 2018 at 4:13 PM Loges, Anselm G mailto:anselm.loges@helsinki.fi> wrote:
Hi everyone,
not exactly an ifeffit question, but maybe someone knows. Since I am for ome reason unable to install ifeffit or demeter on certain Linux computers (others with the same distribution and same settings work fine), I have been trying to install FEFF8-lite. However, on the downloadpage:
http://monalisa.phys.washington.edu/feff/Bin-Source-feff8Lite/Bin-Source.htm...
the link for the Linux binary is dead and when I try to compile from source using gfortran it does not work and throws "Error: Two main PROGRAMs at (1) and (2)". A quick look in the code reveals that none of the subroutines etc. are ended explicitly by name but only by an anonymous "end", making debugging this problem in the source a colossal nightmare in a 52951 line source file. This also likely explains where the error comes from in the first place, since lack of explicitness is the mother of portability problems.
I'm wondering: has anyone had success installing FEFF8-lite or compiling from source? If so, with what compiler? Or is there a working Linux binary wandering about the interwebs, which I have not found?
Sorry for the trouble. For sure Feff85exafs could use more attention. As you can no doubt tell, we're resource- and bandwidth-limited. We could definitely use more help.
There are compiled versions of the feff85 modules included with Larch, and an interface to run feff8 from within Larch.
On modern-ish linuxes, feff85exafs should compile easily with the gcc + gfortran tools. It just worked for me out-of-the-box on a freshly installed Linux instance to do
git clone https://github.com/xraypy/feff85exafs.git
cd feff85exafs
make install
That was using gcc 8..1.1 and the corresponding gfortran (and from an account for which Larch had not been installed). Feff85exafs does use some Fortran90 extensions, especially for the json library, and may not work with gcc 4.8 or earlier (I cannot recall the minimum version needed of the top of my head, but I think 4.9 might be needed). Also, Feff85exafs does *not* use a configure-like script to create the Makefile, which means that the Makefile may need some tweaking for some systems. That does assume that anyone building Feff85exafs from source will have some idea how to deal with Makefiles, and that most people will be using pre-compiled binaries. Again, we can always use more help.
I have also tried using Matt Newvilles package on Github:
https://github.com/xraypy/feff85exafs
but no luck there either.
This one complains about a python package named "larch" being missing, making me think it wants a preexisting a Larch installation.
Can you please give a more complete error message? Feff85exafs uses larch for testing, but it should build and run without Larch. It does for me, though maybe this independence may not be as well-tested as it should be. I do see that the Python main program "feff8l" that drives the feff85 modules assumes Python2 and does not work with Python3. That's now an Issue, and should get fixed soon.
Installing FEFF8L should not require Larch, only the other way round (possibly), right?
I don't think Feff8l does not require Larch. Then again, I'm not sure that independence is necessary. For sure, the testing is way easier with a scripting language, and using Larch allows us to use the results as they would be used in production.
--Matt