Eawag-AppliedSystemAnalysis / Simstrat

Simstrat - 1D lake model
http://www.eawag.ch/en/department/surf/projects/simstrat/
GNU General Public License v3.0
17 stars 8 forks source link

Compiling in Docker #59

Closed rqthomas closed 1 year ago

rqthomas commented 2 years ago

I am continuing the work that Tadhg Moore was doing on forecating with Simstrat, specially using the dev/test_restart branch. We currently don't have ubuntu binaries and was working on compiling Simstrat using the Docker. However, I am getting the following error message when running FoBiS.py build; cd - in the Docker (per the instructions). Am I doing something incorrect with the compile? Thanks!

Error message

Building dependency fobos into ../lib/forbear with mode static-gnu
src/lib/forbear_element_object.F90:6:4:

 use face, only : colorize
    1
Fatal Error: Can't open module file ‘face.mod’ for reading at (1): No such file or directory
compilation terminated.
Attention: the file 'src/lib/forbear_element_object.F90' depends on 'face' that is unreachable
Builder options
  Directories
    Building directory: "static"
    Compiled-objects .o   directory: "static/obj"
    Compiled-objects .mod directory: "static/mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-cpp -c -frealloc-lhs -O3 -DUCS4_SUPPORTED -DASCII_SUPPORTED"
    Linking flags: ""
    Preprocessing flags: "-DUCS4_SUPPORTED -DASCII_SUPPORTED"
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building src/lib/forbear.f90
Compiling src/lib/forbear_kinds.F90 serially
Compiling src/lib/forbear_element_object.F90 serially
src/lib/forbear_element_object.F90:6:4:

 use face, only : colorize
    1
Fatal Error: Can't open module file ‘face.mod’ for reading at (1): No such file or directory
compilation terminated.

I updated the Dockfile in the dev/text_restart to match the main branch, I compiled AED2 (using make), and I cloned the forbear git repo using the following to get the commit associated with the submodule

git clone https://github.com/d-vanzo/forbear.git
cd forbear
git reset --hard 2726e09

I did this last step because when I use the --recurse-submodules flag in git clone I get the following error

Cloning into '/Users/quinn/Downloads/simstrat/Simstrat/lib/forbear'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
rqthomas commented 2 years ago

BTW, Your documentation and Dockerfile for compiling in Docker is incredibly helpful!

f-baerenbold commented 2 years ago

Hi, I thought that I sent the binaries to Tadhg.. didn't I? Or just no linux binaries?

I have seen this problem before, I guess you just need to install the face module using pip install? Anyways, it should probably be added to the docker file. I'll look into this tomorrow.

rqthomas commented 2 years ago

Thanks for the quick response! We have the windows and Mac binaries but no linux

ceordonez commented 2 years ago

Hi, I was compiling Simstrat using the master branch and I think this problem is when you execute git_lib_initialize.sh it clones only the submodule defined in Simstrat (forbear and libaed2). But the forbear module has Face as submodule, that is not clone to the local directory. I solved the problem cloning the submodule Face in the Forbear module. If you change what is written in the git_lib_initialize.sh file for: git submodule update --init --recursive should solve the problem.

f-baerenbold commented 2 years ago

Done. Thanks @ceordonez Can you test this @rqthomas ?