sxs-collaboration / spectre

SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.
https://spectre-code.org
Other
162 stars 191 forks source link

Various problems with regards to Installation of spECTRE. #6331

Open thisismeamir opened 1 month ago

thisismeamir commented 1 month ago

I am trying to install spectre (AFTER FIVE DAYS) I haven't achieved a simple installation.

Spack

The documentation is very unclear and is not up to date so even the bugs that are clearly spack bugs (because I talked to them, and they said it's a bug from spack) has not been noted there. The documentation jumps from path to path and it's very hard to follow (docker to singularity to spack back building process). But anyway le'ts begin with the problems regarding spack.

Spack installation was a terrible path since both spack and spectre are unaware of the troubles they make during the process.

  1. Spack cannot install Libxsmm which is necessary for Spectre. It's a clear bug that spectre contributors are unaware of. The solution is to clone libxsmm using spack clone and then install it. which took me two days to figure out.

  2. Spack has trouble finding compilers! For a PACKAGE MANAGER you should be really terrible that you cannot find things in a system yourself, beside that there's absolutely no good documentation on the solution to this trouble.

  3. Spectre for PYTHON? Why should your C code be installed with the python binding? what if I don't want python binding... specially when I gen errors and warnings because spack cannot fetch them... why not giving options instead of installing all of the packages and project all at once.

  4. NO LOG FOR BUILDING finally after five days I had solved all the troubles that spack put upon me... Now I run

    spack install spectre executables=ExportCoordinates3D \
    ^charmpp backend=multicore

    and my system crashes! So it cannot even build tons and tons of the data it downloaded from the internet???? and no one in the entire collaboration of spack and Spectre notice this so that the FIRST SECTION of the installation documentation wouldn't be the spack package manager?

Docker

Docker should be easy, and simple. due to the fact that it's literally a snapshot of a computer. we use the image. following the steps and first off we

sudo docker run -v /home/kid-a/Documents/spectre/spectre:/home/kid-a/Documents/spectre/spectre --name spectre_test2 -i -t sxscollaboration/spectre:dev /bin/bash

got in... nice now the exact steps of the documentation

mkdir spectre_build
cd spectre_build
cmake -D CHARM_ROOT=/work/charm_7_0_0/multicore-linux-x86_64-gcc /home/kid-a/Documents/spectre/spectre

and we get an error!

-- SpECTRE release version: 2024.09.29
-- The CXX compiler identification is GNU 11.4.0
-- The C compiler identification is GNU 11.4.0
-- The Fortran compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Found Git: /usr/bin/git (found version "2.34.1") 
fatal: detected dubious ownership in repository at '/home/kid-a/Documents/spectre/spectre'
To add an exception for this directory, call:

    git config --global --add safe.directory /home/kid-a/Documents/spectre/spectre
fatal: detected dubious ownership in repository at '/home/kid-a/Documents/spectre/spectre'
To add an exception for this directory, call:

    git config --global --add safe.directory /home/kid-a/Documents/spectre/spectre
-- Could not determine git description (fatal: detected dubious ownership in repository at '/home/kid-a/Documents/spectre/spectre'
To add an exception for this directory, call:

    git config --global --add safe.directory /home/kid-a/Documents/spectre/spectre). Using commit hash instead.
-- Found Python: /usr/bin/python3.10 (found suitable version "3.10.12", minimum required is "3.8") found components: Interpreter 
-- PYTHONPATH: /work/spectre_build/bin/python:/work/spectre_build/lib/python3.10/site-packages
fatal: detected dubious ownership in repository at '/home/kid-a/Documents/spectre/spectre'
To add an exception for this directory, call:

    git config --global --add safe.directory /home/kid-a/Documents/spectre/spectre
CMake Error at cmake/SetupFormaline.cmake:53 (message):
  Couldn't find the file or directory ".clang-format" in the source
  directory.  You need to remove the entry ".clang-format" from the CMake
  variable SPECTRE_FORMALINE_LOCATIONS in cmake/SetupFormaline.cmake
Call Stack (most recent call first):
  CMakeLists.txt:114 (include)

-- Configuring incomplete, errors occurred!
See also "/work/spectre_build/CMakeFiles/CMakeOutput.log".

conclusion

I don't know what is happening on my computer, I may be not be so smart like you guys so that I find these problems easy to solve (I truely mean it I'm not a good programmer) .

If anyone knows about the solution to the docker probelm or the crashing problem of spack please comment here. I don't understand why an INSTALLATION process should be this complicated on my system!

bests

thisismeamir commented 1 month ago

PS

git confige --global --add safe.directory ...

Doens't solve any probelm. even the error suggesting it won't disappear.

thisismeamir commented 1 month ago

@nilsvu Sorry for tagging but since the last issue were closed. I did try the docker route but I get these errors in the process.