mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: add clang third-party lib to LD_LIBRARY_PATH
- required if there is no system openmp and libomp or libgomp are only found in the clang hierarchy STYLE: add some notes in the openmp rules. - the _OPENMP macro is now used in low-level testing files
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
EXE_INC = ${COMP_OPENMP}
|
||||
EXE_INC = ${COMP_OPENMP} /* -UUSE_OMP */
|
||||
|
||||
/* Mostly do not need to explicitly link openmp libraries */
|
||||
/* EXE_LIBS = ${LINK_OPENMP} */
|
||||
|
||||
@ -30,7 +30,7 @@ Description
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef USE_OMP
|
||||
#if _OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
@ -39,11 +39,19 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if USE_OMP
|
||||
std::cout << "USE_OMP defined (" << USE_OMP << ")\n";
|
||||
#else
|
||||
std::cout << "USE_OMP undefined\n";
|
||||
#endif
|
||||
|
||||
#if _OPENMP
|
||||
std::cout << "_OPENMP = " << _OPENMP << "\n\n";
|
||||
|
||||
// Fork threads with their own copies of variables
|
||||
int nThreads, threadId;
|
||||
|
||||
// Fork threads with their own copies of variables
|
||||
#ifdef USE_OMP
|
||||
#pragma omp parallel private(nThreads, threadId)
|
||||
#pragma omp parallel private(nThreads, threadId)
|
||||
{
|
||||
threadId = omp_get_thread_num();
|
||||
nThreads = omp_get_num_threads();
|
||||
|
||||
@ -302,6 +302,7 @@ CLANG_NOT_FOUND
|
||||
|
||||
_foamAddMan $clangDir/man
|
||||
_foamAddPath $clangDir/bin
|
||||
_foamAddLib $clangDir/lib # For things like libomp (openmp) etc
|
||||
|
||||
if ($?FOAM_VERBOSE && $?prompt) then
|
||||
echo "Using ThirdParty compiler"
|
||||
|
||||
@ -287,6 +287,7 @@ CLANG_NOT_FOUND
|
||||
|
||||
_foamAddMan $clangDir/share/man
|
||||
_foamAddPath $clangDir/bin
|
||||
_foamAddLib $clangDir/lib # For things like libomp (openmp) etc
|
||||
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
# -
|
||||
# Clang provides 'omp' and a link for 'gomp'.
|
||||
# With 'gomp' we can use system libs.
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -qopenmp
|
||||
LINK_OPENMP = -liomp5
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -qopenmp
|
||||
LINK_OPENMP = -liomp5
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
# -
|
||||
# Clang provides 'omp' and a link for 'gomp'.
|
||||
# With 'gomp' we can use system libs.
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
# -
|
||||
# Clang provides 'omp' and a link for 'gomp'.
|
||||
# With 'gomp' we can use system libs.
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -qopenmp
|
||||
LINK_OPENMP = -liomp5
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Flags for compiling/linking openmp
|
||||
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
|
||||
|
||||
COMP_OPENMP = -DUSE_OMP -fopenmp
|
||||
LINK_OPENMP = -lgomp
|
||||
|
||||
Reference in New Issue
Block a user