Compiling with mpich
Here is a reproducible dockerfile:
FROM fedora:latest
RUN dnf -y install \
cmake ninja-build gcc gcc-c++ gfortran pkgconf \
libomp-devel mpich-devel \
flexiblas-devel fftw-mpich-devel gsl-devel libxc-devel \
perl-YAML perl-DateTime-HiRes \
git
RUN echo "target_include_directories(Libxc::xcf03 INTERFACE /usr/lib64/gfortran/modules)" >> \
/usr/lib64/cmake/Libxc/LibxcTargets-Fortran-release.cmake
ENV OCTOPUS_ROOT=${OCTOPUS_ROOT:-/octopus}
RUN git clone \
--recurse-submodules \
https://gitlab.com/octopus-code/octopus $OCTOPUS_ROOT
WORKDIR $OCTOPUS_ROOT
SHELL ["/bin/bash", "--login", "-c"]
RUN module load mpi/mpich && cmake --preset default -G Ninja \
-DOCTOPUS_MPI=ON -DOCTOPUS_OpenMP=ON -DFETCHCONTENT_SOURCE_DIR_SPGLIB=third_party/Spglib \
-DCMAKE_DISABLE_FIND_PACKAGE_METIS=ON
CMD cmake --build --preset default -j $(nproc)
(Note, if you are on podman
, add the --format docker
because of SHELL
)
Error reported:
Error: Type mismatch in argument ‘baseptr’ at (1); passed TYPE(c_ptr) to INTEGER(8)
/octopus/src/basic/mpi_lib_inc.F90:97:76:
97 | call MPI_Win_shared_query(window, 0, window_size, disp_unit, ptr, mpi_err)
| 1