I don’t know if the user needs fftw. He asked for freefem “with petsc and everything”. But we do already have fftw modules on the cluster so maybe this is not a problem. However, I still have errors when trying to compile. Here’s exactly what I did:
git clone https://github.com/FreeFem/FreeFem-sources.git
cd FreeFem-sources/
module purge
module load intel
module load autotools
module load cmake/3.20.1-intel
export OPTF=-xCOMMON-AVX512
export CC=icc
export CFLAGS=$OPTF
export CXX=icpc
export CXXFLAGS=$OPTF
export FC=ifort
export FCFLAGS=$OPTF
export F77=ifort
export FFLAGS=$OPTF
autoreconf -i
./configure --prefix=/softs/freefem-intel --enable-download --enable-download-fftw=no --with-mpiinc=-I${I_MPI_ROOT}/intel64/include --with-mpilibs="-L${I_MPI_ROOT}/intel64/lib/release_mt -L${I_MPI_ROOT}/intel64/lib -lmpicxx -lmpifort -lmpi -lmpigi -ldl -lrt -lpthread" --with-mpilibsc="-L${I_MPI_ROOT}/intel64/lib/release_mt -L${I_MPI_ROOT}/intel64/lib -lmpicxx -lmpifort -lmpi -lmpigi -ldl -lrt -lpthread"
./3rdparty/getall -a
cd 3rdparty/ff-petsc/
I edited the Makefile as suggested to avoid the pt scotch error, then:
make petsc-slepc
Which gave an error:
CC fc/obj/mat/coarsen/impls/mis/mis.o
/usr/include/c++/4.8.5/bits/stl_algo.h(2263): error: function "lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool" cannot be called with the given argument list
argument types are: (std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, const std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>)
object type is: lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool
while (__comp(*__first, __pivot))
^
/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp(451): note: this candidate was rejected because arguments do not match
std::sort(MyComputedBlocks.begin(), MyComputedBlocks.end(), [](std::unique_ptr<IMatrix<T>> &a, std::unique_ptr<IMatrix<T>> &b) {
^
detected during:
instantiation of "_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp &, _Compare) [with _RandomAccessIterator=__gnu_cxx::__normal_iterator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> *, std::vector<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::allocator<std::unique_ptr<htool::IMatrix<PetscScalar>,
std::default_delete<htool::IMatrix<PetscScalar>>>>>>, _Tp=std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, _Compare=lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool]" at line 2296
instantiation of "_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator=__gnu_cxx::__normal_iterator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> *, std::vector<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::allocator<std::unique_ptr<htool::IMatrix<PetscScalar>,
std::default_delete<htool::IMatrix<PetscScalar>>>>>>, _Compare=lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool]" at line 2337
instantiation of "void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator=__gnu_cxx::__normal_iterator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> *, std::vector<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::allocator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>>>>,
_Size=long, _Compare=lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool]" at line 5499
instantiation of "void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter=__gnu_cxx::__normal_iterator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> *, std::vector<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::allocator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>>>>, _Compare=lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>,
std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool]" at line 457 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
instantiation of "void htool::HMatrix<T>::ComputeBlocks(htool::VirtualGenerator<T> &, const double *, const double *) [with T=PetscScalar]" at line 317 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
instantiation of "void htool::HMatrix<T>::build(htool::VirtualGenerator<T> &, const double *, const double *) [with T=PetscScalar]" at line 118 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
implicit generation of "htool::HMatrix<T>::~HMatrix() [with T=PetscScalar]" at line 118 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
instantiation of class "htool::HMatrix<T> [with T=PetscScalar]" at line 118 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
instantiation of "htool::HMatrix<T>::HMatrix(const std::shared_ptr<htool::VirtualCluster> &, const std::shared_ptr<htool::VirtualCluster> &, double, double, char, char, const int &, MPI_Comm={int}) [with T=PetscScalar]" at line 466 of "/softs/SOURCES/freefemintel/FreeFem-sources/3rdparty/ff-petsc/petsc-3.16.1/src/mat/impls/htool/htool.cxx"
/usr/include/c++/4.8.5/bits/stl_algo.h(2266): error: function "lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool" cannot be called with the given argument list
argument types are: (const std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>)
object type is: lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool
while (__comp(__pivot, *__last))
^
/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp(451): note: this candidate was rejected because arguments do not match
std::sort(MyComputedBlocks.begin(), MyComputedBlocks.end(), [](std::unique_ptr<IMatrix<T>> &a, std::unique_ptr<IMatrix<T>> &b) {
^
detected during:
instantiation of "_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp &, _Compare) [with _RandomAccessIterator=__gnu_cxx::__normal_iterator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> *, std::vector<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::allocator<std::unique_ptr<htool::IMatrix<PetscScalar>,
std::default_delete<htool::IMatrix<PetscScalar>>>>>>, _Tp=std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, _Compare=lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool]" at line 2296
instantiation of "_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator=__gnu_cxx::__normal_iterator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> *, std::vector<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::allocator<std::unique_ptr<htool::IMatrix<PetscScalar>,
std::default_delete<htool::IMatrix<PetscScalar>>>>>>, _Compare=lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool]" at line 2337
instantiation of "void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator=__gnu_cxx::__normal_iterator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> *, std::vector<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::allocator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>>>>,
_Size=long, _Compare=lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool]" at line 5499
instantiation of "void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter=__gnu_cxx::__normal_iterator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> *, std::vector<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>, std::allocator<std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>>>>>, _Compare=lambda [](std::unique_ptr<htool::IMatrix<PetscScalar>,
std::default_delete<htool::IMatrix<PetscScalar>>> &, std::unique_ptr<htool::IMatrix<PetscScalar>, std::default_delete<htool::IMatrix<PetscScalar>>> &)->bool]" at line 457 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
instantiation of "void htool::HMatrix<T>::ComputeBlocks(htool::VirtualGenerator<T> &, const double *, const double *) [with T=PetscScalar]" at line 317 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
instantiation of "void htool::HMatrix<T>::build(htool::VirtualGenerator<T> &, const double *, const double *) [with T=PetscScalar]" at line 118 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
implicit generation of "htool::HMatrix<T>::~HMatrix() [with T=PetscScalar]" at line 118 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
instantiation of class "htool::HMatrix<T> [with T=PetscScalar]" at line 118 of "/softs/freefem-intel/ff-petsc/c/include/htool/misc/../types/hmatrix.hpp"
instantiation of "htool::HMatrix<T>::HMatrix(const std::shared_ptr<htool::VirtualCluster> &, const std::shared_ptr<htool::VirtualCluster> &, double, double, char, char, const int &, MPI_Comm={int}) [with T=PetscScalar]" at line 466 of "/softs/SOURCES/freefemintel/FreeFem-sources/3rdparty/ff-petsc/petsc-3.16.1/src/mat/impls/htool/htool.cxx"
CC fc/obj/mat/order/sp1wd.o
CC fc/obj/mat/order/spnd.o
CC fc/obj/mat/order/spqmd.o
CC fc/obj/mat/order/sprcm.o
compilation aborted for /softs/SOURCES/freefemintel/FreeFem-sources/3rdparty/ff-petsc/petsc-3.16.1/src/mat/impls/htool/htool.cxx (code 2)
gmake[5]: *** [fc/obj/mat/impls/htool/htool.o] Error 2
gmake[5]: *** Waiting for unfinished jobs....
gmake[4]: *** [libs] Error 2
**************************ERROR*************************************
Error during compile, check fc/lib/petsc/conf/make.log
Send it and fc/lib/petsc/conf/configure.log to petsc-maint@mcs.anl.gov
********************************************************************
make[3]: *** [all] Error 1
make[2]: *** [all] Error 2
make[2]: Leaving directory `/softs/SOURCES/freefemintel/FreeFem-sources/3rdparty/ff-petsc/petsc-3.16.1'
make[1]: *** [petsc-3.16.1/tag-make-complex] Error 2
make[1]: Leaving directory `/softs/SOURCES/freefemintel/FreeFem-sources/3rdparty/ff-petsc'
make: *** [WHERE-all] Error 2
It looks like it’s using the wrong c++ compiler: /usr/include/c++/4.8.5 instead of the icc compiler.
Also, during make petsc-slepc, it looks like the wrong mpi is being used. It says “using mpiexec: /softs/freefem-intel/ff-petsc/r/bin/mpiexec” (which is the mpich installed with make petsc-slepc) whereas it should use my Intel MPI compiler?
Maybe it’s possible to install freefem only, and petsc separately?
Here’s the make.log related to the error: 1fichier.com: Cloud Storage