diff --git a/Conf/Analyse_args.sh b/Conf/Analyse_args.sh deleted file mode 100644 index 1b230cb..0000000 --- a/Conf/Analyse_args.sh +++ /dev/null @@ -1,49 +0,0 @@ - if (( $# == 0 )); then - echo "*** Usage: $0 dell|cray|wcoss|theia|hera|gaea|jet|intel_general|gnu_general libver= [debug] [compileonly] [prefix=]" >&2 - exit 1 - fi - sys=${1,,} - [[ $sys == dell || $sys == cray || $sys == wcoss || \ - $sys == theia || $sys == hera || $sys == gaea || $sys == jet || \ - $sys == intel_general || $sys == gnu_general ]] || { - echo "*** Usage: $0 dell|cray|wcoss|theia|hera|gaea|jet|intel_general|gnu_general libver= [debug] [compileonly] [prefix=]" >&2 - exit 1 - } - - debg=false - inst=true - rinst=false - local=true - instloc="---" - (( nrinst = 0 )) - (( nconfm = 0 )) - for n in 2 3 4; do - if (( $# > (n-1) )); then - [[ ${!n,,} == debug ]] && debg=true - [[ ${!n,,} == compileonly ]] && inst=false - [[ ${!n,,} == libver=* ]] && libver=${!n:$(expr length "libver=")} - [[ ${!n,,} == prefix=* ]] && { - local=false - instloc=${!n:$(expr length "prefix=")} - [[ $instloc == /* ]] || { [[ -n $CDIR ]] && instloc=$CDIR/$instloc; } - } - [[ ${!n,,} == install ]] && (( nrinst = n )) - [[ ${!n,,} == confirm:yes ]] && (( nconfm = n-1 )) - fi - done - (( nrinst > 0 && nconfm == 0 )) && { - echo "*** Info: ignore unsupported option \"install\" ***" - (( nrinst = 0 )) - } - (( nrinst == 0 && nconfm > 0 )) && { - echo "*** Info: ignore \"confirm:YES\"; must be present along with \"install\" ***" - (( nrinst = 0 )) - } - (( nconfm > 0 && ! nrinst == nconfm )) && { - echo "*** Info: ignore \"confirm:YES\"; must be present immediately after \"install\" ***" - (( nrinst = 0 )) - } - (( nconfm > 0 && nrinst == nconfm )) && rinst=true - - $rinst && { local=false; inst=true; } - diff --git a/Conf/Collect_info.sh b/Conf/Collect_info.sh deleted file mode 100644 index 4b2d239..0000000 --- a/Conf/Collect_info.sh +++ /dev/null @@ -1,107 +0,0 @@ - collect_info() { - local setx_status=${-//[^x]/} - [[ -n $setx_status ]] && set +x - - local lname=$1 - local precsn=$2 - local msgline=$3 - local msginfo=$4 - - local info - local oneline - - USEMPI=false - grep -i mpi <<< "$COMP" &> /dev/null && USEMPI=true - -# libver=${lname~~}_VER - [[ $precsn == "-" ]] && { - cflg=CFLAGS - fflg=FFLAGS - libfile=${lname}Lib - NCLIBVER="${lname,,} (${lname~~}) ${!libver}" - } || { - cflg=CFLAGS${precsn%/*} - [[ -z "${!cflg}" ]] && cflg=CFLAGS - fflg=FFLAGS${precsn%/*} - libfile=${lname}Lib${precsn#*/} - NCLIBVER="${lname,,} (${lname~~} _${precsn%/*}) ${!libver}" - } - mpicflg=MPI"$cflg" - mpifflg=MPI"$fflg" - - $USEMPI && mpiver=$(mpirun --version | grep Version | sed 's/://' | \ - tr -s " " | sed 's/^.* Version //; s/ Build.*$//') - - COMPILED="compiled by" - $CC --version | grep " (ICC) " &> /dev/null && - $FC --version | grep " (IFORT) " &> /dev/null && { - ccstr=$($CC --version | grep " (ICC) ") - cfstr=$($FC --version | grep " (IFORT) ") - COMPILER="${ccstr/(ICC)*/(ICC)}, $cfstr" - } || { - $CC --version | grep " (.*GCC.*) " &> /dev/null && - $FC --version | grep " (.*GCC.*) " &> /dev/null && { - ccstr=$($CC --version | grep " (.*GCC.*) ") - cfstr=$($FC --version | grep " (.*GCC.*) ") - COMPILER="${ccstr/ (*GCC*)*/}, $cfstr" - } || { - ccstr=$($CC --version | grep -E 'ICC|GCC') - cfstr=$($FC --version | grep -E 'IFORT|GCC') - COMPILER="$ccstr, $cfstr" - } - } - [[ -z "$USECC" || ${USECC,,} == no ]] && { COMPILER="$cfstr"; } - [[ -z "$USEFC" || ${USEFC,,} == no ]] && { COMPILER="$ccstr"; } - - $USEMPI && { COMPILER=" $COMPILER"; } - (( ${#COMPILER} > 50 )) && COMPILER=${COMPILER% (*)*} - - DATETIME="$(date +'on %x at %X')" - - oneline="nclibver = '$NCLIBVER'," - oneline="$oneline"$'\n'"compiled = ' $COMPILED'," - oneline="$oneline"$'\n'"compiler = ' $COMPILER'," - oneline="$oneline"$'\n'"datetime = ' $DATETIME'" - - info="*** ${lname} information ***" - info=$info$'\n'"LIBRARY NAME: ${lname~~}" - info=$info$'\n'"LIBRARY VERSION: ${!libver}" - [[ $precsn != "-" ]] && { - info=$info$'\n'"LIBRARY PRECISION: (_${precsn%/*})" - } - info=$info$'\n'"LIBRARY FILE NAME: ${!libfile}" - info=$info$'\n'"*** building information ***" - info=$info$'\n'"BUILDING TIME: $(date)" - info=$info$'\n'"SYSTEM/PLATFORM: $(uname -srm)" - [[ -n "$USECC" && ${USECC,,} != no ]] && { - $USEMPI && { - info=$info$'\n'"C COMPILER NAME: $MPICC" - info=$info$'\n'"C COMPILER VERSION: $($MPICC --version | head -1)" - info=$info$'\n'"MPICFLAGS: "${!mpicflg} - } || { - info=$info$'\n'"C COMPILER NAME: $CC" - info=$info$'\n'"C COMPILER VERSION: $($CC --version | head -1)" - info=$info$'\n'"CFLAGS: "${!cflg} - } - } - [[ -n "$USEFC" && ${USEFC,,} != no ]] && { - $USEMPI && { - info=$info$'\n'"FORTRAN COMPILER NAME: $MPIFC" - info=$info$'\n'"FORTRAN COMPILER VERSION: $($MPIFC --version | head -1)" - info=$info$'\n'"MPIFFLAGS: "${!mpifflg} - } || { - info=$info$'\n'"FORTRAN COMPILER NAME: $FC" - info=$info$'\n'"FORTRAN COMPILER VERSION: $($FC --version | head -1)" - info=$info$'\n'"FFLAGS: "${!fflg} - } - } - - $USEMPI && { info=$info$'\n'"MPI VERSION: $mpiver"; } - - [[ -n "$DEPS" ]] && { info=$info$'\n'"DEPENDENCES: $DEPS"; } - - eval $msgline="\"$oneline\"" - eval $msginfo="\"$info\"" - - [[ -n $setx_status ]] && set -x - } diff --git a/Conf/G2tmpl_gnu_General.sh b/Conf/G2tmpl_gnu_General.sh deleted file mode 100644 index 77cb740..0000000 --- a/Conf/G2tmpl_gnu_General.sh +++ /dev/null @@ -1,38 +0,0 @@ -# *** manually set environments (for gnu compiler) of g2tmpl *** - - : ${USERMODE:=false} # user mode (USERMODE) is closed by default - # set env var USERMODE to "true" to active it - ${USERMODE} && { - echo "Environment set by user" -# On theia/cray, user can load environment - module load gcc/6.2.0 - } - - export CC=gcc - export FC=gfortran - export CPP=cpp - export OMPCC="$CC -fopenmp" - export OMPFC="$FC -fopenmp" - export MPICC=mpigcc - export MPIFC=mpigfortran - - export DEBUG="-g -fbacktrace -O0" - export CFLAGS="-g -O3 -fPIC" - export FFLAGS="-g -fbacktrace -O3 -fPIC" - export FREEFORM="-ffree-form" - export FPPCPP="-cpp" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS="-g -O3 -fPIC" - export MPIFFLAGS="-g -fbacktrace -O3 -fPIC" - export MODPATH="-J" - export I4R4="" - export I4R8="-fdefault-real-8" - export I8R8="-fdefault-integer-8 -fdefault-real-8" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="-fno-range-check" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/G2tmpl_intel_Cray.sh b/Conf/G2tmpl_intel_Cray.sh deleted file mode 100644 index 13120dd..0000000 --- a/Conf/G2tmpl_intel_Cray.sh +++ /dev/null @@ -1,30 +0,0 @@ -# *** for WCOSS Cray (intel) *** - - export CC=cc - export FC=ftn - export CPP=cpp - export OMPCC="$CC -qopenmp" - export OMPFC="$FC -qopenmp" - export MPICC=$CC - export MPIFC=$FC - - export DEBUG="-g -traceback -O0" - export CFLAGS="-g -traceback -O3 -axCORE-AVX2 -fPIC" - export FFLAGS="-g -traceback -O3 -axCORE-AVX2 -fPIC" - export FPPCPP="-cpp" - export FREEFORM="-free" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS=$CFLAGS - export MPIFFLAGS=$FFLAGS - export MODPATH="-module " - export I4R4="-integer-size 32 -real-size 32" - export I4R8="-integer-size 32 -real-size 64" - export I8R8="-integer-size 64 -real-size 64" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/G2tmpl_intel_Dell.sh b/Conf/G2tmpl_intel_Dell.sh deleted file mode 100644 index 43fa760..0000000 --- a/Conf/G2tmpl_intel_Dell.sh +++ /dev/null @@ -1,40 +0,0 @@ -# *** for WCOSS Dell (intel) *** - $rinst && { - grep -E "(^|:|/)jasper/" <<< "$LOADEDMODULES" &> /dev/null \ - || module load jasper/1.900.1 - grep -E "(^|:|/)png/" <<< "$LOADEDMODULES" &> /dev/null \ - || module load libpng/1.2.44 - grep -E "(^|:|/)z/" <<< "$LOADEDMODULES" &> /dev/null \ - || module load zlib/1.2.11 - grep -E "(^|:|/)g2tmpl/" <<< "$LOADEDMODULES" &> /dev/null \ - || module load g2tmpl/1.5.1 - } - - export CC=icc - export FC=ifort - export CPP=cpp - export OMPCC="$CC -qopenmp" - export OMPFC="$FC -qopenmp" - export MPICC=mpiicc - export MPIFC=mpiifort - - export DEBUG="-g -traceback -O0" - export CFLAGS="-g -traceback -O3 -fPIC" - export FFLAGS="-g -traceback -O3 -fPIC" - export FPPCPP="-cpp" - export FREEFORM="-free" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS="-g -traceback -O3 -fPIC" - export MPIFFLAGS="-g -traceback -O3 -fPIC" - export MODPATH="-module " - export I4R4="-integer-size 32 -real-size 32" - export I4R8="-integer-size 32 -real-size 64" - export I8R8="-integer-size 64 -real-size 64" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/G2tmpl_intel_Gaea.sh b/Conf/G2tmpl_intel_Gaea.sh deleted file mode 100644 index eadb3c9..0000000 --- a/Conf/G2tmpl_intel_Gaea.sh +++ /dev/null @@ -1,30 +0,0 @@ -# *** for Theia/Gaea/Jet (intel) *** - - export CC=icc - export FC=ifort - export CPP=cpp - export OMPCC="$CC -qopenmp" - export OMPFC="$FC -qopenmp" - export MPICC=mpiicc - export MPIFC=mpiifort - - export DEBUG="-g -traceback -O0" - export CFLAGS="-g -O3 -traceback -xHOST -fPIC" - export FFLAGS="-g -O3 -traceback -xHOST -fPIC" - export FPPCPP="-cpp" - export FREEFORM="-free" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS="-g -O3 -traceback -xHOST -fPIC" - export MPIFFLAGS="-g -O3 -traceback -xHOST -fPIC" - export MODPATH="-module " - export I4R4="-integer-size 32 -real-size 32" - export I4R8="-integer-size 32 -real-size 64" - export I8R8="-integer-size 64 -real-size 64" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/G2tmpl_intel_General.sh b/Conf/G2tmpl_intel_General.sh deleted file mode 100644 index 3754418..0000000 --- a/Conf/G2tmpl_intel_General.sh +++ /dev/null @@ -1,38 +0,0 @@ -# *** manually set environments (for intel compiler) of g2tmpl *** - - : ${USERMODE:=false} # user mode (USERMODE) is closed by default - # set env var USERMODE to "true" to active it - ${USERMODE} && { - echo "Environment set by user" -# On theia/cray, user can load environment - module load intel/18.0.1.163 - } - - export CC=icc - export FC=ifort - export CPP=cpp - export OMPCC="$CC -qopenmp" - export OMPFC="$FC -qopenmp" - export MPICC=mpiicc - export MPIFC=mpiifort - - export DEBUG="-g -traceback -O0" - export CFLAGS="-g -traceback -O3 -fPIC" - export FFLAGS="-g -traceback -O3 -fPIC" - export FPPCPP="-cpp" - export FREEFORM="-free" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS="-g -traceback -O3 -fPIC" - export MPIFFLAGS="-g -traceback -O3 -fPIC" - export MODPATH="-module " - export I4R4="-integer-size 32 -real-size 32" - export I4R8="-integer-size 32 -real-size 64" - export I8R8="-integer-size 64 -real-size 64" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/G2tmpl_intel_Hera.sh b/Conf/G2tmpl_intel_Hera.sh deleted file mode 100644 index 345deba..0000000 --- a/Conf/G2tmpl_intel_Hera.sh +++ /dev/null @@ -1,40 +0,0 @@ -# *** for Hera (intel) *** - $rinst && { - grep -E "(^|:|/)jasper/" <<< "$LOADEDMODULES" &> /dev/null \ - || module load jasper/1.900.1 - grep -E "(^|:|/)png/" <<< "$LOADEDMODULES" &> /dev/null \ - || module load png/1.2.44 - grep -E "(^|:|/)z/" <<< "$LOADEDMODULES" &> /dev/null \ - || module load z/1.2.11 - grep -E "(^|:|/)g2tmpl/" <<< "$LOADEDMODULES" &> /dev/null \ - || module load g2tmpl/1.5.1 - } - - export CC=icc - export FC=ifort - export CPP=cpp - export OMPCC="$CC -qopenmp" - export OMPFC="$FC -qopenmp" - export MPICC=mpiicc - export MPIFC=mpiifort - - export DEBUG="-g -traceback -O0" - export CFLAGS="-g -O3 -ftz -traceback -xHOST -axcore-avx512 -fPIC" - export FFLAGS="-g -O3 -ftz -traceback -fpe0 -xHOST -axcore-avx512 -fPIC" - export FPPCPP="-cpp" - export FREEFORM="-free" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS="-g -O3 -ftz -traceback -xHOST -axcore-avx512 -fPIC" - export MPIFFLAGS="-g -O3 -ftz -traceback -fpe0 -xHOST -axcore-avx512 -fPIC" - export MODPATH="-module " - export I4R4="-integer-size 32 -real-size 32" - export I4R8="-integer-size 32 -real-size 64" - export I8R8="-integer-size 64 -real-size 64" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/G2tmpl_intel_Jet.sh b/Conf/G2tmpl_intel_Jet.sh deleted file mode 100644 index eadb3c9..0000000 --- a/Conf/G2tmpl_intel_Jet.sh +++ /dev/null @@ -1,30 +0,0 @@ -# *** for Theia/Gaea/Jet (intel) *** - - export CC=icc - export FC=ifort - export CPP=cpp - export OMPCC="$CC -qopenmp" - export OMPFC="$FC -qopenmp" - export MPICC=mpiicc - export MPIFC=mpiifort - - export DEBUG="-g -traceback -O0" - export CFLAGS="-g -O3 -traceback -xHOST -fPIC" - export FFLAGS="-g -O3 -traceback -xHOST -fPIC" - export FPPCPP="-cpp" - export FREEFORM="-free" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS="-g -O3 -traceback -xHOST -fPIC" - export MPIFFLAGS="-g -O3 -traceback -xHOST -fPIC" - export MODPATH="-module " - export I4R4="-integer-size 32 -real-size 32" - export I4R8="-integer-size 32 -real-size 64" - export I8R8="-integer-size 64 -real-size 64" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/G2tmpl_intel_Theia.sh b/Conf/G2tmpl_intel_Theia.sh deleted file mode 100644 index add2803..0000000 --- a/Conf/G2tmpl_intel_Theia.sh +++ /dev/null @@ -1,30 +0,0 @@ -# *** for Theia (intel) *** - - export CC=icc - export FC=ifort - export CPP=cpp - export OMPCC="$CC -qopenmp" - export OMPFC="$FC -qopenmp" - export MPICC=mpiicc - export MPIFC=mpiifort - - export DEBUG="-g -traceback -O0" - export CFLAGS="-g -O3 -ftz -traceback -xHOST -axcore-avx512 -fPIC" - export FFLAGS="-g -O3 -ftz -traceback -fpe0 -xHOST -axcore-avx512 -fPIC" - export FPPCPP="-cpp" - export FREEFORM="-free" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS="-g -O3 -ftz -traceback -xHOST -axcore-avx512 -fPIC" - export MPIFFLAGS="-g -O3 -ftz -traceback -fpe0 -xHOST -axcore-avx512 -fPIC" - export MODPATH="-module " - export I4R4="-integer-size 32 -real-size 32" - export I4R8="-integer-size 32 -real-size 64" - export I8R8="-integer-size 64 -real-size 64" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/G2tmpl_intel_Wcoss.sh b/Conf/G2tmpl_intel_Wcoss.sh deleted file mode 100644 index 9a62fa2..0000000 --- a/Conf/G2tmpl_intel_Wcoss.sh +++ /dev/null @@ -1,30 +0,0 @@ -# *** for WCOSS IBM phase1 (intel) *** - - export CC=icc - export FC=ifort - export CPP=cpp - export OMPCC="$CC -qopenmp" - export OMPFC="$FC -qopenmp" - export MPICC=mpiicc - export MPIFC=mpiifort - - export DEBUG="-g -traceback -O0" - export CFLAGS="-g -traceback -O3 -fPIC" - export FFLAGS="-g -traceback -O3 -fPIC" - export FPPCPP="-cpp" - export FREEFORM="-free" - export CPPFLAGS="-P -traditional-cpp" - export MPICFLAGS="-g -traceback -O3 -fPIC" - export MPIFFLAGS="-g -traceback -O3 -fPIC" - export MODPATH="-module " - export I4R4="-integer-size 32 -real-size 32" - export I4R8="-integer-size 32 -real-size 64" - export I8R8="-integer-size 64 -real-size 64" - - export CPPDEFS="" - export CFLAGSDEFS="-DUNDERSCORE -DLINUX" - export FFLAGSDEFS="" - - export USECC="YES" - export USEFC="YES" - export DEPS="" diff --git a/Conf/Gen_cfunction.sh b/Conf/Gen_cfunction.sh deleted file mode 100644 index 1428829..0000000 --- a/Conf/Gen_cfunction.sh +++ /dev/null @@ -1,91 +0,0 @@ - gen_cfunction() { - local setx_status=${-//[^x]/} - [[ -n $setx_status ]] && set +x - - logFILE=$1 - oneLINE=$2 - libINFO=$3 - LIB=$(echo "${!libINFO}" | \ - grep "LIBRARY FILE NAME: " | \ - sed -e 's/LIBRARY FILE NAME: //') - [[ $LIB == lib*.a ]] || { - echo "??? gen_cfunction: unknown library name ($LIB) ???" >&2 - exit -1 - } - libNAME=$(echo ${LIB:3} | \ - sed -e 's/^\(.*\)_v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+.*$/\1/') - cFunFILE=$(basename ${logFILE} .txt).c - oFunFILE=${cFunFILE/%.c/.o} - brfFunct=${libNAME}_brief_info - libFunct=${libNAME}_library_info - logFunct=${libNAME}_building_log - - cat << EOI > $cFunFILE -#include -#include -#include -#include - char *${brfFunct}(char *infoline); - int ${libFunct}(void); - int ${logFunct}(void); - static void tprintf(const char *str); - void ${brfFunct}_(char *oneline, size_t n) { - char infoline[256]; - ${brfFunct}(infoline); - strncpy(oneline, infoline, n); - return; - } - void ${libFunct}_(void) { - ${libFunct}(); - return; - } - void ${logFunct}_(void) { - ${logFunct}(); - return; - } - char *${brfFunct}(char *infoline) { - $(sed -e '1,$ s/^\(.*\) = '\''\(.*\)'\'',\?$/ const char \1[] = "\2";/g' <<< "${!oneLINE}") - infoline[0] = '\0'; - strcat(infoline, nclibver); - strcat(infoline, compiled); - strcat(infoline, compiler); - strcat(infoline, datetime); - return infoline; - } - int ${libFunct}(void) { -$(sed -e 's/^/ tprintf("/g; 1,$ s/$/");/g' <<< "${!libINFO}") - return 0; - } - int ${logFunct}(void) { - printf("... building log ...\n"); -$(sed -e 's/"/\\"/g; 1,$ s/%/%%/g; 1,$ s/^/ printf("/g; 1,$ s/$/\\n");/g' $logFILE) - return 0; - } - static void tprintf(const char *str) { - const char *boldon = "\e[1m"; - const char *boldoff = "\e[0m"; - char *str1 = strdup(str); - char *temp = strstr(str1, ": "); //Get the pointer to substr token - if (temp) { - temp += 2; - char *str2 = strdup(temp); - *temp = '\0'; - if (isatty(STDOUT_FILENO)) { - printf("%s%s%s%s\n", boldon, str1, boldoff, str2); - free(str2); - free(str1); - return; - } - free(str2); - } - free(str1); - printf("%s\n", str); - return; - } -EOI - - rm $logFILE - echo $cFunFILE - - [[ -n $setx_status ]] && set -x - } diff --git a/Conf/Reset_version.sh b/Conf/Reset_version.sh deleted file mode 100644 index 6d8bff5..0000000 --- a/Conf/Reset_version.sh +++ /dev/null @@ -1,18 +0,0 @@ - reset_version() { - local setx_status=${-//[^x]/} - [[ -n $setx_status ]] && set +x - (( $# == 2 )) && { - local var=$1 - local ver_name=${var^^}_VER - local old_ver=${!ver_name} - local new_ver=$2 - } || { - local var=$1 - local old_ver=$2 - local new_ver=$3 - } - for vline in "$(env | grep ${var^^})"; do - eval ${vline//${old_ver}/${new_ver}} - done - [[ -n $setx_status ]] && set -x - } diff --git a/README.md b/README.md index 3a7a481..6e8eda2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ make install ### Version -1.8.0 +1.9.0 + ### Authors diff --git a/VERSION b/VERSION index 27f9cd3..f8e233b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.0 +1.9.0 diff --git a/build_g2tmpl.sh b/build_g2tmpl.sh deleted file mode 100755 index 4ca8c7e..0000000 --- a/build_g2tmpl.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - - : ${THISDIR:=$(dirname $(readlink -f -n ${BASH_SOURCE[0]}))} - CDIR=$PWD; cd $THISDIR - - source ./Conf/Analyse_args.sh - source ./Conf/Collect_info.sh - source ./Conf/Gen_cfunction.sh - source ./Conf/Reset_version.sh - - if [[ ${sys} == "intel_general" ]]; then - sys6=${sys:6} - source ./Conf/G2tmpl_${sys:0:5}_${sys6^}.sh - rinst=false - elif [[ ${sys} == "gnu_general" ]]; then - sys4=${sys:4} - source ./Conf/G2tmpl_${sys:0:3}_${sys4^}.sh - rinst=false - else - source ./Conf/G2tmpl_intel_${sys^}.sh - fi - $CC --version &> /dev/null || { - echo "??? G2TMPL: compilers not set." >&2 - exit 1 - } - [[ -z ${G2TMPL_VER+x} || -z ${G2TMPL_LIB+x} ]] && { - [[ -z ${libver+x} || -z ${libver} ]] && { - echo "??? G2TMPL: \"libver\" not set." >&2 - exit - } - G2TMPL_INC=${libver} - G2TMPL_LIB=lib${libver}.a - G2TMPL_VER=v${libver##*_v} - } - -set -x - g2tmplLib=$(basename $G2TMPL_LIB) - g2tmplInc=$(basename $G2TMPL_INC) - -################# - cd src -################# - -#------------------------------------------------------------------- -# Start building libraries -# - echo - echo " ... build g2tmpl library ..." - echo - make clean LIB=$g2tmplLib MOD=$g2tmplInc - mkdir -p $g2tmplInc - FFLAGS="$FFLAGS ${MODPATH}$g2tmplInc" - collect_info g2tmpl - OneLine LibInfo - g2tmplInfo=g2tmpl_info_and_log.txt - $debg && make debug FFLAGS="$FFLAGS" LIB=$g2tmplLib &> $g2tmplInfo \ - || make build FFLAGS="$FFLAGS" LIB=$g2tmplLib &> $g2tmplInfo - make message MSGSRC="$(gen_cfunction $g2tmplInfo OneLine LibInfo)" LIB=$g2tmplLib - - $inst && { -# -# Install libraries and source files -# - $local && { - instloc=.. - LIB_DIR=$instloc/lib - INCP_DIR=$instloc/include - [ -d $LIB_DIR ] || { mkdir -p $LIB_DIR; } - [ -d $INCP_DIR ] || { mkdir -p $INCP_DIR; } - SRC_DIR= - } || { - $rinst && { - LIB_DIR=$(dirname $G2TMPL_LIB) - INCP_DIR=$(dirname $G2TMPL_INC) - [ -d $G2TMPL_INC ] && { rm -rf $G2TMPL_INC; } \ - || { mkdir -p $INCP_DIR; } - SRC_DIR=$G2TMPL_SRC - } || { - LIB_DIR=$instloc/lib - INCP_DIR=$instloc/include - [[ $instloc == .. ]] && SRC_DIR= - G2TMPL_INC=$INCP_DIR/$G2TMPL_INC - [ -d $G2TMPL_INC ] && { rm -rf $G2TMPL_INC; } \ - || { mkdir -p $INCP_DIR; } - SRC_DIR=$instloc/src/${libver} - } - [ -d $LIB_DIR ] || mkdir -p $LIB_DIR - [ -z $SRC_DIR ] || { [ -d $SRC_DIR ] || mkdir -p $SRC_DIR; } - } - - make clean LIB= - make install LIB=$g2tmplLib MOD=$g2tmplInc \ - LIB_DIR=$LIB_DIR INC_DIR=$INCP_DIR SRC_DIR=$SRC_DIR - } - diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 8d5613a..0000000 --- a/src/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -SHELL=/bin/sh -# sources, headers, objects, library and etc. -SRCS_C = process_4dot2.c -SRCS_F = grib2_all_tables_module.f \ - g2sec4_temp11.f g2sec4_temp1.f \ - g2sec4_temp12.f gdtsec3.f -OBJS = $(patsubst %.c, %.o, $(SRCS_C)) \ - $(patsubst %.f, %.o, $(SRCS_F)) - -all: build - -build: $(LIB) - -$(LIB): $(OBJS) - $(AR) $(ARFLAGS) $@ $^ - -debug: dbg_build - -dbg_build: override CFLAGS += $(DEBUG) -dbg_build: override FFLAGS += $(DEBUG) -dbg_build: $(LIB) - -%.o: %.c - $(CC) -c $(CFLAGS) $(CFLAGSDEFS) $< - -%.o: %.f - $(FC) -c $(FREEFORM) $(FFLAGS) $(FFLAGSDEFS) $< - -message: $(MSGSRC) - $(CC) -c $(MSGSRC) - $(AR) $(ARFLAGS) $(LIB) $(patsubst %.c, %.o, $(MSGSRC)) - $(RM) $(MSGSRC) $(patsubst %.c, %.o, $(MSGSRC)) - -install: - [[ -z "$(LIB)" || -z "$(LIB_DIR)" ]] || mv $(LIB) $(LIB_DIR) - [[ -z "$(MOD)" || -z "$(INC_DIR)" ]] || mv $(MOD) $(INC_DIR) - [[ -z "$(SRC_DIR)" ]] || cp ./* $(SRC_DIR) - -test: - @echo "*** unit test unavailable currently ***" - -clean: - $(RM) $(OBJS) $(LIB) - [[ -z "$(MOD)" ]] || $(RM) -r $(MOD) - -.SUFFIXES: .f .mod .c .o .a - -# Specify targets that do not generate filesystem objects -.PHONY: all build install debug dbg_build message test clean