reflectivity / analysis

Data analysis for Neutron and X-ray Reflectometry
https://www.reflectometry.org/
Creative Commons Zero v1.0 Universal
0 stars 4 forks source link

Separate tests for each package #60

Closed aglavic closed 2 years ago

aglavic commented 2 years ago

I propose to put the test actions into separate runs for each package so that they can be used in badges for a project and not show failure of another package.

aglavic commented 2 years ago

I have no idea how to fix the BornAgain error so I would leave it up to them to fix this action.

arm61 commented 2 years ago

I can mention it tomorrow when I speak with them (there is a lot of work recently to improve the python installation of BornAgain so this might be linked)

andyfaff commented 2 years ago

Possibly the correct/fairest thing to do for BA is just use the release version.

Are there any improvements you'd like to see for the genx run? E.g. are there other calculation backends you'd like to run?

AlQuemiste commented 2 years ago

On the BornAgain validation error https://github.com/reflectivity/analysis/runs/5450779198

I verified the deployment commands for libheinz and libformfactor in reflectivity/analysis/.github/workflows/validate_bornagain.yml on Ubuntu 21.04 (hirsute) x86_64.

I checked further the produced CMake configuration files for libheinz and libformfactor; everything was correct, as far as I can tell.

I built and tested BornAgain successfully with those libraries (with cmake 3.18); 100% tests passed.

I installed BornAgain via the relevant cmake --install command and checked the Python libraries as the following:

cd /path/to/installed/BornAgain/lib/
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/installed/BornAgain/lib/"
python3 -c "import libBornAgainSample"

Version details:

Possible solution:

The error is clearly a runtime linking issue:

ImportError: libformfactor.so.0.1.3: cannot open shared object file: No such file or directory

1) Verify the installation of the FormFactor library. By default, on Debian/Ubuntu, it will be installed under /usr/local/; i.e., /usr/local/lib, /usr/local/include, and /usr/local/cmake.

Find the location of the installed shared libraries, eg., via find /usr -name libformfactor* which yields the following results on my Ubuntu machine:

   /usr/local/lib/libformfactor.so
   /usr/local/lib/libformfactor.so.0.1.3

2) Verify that the path to libformfactor.so.0.1.3 is in the default runtime linking paths. This can be done via adding /usr/local/lib to /etc/ld.so.conf. Note that after such a modification, one should execute ldconfig.

After steps 1) and 2), re-check BornAgain.

aglavic commented 2 years ago

Possibly the correct/fairest thing to do for BA is just use the release version.

Are there any improvements you'd like to see for the genx run? E.g. are there other calculation backends you'd like to run?

We might want to always test against latest release and not the development builds. If a package wants to perform tests against their development they can run those from their own repo.

andyfaff commented 2 years ago

@AlQuemiste I was trying to install bornagain for ubuntu:latest. However, after apt-get update apt-get install bornagain fails, there's no such package.

Also, I can't seem to build locally in an ubuntu:latest docker container. Too many difficulties to list.