halbux / sparselizard

C++ FEM library | user-friendly | multi-physics | hp-adaptive | HPC
http://www.sparselizard.org
Other
332 stars 62 forks source link

Code documentation #26

Closed matsievskiysv closed 3 years ago

matsievskiysv commented 3 years ago

It would be great to start adding insource code documentation. I propose using sphinx. Flask documentation is a great example of its use.

halbux commented 3 years ago

Do you mean: documentation to understand the source code / develop further or do you mean documentation for all functions/objects inside the source code to create a library documentation automatically?

halbux commented 3 years ago

@matsievskiysv I just merged your PR to a new "stable" branch which I will update from master once in a while. Could you allow to create issues on your sparselizard fork? I lowered the requirements for cmake to 3.17, and for now it doesn't want to find openblas

matsievskiysv commented 3 years ago

Do you mean: documentation to understand the source code / develop further or do you mean documentation for all functions/objects inside the source code to create a library documentation automatically?

Both actually. Documenting API may be done simultaneously with writing tests.

Could you allow to create issues on your sparselizard fork?

Done

I lowered the requirements for cmake to 3.17, and for now it doesn't want to find openblas

I'll create docker images for Debian and Ubuntu to check this out.

halbux commented 3 years ago

Allright. I am on Fedora 30 but I guess issues will be similar on Ubuntu

BTW: I really appreciate your contribution. If you need help or additional functions once let me know

matsievskiysv commented 3 years ago

Allright. I am on Fedora 30 but I guess issues will be similar on Ubuntu

I'll start with deb based distros since I'm more familiar with thous. Maybe do Fedora after that.

halbux commented 3 years ago

The missing devel was it... works just fine with openblas-devel!

Now it's the turn of MPI: I don't use/need MPI for now (although this will change in a few month with DDM algorithms added for supercomputer calculations). It could be made optional i think.

halbux commented 3 years ago

BTW: I don't see the direct solver package MUMPS in the cmakelist.txt, it's the direct solver called for all resolutions in sparselizard

matsievskiysv commented 3 years ago

I don't see the direct solver package MUMPS in the cmakelist.txt

Yep, missed that one. This is why we need to make docker images:)

halbux commented 3 years ago

I am totally lost even more now with docker, does it mean cmake is not needed anymore? I will blindly trust you on all the docker/cmake part for now and focus on the FEM developments. I am anyways progressing to make the cmake at least work on my laptop. After removing entirely the MPI requirement I get:

-- The CXX compiler identification is GNU 9.3.1 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Setting build type to 'Release' as none was specified. -- Looking for sgemm -- Looking for sgemm - not found -- Looking for C++ include pthread.h -- Looking for C++ include pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthreadcreate in pthread - found -- Found Threads: TRUE
-- Looking for sgemm
-- Looking for sgemm_ - found -- Found BLAS: /usr/lib64/libopenblas.so
-- Looking for PETSc -- Found PETSc: /usr/lib64/libpetsc.so -- Looking for SLEPC -- Found SLEPC: SLEPC_LIBRARIES-NOTFOUND -- Looking for GMSH -- Found GMSH: /usr/lib64/libgmsh.so -- Looking for METIS -- Found METIS: /usr/lib64/libmetis.so -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: /home/halbux/Desktop/sparse/0cmake/sparselizard/src/SLEPC_INCLUDE_PATH used as include directory in directory /home/halbux/Desktop/sparse/0cmake/sparselizard/src SLEPC_LIBRARIES linked by target "sparselizard" in directory /home/halbux/Desktop/sparse/0cmake/sparselizard/src

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.

matsievskiysv commented 3 years ago

I am totally lost even more now with docker, does it mean cmake is not needed anymore?

No, CMake is used to build the project. Docker is a virtualization software that will help testing dependency installation and compilation on different distributions.

As for the error - I was using CMake function FIND_PATH with option REQUIRED, which apparently was introduced in version 3.18. I'll need check compilation script with lower version of CMake. CMake didn't find your libslepc.