FreeFEM v4.x installation
Post date: 2019/12/19, Last update: 2023/8/31
ff-mpirun の変更 (v4.6以降)
graphics option 変更
"-glut ffglut" -> "-wg"
ubuntu
FreeFEM 4.13 on ubuntu 22.04 LTS (2023-08-31)
FreeFEM 4.12 on ubuntu 22.04 LTS (2023-05-16)
FreeFEM 4.11 on ubuntu 22.04 LTS (2022-11-27)
4.9 までと同じ手順でインストール可能
$ source /opt/intel/oneapi/setvars.sh
$ autoreconf -i
$ ./configure --enable-download --with-mkl=$MKLROOT/lib --enable-mkl_mlt
$ ./3rdparty/getall -a
$ cd 3rdparty/ff-petsc
$ make petsc-slepc SUDO=sudo
$ cd ../..
$ ./reconfigure
$ make
$ make check
$ sudo bash
# source /opt/intel/oneapi/setvars.sh
# make install
apt から MKL をインストール
$ sudo apt install intel-mkl-full
source ... は不要
OneAPI を利用
Intel oneAPI Toolkits から oneAPI Base Toolkit と oneAPI HPC Toolkit をインストール
下記のファイルで、MPI_INCLUDE, AM_CPPFLAGS での記述が誤って、reconfigure 後の make で "-rpath " がエラーとなる
config.status, Makefile, src/Makefile, src/mpi/Makefile, plugin/Makefile, plugin/seq/Makefile, plugin/seq/WHERE_LIBRARY-config
... -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker -Xlinker -rpath -Xlinker -Xlinker --enable-new-dtags ...
とりあえずの対処方法:対象ファイルを手動で修正して、make を再実行
... -Xlinker --enable-new-dtags ...
FreeFEM 4.4.3 - 4.9 on ubuntu
FreeFEM 4.9 on ubuntu 20.04 LTS with intel MKL (2021-05-30)
FreeFEM 4.7 on ubuntu 20.04 LTS (WSL2) with intel MKL (2020-09-09)
FreeFEM 4.6 on ubuntu 18.04.3 LTS (clean) with intel MKL (2020-06-11)
FreeFEM 4.5 on ubuntu 18.04.3 LTS (clean) with intel MKL (2020-03-03)
FreeFEM 4.4.3 on ubuntu 18.04.3 LTS (clean) with intel MKL (2020-01-13)
Install Intel MKL
$ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
$ sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
$ sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
$ sudo apt update
$ sudo apt install intel-mkl-64bit-2020.0-088
(最新版はhttps://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-apt-repoで確認)
Install FreeFEM (make install でも MKL用設定を読み込むことに注意)
$ sudo apt install autoconf build-essential unzip m4 bison flex patch cmake freeglut3-dev gfortran python2.7 gnuplot git openmpi-bin libopenmpi-dev valgrind
(ubuntu20.04 WSL2) $ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
(ubuntu20.04 WSL2) $ sudo apt install python
$ source /opt/intel/bin/compilervars.sh intel64
$ autoreconf -i
$ ./configure --enable-download --with-mkl=$MKLROOT/lib --enable-mkl_mlt
$ ./3rdparty/getall -a
$ cd 3rdparty/ff-petsc
$ make petsc-slepc SUDO=sudo
$ cd -
$ ./reconfigure
$ make
$ make check
$ sudo bash
# source /opt/intel/bin/compilervars.sh intel64
# make install
CentOS
FreeFEM 4.7 on CentOS 7
FreeFEM 4.7 on CentOS 7 with intel compiler (2020-09-09)
SuperLU のコンパイルでエラーが出ます。
対応:
configure で --disable-superlu
3rdparty/ff-petsc/Makefile で superlu 関連を全てコメントアウト
Install
$ yum install gcc-g++ cmake valgrind-devel
$ tar zxvf v4.6.tar.gz
$ cd FreeFem-sources-4.4.3
$ source /opt/intel/bin/compilervars.sh intel64
$ export CC=icc; export CXX=icpc; export FC=ifort; export F77=ifort; export MPICC=mpiicc; export MPICXX=mpiicpc; export MPIFC=mpiifort
$ autoreconf -i
$ ./configure --enable-download --with-mpi=mpiicpc --with-mkl=$MKLROOT/lib --enable-mkl_mlt --disable-superlu | tee configure.out
$ ./3rdparty/getall -a
$ cd 3rdparty/ff-petsc/
Makefile から superlu 関連を全てコメントアウト
$ make petsc-slepc SUDO=sudo
$ cd ../..
$ MPIRUN=mpiexec ./reconfigure
$ make
$ sudo bash
# source /opt/intel/bin/compilervars.sh intel64
# export CC=icc; export CXX=icpc; export FC=ifort; export F77=ifort; export MPICC=mpiicc; export MPICXX=mpiicpc; export MPIFC=mpiifort
# make install
エラーメッセージ
===============================================================================
***** WARNING: F77 (set to ifort) found in environment variables - ignoring
use ./configure F77=$F77 if you really want to use that value ******
===============================================================================
$ less petsc-3.13.0/configure.log
*******************************************************************************
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
-------------------------------------------------------------------------------
Error configuring SUPERLU with cmake
*******************************************************************************
File "/home/ttks/src/c/FreeFem/FreeFem-sources-4.6/3rdparty/ff-petsc/petsc-3.13.0/config/configure.py", line 440, in petsc_configure
framework.configure(out = sys.stdout)
File "/home/ttks/src/c/FreeFem/FreeFem-sources-4.6/3rdparty/ff-petsc/petsc-3.13.0/config/BuildSystem/config/framework.py", line 1229, in configure
self.processChildren()
File "/home/ttks/src/c/FreeFem/FreeFem-sources-4.6/3rdparty/ff-petsc/petsc-3.13.0/config/BuildSystem/config/framework.py", line 1218, in processChildren
self.serialEvaluation(self.childGraph)
File "/home/ttks/src/c/FreeFem/FreeFem-sources-4.6/3rdparty/ff-petsc/petsc-3.13.0/config/BuildSystem/config/framework.py", line 1193, in serialEvaluation
child.configure()
File "/home/ttks/src/c/FreeFem/FreeFem-sources-4.6/3rdparty/ff-petsc/petsc-3.13.0/config/BuildSystem/config/package.py", line 1110, in configure
self.executeTest(self.configureLibrary)
File "/home/ttks/src/c/FreeFem/FreeFem-sources-4.6/3rdparty/ff-petsc/petsc-3.13.0/config/BuildSystem/config/base.py", line 139, in executeTest
ret = test(*args,**kargs)
File "/home/ttks/src/c/FreeFem/FreeFem-sources-4.6/3rdparty/ff-petsc/petsc-3.13.0/config/BuildSystem/config/package.py", line 875, in configureLibrary
for location, directory, lib, incl in self.generateGuesses():
File "/home/ttks/src/c/FreeFem/FreeFem-sources-4.6/3rdparty/ff-petsc/petsc-3.13.0/config/BuildSystem/config/package.py", line 453, in generateGuesses
FreeFEM 4.4.3 on CentOS 7
FreeFEM 4.4.3 on CentOS 7 with intel compiler (2019-12-19)
$ tar zxvf FreeFem-sources-4.4.3.tar.gz
$ cd FreeFem-sources-4.4.3
$ source /opt/intel/bin/compilervars.sh intel64
$ autoreconf -i
$ export CC=icc; export CXX=icpc; export FC=ifort; export F77=ifort; export MPICC=mpiicc; export MPICXX=mpiicpc; export MPIFC=mpiifort
$ ./configure --enable-download --with-optim \
--with-mpi=mpiicpc --with-mkl=$MKLROOT/lib --enable-mkl_mlt | tee configure.out
$ ./3rdparty/getall -a
$ cd 3rdparty/ff-petsc/
$ make petsc-slepc SUDO=sudo
$ cd ../..
$ MPIRUN=mpiexec ./reconfigure
$ make
$ sudo bash
# source /opt/intel/bin/compilervars.sh intel64
# export CC=icc; export CXX=icpc; export FC=ifort; export F77=ifort; export MPICC=mpiicc; export MPICXX=mpiicpc; export MPIFC=mpiifort
# make install
WSL2
PATH : WSL では PATH に Windows 関連 PATH も設定されてしまうため,ubuntu 関連のものだけに設定し直したほうが安全
空白の入った PATH は reconfigure の際にエラーを誘発
[動作が変わりました(調査中) 2020-09-14] X window : WSL2 では毎回 IP address が変わるので,環境変数 DISPLAY を正しく設定する必要あり
(~/.bashrc) export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
[動かなくなりました 2020-09-14]
(vcXsrv option) Disable access control: ON, additional parameters "-ac"
(Windows firewall) vcXsrv: private/public "OK"
(MobaXterm) OK
Ref.
Can't use X-Server in WSL 2 https://github.com/microsoft/WSL/issues/4106
WSL2のGUI設定でつまずいたところ https://qiita.com/baibai25/items/5841b0592727893d960f
WSL上にXサーバをインストールしてGUIを実現する(VcXsrv編) https://www.atmarkit.co.jp/ait/articles/1812/06/news040.html