diff --git a/etc/config.csh/ADIOS b/etc/config.csh/adios1 similarity index 61% rename from etc/config.csh/ADIOS rename to etc/config.csh/adios1 index bc7a7759e7..108a8ee6f6 100644 --- a/etc/config.csh/ADIOS +++ b/etc/config.csh/adios1 @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -10,18 +10,18 @@ # . # # File -# etc/config.csh/ADIOS +# etc/config.csh/adios1 # - sourced by OpenFOAM-*/etc/cshrc # # Description # Setup for ADIOS include/libraries (usually ThirdParty installation). # -# To disable its use: adios_version=adios-none -# For system-wide installations: adios_version=adios-system +# To disable its use: adios1_version=adios-none +# For system-wide installations: adios1_version=adios-system # # For central installations not located under ThirdParty: # 1. use adios-system -# 2. and provide full path for ADIOS_ARCH_PATH +# 2. and provide full path for ADIOS1_ARCH_PATH # # Note # Changes made here MUST be made in the equivalent config.sh version too, @@ -33,25 +33,21 @@ #------------------------------------------------------------------------------ # USER EDITABLE PART: Changes made here may be lost with the next upgrade -set adios_version=ADIOS-1.13.0 -setenv ADIOS_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios_version +set adios1_version=ADIOS-1.13.1 +setenv ADIOS1_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios1_version # END OF (NORMAL) USER EDITABLE PART #------------------------------------------------------------------------------ if ($?FOAM_VERBOSE && $?prompt) then - echo "Using adios ($adios_version) -> $ADIOS_ARCH_PATH" + echo "Using adios ($adios1_version) -> $ADIOS1_ARCH_PATH" endif -# If ADIOS_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="${ADIOS_ARCH_PATH:t}" -if ( "$ending" != "adios-none" && "$ending" != "adios-system" ) then - # PATH was already cleaned by etc/cshrc caller - _foamAddPath $ADIOS_ARCH_PATH/bin +# - only add if the directory really exists +_foamAddLibAuto $ADIOS1_ARCH_PATH +if ($status == 0) then + _foamAddPath $ADIOS1_ARCH_PATH/bin endif -unset adios_version ending +unset adios1_version #------------------------------------------------------------------------------ diff --git a/etc/config.csh/ADIOS2 b/etc/config.csh/adios2 similarity index 95% rename from etc/config.csh/ADIOS2 rename to etc/config.csh/adios2 index 917999f51d..81f2196204 100644 --- a/etc/config.csh/ADIOS2 +++ b/etc/config.csh/adios2 @@ -10,7 +10,7 @@ # . # # File -# etc/config.csh/ADIOS2 +# etc/config.csh/adios2 # - sourced by OpenFOAM-*/etc/cshrc # # Description @@ -19,7 +19,7 @@ #------------------------------------------------------------------------------ # USER EDITABLE PART: Changes made here may be lost with the next upgrade -set adios2_version=ADIOS2-git +set adios2_version=ADIOS2-2.4.0 setenv ADIOS2_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios2_version # END OF (NORMAL) USER EDITABLE PART diff --git a/etc/config.csh/setup b/etc/config.csh/setup index 8d2833c8c9..e983920527 100644 --- a/etc/config.csh/setup +++ b/etc/config.csh/setup @@ -139,8 +139,7 @@ _foamEtc -config settings _foamEtc -config mpi _foamEtc -config paraview -- "$FOAM_SETTINGS" # Pass through for evaluation _foamEtc -config vtk -## _foamEtc -config ADIOS -## _foamEtc -config ADIOS2 +_foamEtc -config adios2 _foamEtc -config CGAL _foamEtc -config FFTW diff --git a/etc/config.sh/ADIOS b/etc/config.sh/adios1 similarity index 58% rename from etc/config.sh/ADIOS rename to etc/config.sh/adios1 index ed5dda9a18..f9393fe03b 100644 --- a/etc/config.sh/ADIOS +++ b/etc/config.sh/adios1 @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -10,18 +10,18 @@ # . # # File -# etc/config.sh/ADIOS +# etc/config.sh/adios1 # - sourced by OpenFOAM-*/etc/bashrc # # Description # Setup for ADIOS include/libraries (usually ThirdParty installation). # -# To disable its use: adios_version=adios-none -# For system-wide installations: adios_version=adios-system +# To disable its use: adios1_version=adios-none +# For system-wide installations: adios1_version=adios-system # # For central installations not located under ThirdParty: # 1. use adios-system -# 2. and provide full path for ADIOS_ARCH_PATH +# 2. and provide full path for ADIOS1_ARCH_PATH # # Note # Since ADIOS is a static library build, the libraries are renamed @@ -32,31 +32,39 @@ #------------------------------------------------------------------------------ # USER EDITABLE PART: Changes made here may be lost with the next upgrade -adios_version=ADIOS-1.13.0 -export ADIOS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios_version +adios1_version=ADIOS-1.13.1 +export ADIOS1_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios1_version # END OF (NORMAL) USER EDITABLE PART #------------------------------------------------------------------------------ if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ] then - echo "Using adios ($adios_version) -> $ADIOS_ARCH_PATH" 1>&2 + echo "Using adios ($adios1_version) -> $ADIOS1_ARCH_PATH" 1>&2 fi -if command -v _foamAddPath >/dev/null 2>&1 # Normal sourcing +if command -v _foamAddLibAuto > /dev/null 2>&1 then - # If ADIOS_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="${ADIOS_ARCH_PATH##*-}" - if [ "$ending" != none ] && [ "$ending" != system ] + if _foamAddLibAuto $ADIOS1_ARCH_PATH then - # PATH was already cleaned by etc/bashrc caller - _foamAddPath $ADIOS_ARCH_PATH/bin + _foamAddPath $ADIOS1_ARCH_PATH/bin fi - unset adios_version ending + unset adios1_version +elif [ "$1" = "-force" ] +then + # Forced command-line sourcing + + if output="$($WM_PROJECT_DIR/bin/tools/lib-dir -sh $ADIOS1_ARCH_PATH 2>/dev/null)" + then + eval "$output" + PATH="$ADIOS1_ARCH_PATH/bin:$PATH" + fi + + unset adios1_version output fi #------------------------------------------------------------------------------ diff --git a/etc/config.sh/ADIOS2 b/etc/config.sh/adios2 similarity index 93% rename from etc/config.sh/ADIOS2 rename to etc/config.sh/adios2 index 3719333378..515d586498 100644 --- a/etc/config.sh/ADIOS2 +++ b/etc/config.sh/adios2 @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -10,7 +10,7 @@ # . # # File -# etc/config.sh/ADIOS2 +# etc/config.sh/adios2 # - sourced by OpenFOAM-*/etc/bashrc # # Description @@ -20,7 +20,7 @@ #------------------------------------------------------------------------------ # USER EDITABLE PART: Changes made here may be lost with the next upgrade -adios2_version=ADIOS2-git +adios2_version=ADIOS2-2.4.0 export ADIOS2_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios2_version # END OF (NORMAL) USER EDITABLE PART diff --git a/etc/config.sh/setup b/etc/config.sh/setup index ed692ec259..ed691d0b9f 100644 --- a/etc/config.sh/setup +++ b/etc/config.sh/setup @@ -120,8 +120,7 @@ _foamEtc -config mpi _foamEtc -config paraview -- "$@" # Pass through for evaluation _foamEtc -config vtk _foamEtc -config gperftools -## _foamEtc -config ADIOS -## _foamEtc -config ADIOS2 +_foamEtc -config adios2 _foamEtc -config CGAL _foamEtc -config scotch _foamEtc -config FFTW diff --git a/wmake/rules/General/ADIOS b/wmake/rules/General/ADIOS1 similarity index 71% rename from wmake/rules/General/ADIOS rename to wmake/rules/General/ADIOS1 index c2cb3558ae..b45241d892 100644 --- a/wmake/rules/General/ADIOS +++ b/wmake/rules/General/ADIOS1 @@ -5,7 +5,7 @@ sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) sinclude $(DEFAULT_RULES)/mplib$(WM_MPLIB) # Obtain compile/link flags via adios_config -ADIOS_INC := $(shell $(ADIOS_ARCH_PATH)/bin/adios_config -c) -ADIOS_LIBS := $(shell $(ADIOS_ARCH_PATH)/bin/adios_config -l) +ADIOS_INC := $(shell $(ADIOS1_ARCH_PATH)/bin/adios_config -c) +ADIOS_LIBS := $(shell $(ADIOS1_ARCH_PATH)/bin/adios_config -l) #------------------------------------------------------------------------------ diff --git a/wmake/scripts/have_adios2 b/wmake/scripts/have_adios2 index 55eb00f510..7a09259acd 100644 --- a/wmake/scripts/have_adios2 +++ b/wmake/scripts/have_adios2 @@ -58,11 +58,11 @@ have_adios2() # warn="==> skip adios2" # Setup - if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ADIOS2) + if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/adios2) then . "$settings" else - [ -n "$warn" ] && echo "$warn (no config.sh/ADIOS2 settings)" + [ -n "$warn" ] && echo "$warn (no config.sh/adios2 settings)" return 2 fi