DassHydro / dassflow2d

Data Assimilation for Free Surface Flows : Shallow-Water like systems for river networks and floodplains.
Other
7 stars 2 forks source link

Installation process #6

Open bastiencyr opened 1 year ago

bastiencyr commented 1 year ago

Hello,

I have some remarks on the installation process:

PATH

export PATH=$PATH:$"tapenade_dir"

Setting tapenade directory in the path seems useless. Why do you set it ?

f90wrap

F90WRAP_HOME=~/.local/bin
export PATH=$PATH:$F90WRAP_HOME

This step is very specific. Depending on the user installation, the package could be install in a different location, for example in a python environment. In this case, you don't need to change the $PATH.

The .local/bin directory is supposed to be in the path. But a bug in debian distribution prevents from doing so: https://unix.stackexchange.com/questions/316765/which-distributions-have-home-local-bin-in-path . In the File hierarchy system :

~/.local/bin/

    Executables that shall appear in the user's $PATH search path.

Anyway, it is not a good practice to install package in the system. In fact, it will be impossible to do so starting from python 3.11 : https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-everytime-i-use-pip3 , https://peps.python.org/pep-0668/ . I have this error on my Debian machine (Debian experimental).

Thus, I think that this section should be removed because it is confusing and incomplete. We can add a section with the name of the error when f90wrap is not found.

Big git repo

The git repo is pretty big. Maybe we can find a solution to store some data files in an external storage.

Compilation

I didn't see the code in detail but it seems that you use scotch and mumps. But sotch and mumps are in the debian package. So we could link this shared libraries at compile time to reduce the compilation time. Notice that the version in Debian stable is 5.5 (libmumps, so no break in the API with 5.1) and 7.0 (libscotch).

leobpujol commented 1 year ago

Thank you for your insightful remarks !

PATH

It is my understanding that this line is necessary to call tapenade from the Makefile. Does your installation work without it ?

f90wrap

You are right. This step is over-specific and probably useless. It will be removed or updated.

Big git repo

Indeed. I will be grateful for any guidance on how to do so.

Compilation

Compile times are not a pressing issue for now. I do not have the knowledge to transition to shared libraries. Would not there be more potential for compatibility issues ?

bastiencyr commented 1 year ago

It is my understanding that this line is necessary to call tapenade from the Makefile. Does your installation work without it ?

It's not necessary. You just have to add the bin tapenade dir (tapenade/bin). Linux will search for executables in $PATH. So adding he tapenade dir is useless and it works without it on my machine.

bastiencyr commented 1 year ago

Indeed. I will be grateful for any guidance on how to do so.

I don't have magical solution. But you can:

  1. Use git lfs
  2. Move the documentation folder in a submodule. Submodules are a little bit confusing
  3. Move the documentation folder in another repositories
  4. Upload data directories useless at compilation time in a cloud and download it only when the user need it
bastiencyr commented 1 year ago

I do not have the knowledge to transition to shared libraries. Would not there be more potential for compatibility issues ? Mumps is at version 5.5 in the debian project. And you use 5.1. So there is no change in the API.

But scotch is at version 7 and you use 5.1. So there is probably some breaking changes in the API and some works to do to match the new API. Notice that scotch 5 was released in 2010 while scotch 7 has been released in 2021.