Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
f5275444
Commit
f5275444
authored
Jun 19, 2018
by
Mark Olesen
Browse files
CONFIG: adjust adios2 config
parent
02f97872
Changes
5
Hide whitespace changes
Inline
Side-by-side
etc/bashrc
View file @
f5275444
...
...
@@ -158,6 +158,7 @@ _foamEtc -config vtk
_foamEtc
-config
ensight
_foamEtc
-config
gperftools
## _foamEtc -config ADIOS
## _foamEtc -config ADIOS2
_foamEtc
-config
CGAL
_foamEtc
-config
scotch
_foamEtc
-config
FFTW
...
...
etc/config.csh/ADIOS2
View file @
f5275444
...
...
@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2017
-2018
OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
...
...
@@ -28,16 +28,12 @@ if ($?FOAM_VERBOSE && $?prompt) then
echo
"Using adios (
$adios2_version
) ->
$ADIOS2_ARCH_PATH
"
endif
# If *_ARCH_PATH does not end with '-system' or '-none',
# it is located within ThirdParty, or a central installation
# outside of ThirdParty and should be added to the path.
set
ending
=
"
${
ADIOS2_ARCH_PATH
:t
}
"
if
(
"
$ending
"
!=
"adios-none"
&&
"
$ending
"
!=
"adios-system"
)
then
# PATH was already cleaned by etc/cshrc caller
# - only add if the directory really exists
_foamAddLibAuto
$ADIOS2_ARCH_PATH
if
(
$status
==
0
)
then
_foamAddPath
$ADIOS2_ARCH_PATH
/bin
endif
unset
adios_version
ending
unset
adios
2
_version
#------------------------------------------------------------------------------
etc/config.sh/ADIOS2
View file @
f5275444
...
...
@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2017
-2018
OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
...
...
@@ -16,6 +16,7 @@
# Description
# Setup for ADIOS2 include/libraries (usually ThirdParty installation).
#
# Use with -force when sourcing directly from the command-line
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
...
...
@@ -29,21 +30,30 @@ then
echo
"Using adios (
$adios2_version
) ->
$ADIOS2_ARCH_PATH
"
1>&2
fi
if
command
-v
_foamAdd
Path
>
/dev/null 2>&1
# Normal sourcing
if
command
-v
_foamAdd
LibAuto
>
/dev/null 2>&1
then
# If *_ARCH_PATH does not end with '-system' or '-none',
# it is located within ThirdParty, or a central installation
# outside of ThirdParty and should be added to the path.
# Normal sourcing (not makeADIOS)
# - but only add if the directory really exists
ending
=
"
${
ADIOS2_ARCH_PATH
##*-
}
"
if
[
"
$ending
"
!=
none
-a
"
$ending
"
!=
system
]
if
_foamAddLibAuto
$ADIOS2_ARCH_PATH
then
# PATH was already cleaned by etc/bashrc caller
_foamAddPath
$ADIOS2_ARCH_PATH
/bin
fi
unset
adios2_version
ending
unset
adios2_version
elif
[
"
$1
"
=
"-force"
]
then
# Forced command-line sourcing
if
output
=
"
$(
$WM_PROJECT_DIR
/bin/tools/lib-dir
-sh
$ADIOS2_ARCH_PATH
2>/dev/null
)
"
then
eval
"
$output
"
PATH
=
"
$ADIOS2_ARCH_PATH
/bin:
$PATH
"
fi
unset
adios2_version output
fi
#------------------------------------------------------------------------------
etc/cshrc
View file @
f5275444
...
...
@@ -200,6 +200,7 @@ _foamEtc -config paraview -- "$FOAM_SETTINGS" # Pass through for evaluation
_foamEtc
-config
vtk
_foamEtc
-config
ensight
## _foamEtc -config ADIOS
## _foamEtc -config ADIOS2
_foamEtc
-config
CGAL
_foamEtc
-config
FFTW
...
...
wmake/scripts/have_adios2
0 → 100644
View file @
f5275444
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# Script
# have_adios2
#
# Description
# Detection/setup of ADIOS2
#
# Requires
# ADIOS2_ARCH_PATH
#
# Functions provided
# have_adios2, no_adios2, echo_adios2
#
# Variables set on success
# HAVE_ADIOS2
# ADIOS2_ARCH_PATH
# ADIOS2_INC_DIR
# ADIOS2_LIB_DIR
#
#------------------------------------------------------------------------------
.
$WM_PROJECT_DIR
/wmake/scripts/sysFunctions
# General system functions
#------------------------------------------------------------------------------
# Reset variables
no_adios2
()
{
unset
HAVE_ADIOS2 ADIOS2_INC_DIR ADIOS2_LIB_DIR
return
0
}
# Report
echo_adios2
()
{
echo
"adios2=
${
HAVE_ADIOS2
:-
false
}
"
echo
"root=
$ADIOS2_ARCH_PATH
"
echo
"include=
$ADIOS2_INC_DIR
"
echo
"library=
$ADIOS2_LIB_DIR
"
}
# On success, return 0 and export variables
# -> HAVE_ADIOS2, ADIOS2_INC_DIR, ADIOS2_LIB_DIR
have_adios2
()
{
local
header library static label settings warn
# warn="==> skip adios2"
# Basic setup/checks
settings
=
$(
$WM_PROJECT_DIR
/bin/foamEtcFile config.sh/ADIOS2
)
||
{
[
-n
"
$warn
"
]
&&
echo
"
$warn
(no config.sh/ADIOS2 settings)"
return
1
}
.
$settings
if
isNone
"
$ADIOS2_ARCH_PATH
"
then
[
-n
"
$warn
"
]
&&
echo
"
$warn
(not available)"
return
1
fi
# Header/library names
header
=
"adios2.h"
library
=
"libadios2
$extLibso
"
if
hasAbsdir
"
$ADIOS2_ARCH_PATH
"
then
header
=
$(
findFirstFile
$ADIOS2_ARCH_PATH
/include/
$header
)
# FOAM_EXT_LIBBIN is allowed to be unset
library
=
$(
findFirstFile
\
$FOAM_EXT_LIBBIN
/
$library
\
$ADIOS2_ARCH_PATH
/lib/
$library
\
$ADIOS2_ARCH_PATH
/lib
$WM_COMPILER_LIB_ARCH
/
$library
\
)
elif
isSystem
"
$ADIOS2_ARCH_PATH
"
then
header
=
$(
findFirstFile /usr/local/include/
$header
/usr/include/
$header
)
case
"
$header
"
in
/usr/local/
*
)
library
=
$(
findFirstFile
\
/usr/local/lib/
$library
\
/usr/local/lib
$WM_COMPILER_LIB_ARCH
/
$library
\
)
;;
*
)
library
=
$(
findFirstFile
\
/usr/lib/
$library
\
/usr/lib
$WM_COMPILER_LIB_ARCH
/
$library
\
)
;;
esac
else
unset
header library
fi
# Header found?
[
-n
"
$header
"
]
||
{
[
-n
"
$warn
"
]
&&
echo
"
$warn
(no header)"
return
2
}
# Library found?
[
-n
"
$library
"
]
||
{
[
-n
"
$warn
"
]
&&
echo
"
$warn
(missing library)"
return
2
}
header
=
"
${
header
%/*
}
"
# Strip one-level (include/adios2/...)
export
HAVE_ADIOS2
=
true
export
ADIOS2_ARCH_PATH
export
ADIOS2_INC_DIR
=
"
${
header
%/*
}
"
# Basename
export
ADIOS2_LIB_DIR
=
"
${
library
%/*
}
"
# Basename
}
# Force reset of old variables
no_adios2
# Testing
if
[
"
$1
"
=
"-test"
]
then
have_adios2
echo_adios2
fi
#------------------------------------------------------------------------------
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment