-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenFOAM with extranal cgal, metis, and paraview, with deps using intel2... #1166
Changes from 5 commits
d96ddc9
7dfc845
9a6fdc1
d836f9a
5ea2ec0
5067d3e
3bd9200
6b34ddb
df69c9b
f6edd12
c448f2f
b932133
deb6a8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name = 'CGAL' | ||
version = '4.5' | ||
|
||
homepage = 'http://www.cgal.org/' | ||
description = """The goal of the CGAL Open Source Project is to provide easy access to efficient | ||
and reliable geometric algorithms in the form of a C++ library.""" | ||
|
||
|
||
toolchain = {'name': 'intel', 'version': '2014b'} | ||
toolchainopts = {'strict': True} | ||
|
||
sources = [SOURCE_TAR_BZ2] | ||
source_urls = ['https://gforge.inria.fr/frs/download.php/file/34150/'] | ||
# The directory changes with the version (and maybe in time) ---^ | ||
# Have to accept license agreement | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. drop comments? download still works, no query to accept license agreement? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it is a reminder if version changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, if the version is bumped, the dowload will fails during testing, so I don't think it has a lot of value? If you insist on including it, put it right above |
||
|
||
pythonversion = '2.7.8' | ||
versionsuffix = "-Python-%s" % pythonversion | ||
|
||
dependencies = [ | ||
('GMP', '5.1.3'), | ||
('Boost', '1.55.0', versionsuffix), | ||
('MPFR', '3.1.2'), | ||
('Qt', '4.8.6'), | ||
] | ||
|
||
builddeps = [ | ||
('CMake', '3.0.0'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. upgrade to |
||
] | ||
|
||
moduleclass = 'numlib' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
easyblock = 'ConfigureMake' | ||
|
||
name = 'GMP' | ||
version = '5.1.3' | ||
|
||
homepage = 'http://gmplib.org/' | ||
description = """GMP is a free library for arbitrary precision arithmetic, | ||
operating on signed integers, rational numbers, and floating point numbers. """ | ||
|
||
toolchain = {'name': 'intel', 'version': '2014b'} | ||
|
||
sources = [SOURCELOWER_TAR_BZ2] | ||
source_urls = ['http://ftp.gnu.org/gnu/gmp'] | ||
|
||
# enable C++ interface | ||
configopts = '--enable-cxx' | ||
|
||
runtest = 'check' | ||
|
||
sanity_check_paths = { | ||
'files': ['lib/libgmp.%s' % SHLIB_EXT, 'include/gmp.h'], | ||
'dirs': [], | ||
} | ||
|
||
moduleclass = 'math' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name = 'METIS' | ||
version = '5.1.0' | ||
versionsuffix = '-32bitIDX' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you clarify this versionsuffix? The only 'special' thing I see in here is that the METIS shared libs get built? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. boegel: Well, the other special thing is the absence of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, that explains it. Maybe add a comment right above the versionsuffix to clarify that? Something like "default 32-bit IDTYPEWIDTH, no patch used" ? |
||
|
||
homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' | ||
description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, | ||
and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the | ||
multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.""" | ||
|
||
toolchain = {'name': 'intel', 'version': '2014b'} | ||
toolchainopts = {'optarch': True, 'pic': True} | ||
|
||
sources = [SOURCELOWER_TAR_GZ] | ||
source_urls = [ | ||
'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', | ||
'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD', | ||
] | ||
|
||
builddependencies = [('CMake', '3.0.0')] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
configopts = [' ', 'shared=1 '] | ||
|
||
moduleclass = 'math' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
easyblock = 'ConfigureMake' | ||
|
||
name = 'MPFR' | ||
version = '3.1.2' | ||
|
||
homepage = 'http://www.mpfr.org' | ||
description = """The MPFR library is a C library for multiple-precision | ||
floating-point computations with correct rounding.""" | ||
|
||
toolchain = {'name': 'intel', 'version': '2014b'} | ||
|
||
source_urls = ['http://www.mpfr.org/mpfr-%s/' % version] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use |
||
sources = [SOURCELOWER_TAR_BZ2] | ||
|
||
patches = ['MPFR_ictce_remove-deprecated-mp.patch'] | ||
|
||
dependencies = [('GMP', '5.1.3')] | ||
|
||
runtest = 'check' | ||
|
||
sanity_check_paths = { | ||
'files': ['lib/libmpfr.%s' % SHLIB_EXT, 'include/mpfr.h'], | ||
'dirs': [] | ||
} | ||
|
||
moduleclass = 'math' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name = 'OpenFOAM' | ||
version = '2.3.0' | ||
|
||
homepage = 'http://www.openfoam.com/' | ||
description = """OpenFOAM is a free, open source CFD software package. | ||
OpenFOAM has an extensive range of features to solve anything from complex fluid flows | ||
involving chemical reactions, turbulence and heat transfer, | ||
to solid dynamics and electromagnetics.""" | ||
|
||
toolchain = {'name': 'intel', 'version': '2014b'} | ||
|
||
source_urls = ['http://downloads.sourceforge.net/foam/%(version)s'] | ||
sources = [ | ||
SOURCE_TGZ, | ||
'ThirdParty-%(version)s.tgz', | ||
] | ||
|
||
paraversion = '4.2.0' | ||
|
||
patches = [ | ||
'OpenFOAM-%(version)s_bugfix1.patch', | ||
'cleanup-OpenFOAM-%(version)s.patch', | ||
'OpenFOAM-%(version)s_libreadline.patch', | ||
('cleanup-ThirdParty-%(version)s.patch', ".."), # patch should not be applied in OpenFOAM subdir | ||
'external-3rd-OpenFOAM-%(version)s.patch', | ||
('external-3rd-ThirdParty-%(version)s.patch', ".."), | ||
'external_paraview_%s.patch' % paraversion, | ||
] | ||
|
||
dependencies = [ | ||
('CGAL', '4.5', '-Python-2.7.8'), | ||
('libreadline', '6.3'), | ||
('METIS', '5.1.0', '-32bitIDX'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. versionsuffix? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not understand this comment. Sould I use a versionsuffix for OpenFOAM? The default index for METIS is 32 bit (as it compiles in the version included in OpenFOAM), but all our versions use a patch to make the index 64 bit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, leave it, you explained the versionsuffix for METIS, so it's fine as is. |
||
('ncurses', '5.9'), | ||
('Paraview', paraversion), | ||
('SCOTCH', '6.0.0_esmumps'), | ||
] | ||
|
||
builddependencies = [ | ||
('Bison', '3.0.2'), | ||
('CMake', '3.0.0'), | ||
('flex', '2.5.39'), | ||
] | ||
|
||
moduleclass = 'cae' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
#Use external CGAL and METIS (via CGAL_ROOT, BOOST_ROOT and METIS_ROOT in easyconfig) | ||
#B. Hajgato OCT 23,2014 | ||
--- OpenFOAM-2.3.0.ORIG/etc/config/CGAL.csh 2014-02-11 12:59:42.000000000 +0100 | ||
+++ OpenFOAM-2.3.0/etc/config/CGAL.csh 2014-10-23 07:33:17.186624521 +0200 | ||
@@ -29,26 +29,36 @@ | ||
# Sourced from OpenFOAM-<VERSION>/etc/cshrc | ||
##------------------------------------------------------------------------------ | ||
|
||
-set boost_version=boost-system | ||
-set cgal_version=CGAL-4.3 | ||
+if ( ${?EBROOTCGAL} != 0 ) then | ||
+ setenv BOOST_ARCH_PATH $EBROOTBOOST | ||
+ setenv CGAL_ARCH_PATH $EBROOTCGAL | ||
+ | ||
+elif ( ${?CGAL_ROOT} != 0 ) then | ||
+ setenv BOOST_ARCH_PATH $CGAL_ROOT | ||
+ setenv CGAL_ARCH_PATH $CGAL_ROOT | ||
+ | ||
+else | ||
+ set boost_version=boost-system | ||
+ set cgal_version=CGAL-4.3 | ||
+ | ||
+ setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version | ||
+ setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version | ||
+ | ||
+ if ($?FOAM_VERBOSE && $?prompt) then | ||
+ echo "Using CGAL and boost" | ||
+ echo " $cgal_version at $CGAL_ARCH_PATH" | ||
+ echo " $boost_version at $BOOST_ARCH_PATH" | ||
+ endif | ||
+ | ||
+ if ( -d "$CGAL_ARCH_PATH" ) then | ||
+ _foamAddLib $CGAL_ARCH_PATH/lib | ||
+ endif | ||
+ | ||
+ if ( -d "$BOOST_ARCH_PATH" ) then | ||
+ _foamAddLib $BOOST_ARCH_PATH/lib | ||
+ endif | ||
|
||
-setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version | ||
-setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version | ||
- | ||
-if ($?FOAM_VERBOSE && $?prompt) then | ||
- echo "Using CGAL and boost" | ||
- echo " $cgal_version at $CGAL_ARCH_PATH" | ||
- echo " $boost_version at $BOOST_ARCH_PATH" | ||
-endif | ||
- | ||
-if ( -d "$CGAL_ARCH_PATH" ) then | ||
- _foamAddLib $CGAL_ARCH_PATH/lib | ||
+ unset boost_version cgal_version | ||
endif | ||
|
||
-if ( -d "$BOOST_ARCH_PATH" ) then | ||
- _foamAddLib $BOOST_ARCH_PATH/lib | ||
-endif | ||
- | ||
-unset boost_version cgal_version | ||
- | ||
# ----------------------------------------------------------------------------- | ||
--- OpenFOAM-2.3.0.ORIG/etc/config/CGAL.sh 2014-02-11 12:59:42.000000000 +0100 | ||
+++ OpenFOAM-2.3.0/etc/config/CGAL.sh 2014-10-23 07:33:00.706674383 +0200 | ||
@@ -29,29 +29,39 @@ | ||
# Sourced from OpenFOAM-<VERSION>/etc/bashrc | ||
#------------------------------------------------------------------------------ | ||
|
||
-boost_version=boost-system | ||
-cgal_version=CGAL-4.3 | ||
+if [ -n "${EBROOTCGAL}" ]; then | ||
+ export CGAL_ARCH_PATH="${EBROOTCGAL}" | ||
+ export BOOST_ARCH_PATH="${EBROOTBOOST}" | ||
+ | ||
+elif [ -n "${CGAL_ROOT}" ]; then | ||
+ export CGAL_ARCH_PATH="${CGAL_ROOT}" | ||
+ export BOOST_ARCH_PATH="${CGAL_ROOT}" | ||
+ | ||
+else | ||
+ boost_version=boost-system | ||
+ cgal_version=CGAL-4.3 | ||
+ | ||
+ export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version | ||
+ export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version | ||
+ | ||
+ if [ "$FOAM_VERBOSE" -a "$PS1" ] | ||
+ then | ||
+ echo "Using CGAL and boost" | ||
+ echo " $cgal_version at $CGAL_ARCH_PATH" | ||
+ echo " $boost_version at $BOOST_ARCH_PATH" | ||
+ fi | ||
+ | ||
+ if [ -d "$CGAL_ARCH_PATH" ] | ||
+ then | ||
+ _foamAddLib $CGAL_ARCH_PATH/lib | ||
+ fi | ||
+ | ||
+ if [ -d "$BOOST_ARCH_PATH" ] | ||
+ then | ||
+ _foamAddLib $BOOST_ARCH_PATH/lib | ||
+ fi | ||
|
||
-export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version | ||
-export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version | ||
- | ||
-if [ "$FOAM_VERBOSE" -a "$PS1" ] | ||
-then | ||
- echo "Using CGAL and boost" | ||
- echo " $cgal_version at $CGAL_ARCH_PATH" | ||
- echo " $boost_version at $BOOST_ARCH_PATH" | ||
-fi | ||
- | ||
-if [ -d "$CGAL_ARCH_PATH" ] | ||
-then | ||
- _foamAddLib $CGAL_ARCH_PATH/lib | ||
+ unset boost_version cgal_version | ||
fi | ||
|
||
-if [ -d "$BOOST_ARCH_PATH" ] | ||
-then | ||
- _foamAddLib $BOOST_ARCH_PATH/lib | ||
-fi | ||
- | ||
-unset boost_version cgal_version | ||
- | ||
# ----------------------------------------------------------------------------- | ||
--- OpenFOAM-2.3.0.ORIG/etc/config/metis.sh 2014-02-11 12:59:42.000000000 +0100 | ||
+++ OpenFOAM-2.3.0/etc/config/metis.sh 2014-10-23 07:55:07.920637398 +0200 | ||
@@ -33,7 +33,15 @@ | ||
# during the wmake process | ||
#------------------------------------------------------------------------------ | ||
|
||
-export METIS_VERSION=metis-5.1.0 | ||
-export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$METIS_VERSION | ||
+if [ -n "${EBROOTMETIS}" ] ; then | ||
+ export METIS_ARCH_PATH=$EBROOTMETIS | ||
+ | ||
+elif [ -n "${METIS_ROOT}" ] ; then | ||
+ export METIS_ARCH_PATH=$METIS_ROOT | ||
+ | ||
+else | ||
+ export METIS_VERSION=metis-5.1.0 | ||
+ export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$METIS_VERSION | ||
+fi | ||
|
||
# ----------------------------------------------------------------------------- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#Use external CGAL and METIS (via CGAL_ROOT, and METIS_ROOT in easyconfig) | ||
#B. Hajgato OCT 23,2014 | ||
--- ThirdParty-2.3.0.ORIG/Allwmake 2014-10-22 16:52:34.833435329 +0200 | ||
+++ ThirdParty-2.3.0/Allwmake 2014-10-23 08:12:41.745387953 +0200 | ||
@@ -324,32 +324,44 @@ | ||
echo ======================================== | ||
echo Build Metis decomposition | ||
|
||
-# get METIS_VERSION, METIS_ARCH_PATH | ||
-if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/metis.sh` | ||
+if [ -n "$METIS_ROOT" ] | ||
then | ||
- . $settings | ||
+ METIS_ARCH_PATH=$METIS_ROOT | ||
fi | ||
-if [ -d "$METIS_VERSION" ] | ||
-then | ||
|
||
- if [ -f $METIS_ARCH_PATH/include/metis.h \ | ||
- -a -r $FOAM_EXT_LIBBIN/libmetis.so ] | ||
- then | ||
+if [ -f $METIS_ARCH_PATH/include/metis.h \ | ||
+ -a -r $METIS_ARCH_PATH/lib/libmetis.so ] | ||
+then | ||
echo " metis header in $METIS_ARCH_PATH/include" | ||
- echo " metis libs in $FOAM_EXT_LIBBIN" | ||
+ echo " metis libs in $METIS_ARCH_PATH/lib" | ||
echo | ||
+else | ||
+ # get METIS_VERSION, METIS_ARCH_PATH | ||
+ if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/metis.sh` | ||
+ then | ||
+ . $settings | ||
+ fi | ||
+ if [ -d "$METIS_VERSION" ] | ||
+ then | ||
+ | ||
+ if [ -f $METIS_ARCH_PATH/include/metis.h \ | ||
+ -a -r $FOAM_EXT_LIBBIN/libmetis.so ] | ||
+ then | ||
+ echo " metis header in $METIS_ARCH_PATH/include" | ||
+ echo " metis libs in $FOAM_EXT_LIBBIN" | ||
+ echo | ||
+ else | ||
+ set -x | ||
+ cd $METIS_VERSION || exit 1 | ||
+ make config shared=1 prefix=$METIS_ARCH_PATH | ||
+ make -j $WM_NCOMPPROCS install | ||
+ cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN | ||
+ fi | ||
else | ||
- set -x | ||
- cd $METIS_VERSION || exit 1 | ||
- make config shared=1 prefix=$METIS_ARCH_PATH | ||
- make -j $WM_NCOMPPROCS install | ||
- cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN | ||
+ echo " optional component Metis was not found" | ||
fi | ||
-else | ||
- echo " optional component Metis was not found" | ||
fi | ||
|
||
- | ||
# CGAL is optional | ||
echo ======================================== | ||
echo Build CGAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove double newline