snappyHexMesh openmp compilation error for linux64IccKNL and INTELMPI targets
The $WM_PROJECT_DIR/wmake/rules/linux64IccKNL/openmp macro is not working for snappyHexMesh. The Intel compiler outputs the following error regarding openmp library calls:
/opt/app/openfoam/ThirdParty-v1712-intelmpi-knl/platforms/linux64IccKNLDPInt32/lib/libkahip.so: undefined reference to omp_get_max_threads
/opt/app/openfoam/ThirdParty-v1712-intelmpi-knl/platforms/linux64IccKNLDPInt32/lib/libkahip.so: undefined reference to omp_get_thread_num
Intel compiler: icpc --version icpc (ICC) 18.0.0 20170811 Copyright (C) 1985-2017 Intel Corporation. All rights reserved.
$WM_PROJECT_DIR/etc/bashrc was configured with the following modified values:
export WM_PROJECT_VERSION=v1712-intelmpi-knl
export WM_COMPILER=IccKNL
export WM_MPLIB=INTELMPI
As a workaround, the -qopenmp compiling option was added to the CC variable line in $WM_PROJECT_DIR/wmake/rules/linux64IccKNL/c++
CC = icpc -std=c++11 -xmic-avx512 -qopenmp
-fp-trap=common -fp-model precise -fp-speculation=safe
OpenFOAM is being compiled now without errors.
## Reattaching the author to the issue ticket: @braulhiu ##