SimEx icon indicating copy to clipboard operation
SimEx copied to clipboard

Installation challenges

Open takluyver opened this issue 4 years ago • 9 comments

What's the recommended way to install SimEx? I've been looking at various things without much success:

  • The conda environment file seems to be missing several dependencies even to start building, and I can't get far even by adding things. Eventually, with some pointers from @ejcjason I was able to get it to work by disabling almost every component in install.sh and commenting out various imports in the Python code, but this doesn't feel like a good answer.
  • The install docs refer to a .deb package, but it's from a few years ago, and my target isn't Debian-based anyway.
  • They also refer to a docker image yakser/simex, which was last updated in 2017.
  • I tried building a docker image from Docker/simex within the repository, but it fell down pretty quickly. I haven't investigated this much, but I see the docker folder hasn't been touched for 2 years, so I doubt you're using that frequently.

takluyver avatar May 05 '20 16:05 takluyver

Thanks, this is very important information.

The recommended way to install simex is using cmake. install.sh serves as a guideline. More hints may be found in .travis.yml and in scripts under Travis/ .

Installation has successfully been tested on various linux distributions including debian7+ ubuntu 14.04+, centos7.

What is your target? c compiler? hdf version? cmake version? mpi ? mkl?

where does it fail if you enable more components? which ones?

CFGrote avatar May 06 '20 03:05 CFGrote

Thanks Carsten!

