Add make of mkl blas lapack
The new MKL version does not automatically provide blas and lapack. On our systems we are compiling them, so that they can be used by PETSc.
I have been trying to create an MR for ogscm, but I am missing something.
I am trying to add these commands to be executed before PETSc configure
make --directory=/opt/intel/oneapi/mkl/2021.4.0/lib --makefile=/opt/intel/oneapi/mkl/2021.4.0/tools/builder/makefile libintel64 interface=lp64 export=/opt/intel/oneapi/mkl/2021.4.0/tools/builder/blas_example_list name=/opt/intel/oneapi/mkl/2021.4.0/lib/intel64/libbl>
make --directory=/opt/intel/oneapi/mkl/2021.4.0/lib --makefile=/opt/intel/oneapi/mkl/2021.4.0/tools/builder/makefile libintel64 interface=lp64 export=/opt/intel/oneapi/mkl/2021.4.0/tools/builder/lapack_example_list name=/opt/intel/oneapi/mkl/2021.4.0/lib/intel64/lib>
ln -s /opt/intel/oneapi/mkl/2021.4.0/lib/intel64/libblas.so /opt/intel/oneapi/mkl/2021.4.0/lib/intel64/libblas.so.3 && \
ln -s /opt/intel/oneapi/mkl/2021.4.0/lib/intel64/liblapack.so /opt/intel/oneapi/mkl/2021.4.0/lib/intel64/liblapack.so.3 && \
The result should look like this:
# http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.18.6.tar.gz
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.18.6.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/petsc-lite-3.18.6.tar.gz -C /var/tmp -z && \
make --directory=/opt/intel/oneapi/mkl/2021.4.0/lib --makefile=/opt/intel/oneapi/mkl/2021.4.0/tools/builder/makefile libintel64 interface=lp64 export=/opt/intel/oneapi/mkl/2021.4.0/tools/builder/blas_example_list name=/opt/intel/oneapi/mkl/2021.4.0/lib/intel64/libbl>
make --directory=/opt/intel/oneapi/mkl/2021.4.0/lib --makefile=/opt/intel/oneapi/mkl/2021.4.0/tools/builder/makefile libintel64 interface=lp64 export=/opt/intel/oneapi/mkl/2021.4.0/tools/builder/lapack_example_list name=/opt/intel/oneapi/mkl/2021.4.0/lib/intel64/lib>
ln -s /opt/intel/oneapi/mkl/2021.4.0/lib/intel64/libblas.so /opt/intel/oneapi/mkl/2021.4.0/lib/intel64/libblas.so.3 && \
ln -s /opt/intel/oneapi/mkl/2021.4.0/lib/intel64/liblapack.so /opt/intel/oneapi/mkl/2021.4.0/lib/intel64/liblapack.so.3 && \
cd /var/tmp/petsc-3.18.6 && CC=mpicc CXX=mpicxx F77=mpif77 F90=mpif90 FC=mpifort ./configure --prefix=/usr/local/petsc --CFLAGS='-O3' --CXXFLAGS='-O3' --FFLAGS='-O3' --download-f2cblaslapack=0 --download-f2cblaslapack=1 --download-fc --download-hypre --download-mum>
make -j$(nproc) && \
make -j$(nproc) install && \
echo "/usr/local/petsc/lib" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig && \
rm -rf /var/tmp/petsc-3.18.6 /var/tmp/petsc-lite-3.18.6.tar.gz
ENV CMAKE_PREFIX_PATH=/usr/local/petsc
My changes to ogs.py so far: kristofkessler/container-maker@main...mkl_blaslapack
What am I missing? Thanks.