In the first instance I want to install it on Maxwell (I know there's already a module, but I want to test a branch @ejcjason is working on). So CentOS 7. I'll focus on the conda installation for now. Once I've got a direct installation working, I might take an interest in using Spack to install it, and/or containerising it.

So, I've recreated a conda environment using conda-requirements.yml. I've modified install.sh to disable everything except SingFEL & WPG. Then I get CMake 3.12 or higher is required. OK, conda install cmake to get a newer version.

This time it worked. Previously I tried for longer with other modules enabled, and something I installed for one of the other modules seemed to break WPG. I'll experiment further and get back to you.

takluyver avatar May 06 '20 07:05 takluyver

This is a bit long, but I figure it's worth recording the details of what errors I'm getting and what I'm trying. I should also have mentioned that I turned DEVELOPER_MODE off on @ejcjason's suggestion.

Disable WPG (for now), enable CrystFEL.

/home/kluyvert/.conda/envs/simex/lib/libpng16.so.16: undefined reference to `inflateValidate@ZLIB_1.2.9'

I didn't see this one before. conda install zlib ? No, that doesn't fix it. conda install libpng ? Replaces a conda-forge package with one from the default channel. No, still the same error.

I recall there was a change in the way conda works at some point, and now the recommendation is to install a compiler from conda, so you're not using something outside the environment. Maybe I'm running into some symptom of that. conda install gcc_linux-64 .

src/utils.h:41:10: fatal error: gsl/gsl_matrix.h: No such file or directory

Now we're using a compiler in conda, it no longer uses libraries from the system, if I've understood correctly. This is the first of a series of problems building CrystFEL which I ran into before, so let's install several packages I already found it needs: conda install gsl cairo pango gdk-pixbuf .

Building CrystFEL now works. Re-enable WPG.

x86_64-conda_cos6-linux-gnu-cc: error trying to exec 'cc1plus': execvp: No such file or directory

Missing a C++ compiler? Trying conda install gxx_linux-64 .

/home/kluyvert/.conda/envs/simex/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgomp

This is where I got stuck last time around. conda install libgomp . A package gets installed, but I still get the same error. This appears to come while building srwlpy for XFELPhotonPropagator.

Summary: Relying on compilers & libraries on the system, I can build WPG, but building CrystFEL fails. By installing compilers in the conda environment, I can get CrystFEL to build, but then WPG fails, and I've not yet worked out how to solve that.

takluyver avatar May 06 '20 08:05 takluyver

since you try this on maxwell, there is a functional installation on maxwell under /data/netapp/s2e/simex

$> module load intel/2018
$> module load mpi/openmpi-x86_64-intel

annoyingly, you have to clean up your PYTHONPATH after this (remove the py2.7 part of it).

then:

$> source /data/netapp/s2e/simex/bin/simex_vars.sh

test:

$> python


>>> from SimEx import *

Hope this helps.

-- Dr. Carsten Fortmann-Grote PaNOSC WP5 leader

On 5/6/20 10:49 AM, Thomas Kluyver wrote:

This is a bit long, but I figure it's worth recording the details of what errors I'm getting and what I'm trying. I should also have mentioned that I turned |DEVELOPER_MODE| off on @ejcjason https://github.com/ejcjason's suggestion.

Disable WPG (for now), enable CrystFEL.

|/home/kluyvert/.conda/envs/simex/lib/libpng16.so.16: undefined reference to `inflateValidate@ZLIB_1.2.9' |

I didn't see this one before. |conda install zlib| ? No, that doesn't fix it. |conda install libpng| ? Replaces a |conda-forge| package with one from the default channel. No, still the same error.

I recall there was a change in the way conda works https://www.anaconda.com/blog/utilizing-the-new-compilers-in-anaconda-distribution-5 at some point, and now the recommendation is to install a compiler from conda, so you're not using something outside the environment. Maybe I'm running into some symptom of that. |conda install gcc_linux-64| .

|src/utils.h:41:10: fatal error: gsl/gsl_matrix.h: No such file or directory |

Now we're using a compiler in conda, it no longer uses libraries from the system, if I've understood correctly. This is the first of a series of problems building CrystFEL which I ran into before, so let's install several packages I already found it needs: |conda install gsl cairo pango gdk-pixbuf| .

Building CrystFEL now works. Re-enable WPG.

|x86_64-conda_cos6-linux-gnu-cc: error trying to exec 'cc1plus': execvp: No such file or directory |

Missing a C++ compiler? Trying |conda install gxx_linux-64| .

|/home/kluyvert/.conda/envs/simex/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgomp |

This is where I got stuck last time around. |conda install libgomp| . A package gets installed, but I still get the same error. This appears to come while building |srwlpy| for |XFELPhotonPropagator|.

Summary: Relying on compilers & libraries on the system, I can build WPG, but building CrystFEL fails. By installing compilers in the conda environment, I can get CrystFEL to build, but then WPG fails, and I've not yet worked out how to solve that.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PaNOSC-ViNYL/SimEx/issues/196#issuecomment-624521486, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADWCQRZLGGL6D3UAEFYUYWDRQEQAXANCNFSM4MZWXLWQ.

CFGrote avatar May 09 '20 19:05 CFGrote

hi thomas, you need intel omp: module load intel

-- Dr. Carsten Fortmann-Grote PaNOSC WP5 leader

On 5/6/20 10:49 AM, Thomas Kluyver wrote:

This is a bit long, but I figure it's worth recording the details of what errors I'm getting and what I'm trying. I should also have mentioned that I turned |DEVELOPER_MODE| off on @ejcjason https://github.com/ejcjason's suggestion.

Disable WPG (for now), enable CrystFEL.

|/home/kluyvert/.conda/envs/simex/lib/libpng16.so.16: undefined reference to `inflateValidate@ZLIB_1.2.9' |

I didn't see this one before. |conda install zlib| ? No, that doesn't fix it. |conda install libpng| ? Replaces a |conda-forge| package with one from the default channel. No, still the same error.

I recall there was a change in the way conda works https://www.anaconda.com/blog/utilizing-the-new-compilers-in-anaconda-distribution-5 at some point, and now the recommendation is to install a compiler from conda, so you're not using something outside the environment. Maybe I'm running into some symptom of that. |conda install gcc_linux-64| .

|src/utils.h:41:10: fatal error: gsl/gsl_matrix.h: No such file or directory |

Now we're using a compiler in conda, it no longer uses libraries from the system, if I've understood correctly. This is the first of a series of problems building CrystFEL which I ran into before, so let's install several packages I already found it needs: |conda install gsl cairo pango gdk-pixbuf| .

Building CrystFEL now works. Re-enable WPG.

|x86_64-conda_cos6-linux-gnu-cc: error trying to exec 'cc1plus': execvp: No such file or directory |

Missing a C++ compiler? Trying |conda install gxx_linux-64| .

|/home/kluyvert/.conda/envs/simex/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgomp |

This is where I got stuck last time around. |conda install libgomp| . A package gets installed, but I still get the same error. This appears to come while building |srwlpy| for |XFELPhotonPropagator|.

Summary: Relying on compilers & libraries on the system, I can build WPG, but building CrystFEL fails. By installing compilers in the conda environment, I can get CrystFEL to build, but then WPG fails, and I've not yet worked out how to solve that.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PaNOSC-ViNYL/SimEx/issues/196#issuecomment-624521486, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADWCQRZLGGL6D3UAEFYUYWDRQEQAXANCNFSM4MZWXLWQ.

CFGrote avatar May 09 '20 19:05 CFGrote

@CFGrote I can talk to Frank, we don't support Python 2.7 any more, so maybe it makes sense to modify the module to not set the python path...

belfhi avatar May 09 '20 20:05 belfhi

Thanks Carsten. I found the module, but I was trying to test a branch that @ejcjason was working on, so I want to do the installation myself.

I'll try building it with the intel module loaded.

takluyver avatar May 12 '20 14:05 takluyver

I tried with module load intel (it seems to have picked intel/2020 as the default version), but I still see the same error about -lgomp.

takluyver avatar May 15 '20 15:05 takluyver

have you run

$> source `which compilervars.sh` intel64

assuming you are on a 64bit machine. that loads the intel lib and include paths.

carsten

-- Dr. Carsten Fortmann-Grote PaNOSC WP5 leader

On 5/15/20 5:06 PM, Thomas Kluyver wrote:

I tried with |module load intel| (it seems to have picked |intel/2020| as the default version), but I still see the same error about |-lgomp|.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PaNOSC-ViNYL/SimEx/issues/196#issuecomment-629287283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADWCQR6EBRND2EA6ISKZ66TRRVLA7ANCNFSM4MZWXLWQ.

CFGrote avatar May 15 '20 17:05 CFGrote