diff --git a/.gitignore b/.gitignore index c4fbdc70d..c86041d16 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ HYPRE_config.h autom4te.cache src/TAGS hypre/ +cmbuild/ ############### # Documentation diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 37385a090..4efe2a6fe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,6 +44,7 @@ if (EXISTS ${HYPRE_SOURCE_DIR}/../.git) if (${develop_string} MATCHES ".*") set(HYPRE_DEVELOP_STRING ${develop_string}) set(HYPRE_DEVELOP_NUMBER ${develop_number}) + set(HYPRE_BRANCH_NAME ${develop_branch}) if (develop_branch MATCHES "master") set(HYPRE_DEVELOP_BRANCH ${develop_branch}) else () diff --git a/src/config/HYPRE_config.h.in b/src/config/HYPRE_config.h.in index 02b2b52ce..35db9af6a 100644 --- a/src/config/HYPRE_config.h.in +++ b/src/config/HYPRE_config.h.in @@ -56,6 +56,9 @@ /* Define to 1 if using long long int for HYPRE_Int and HYPRE_BigInt */ #undef HYPRE_BIGINT +/* Feature branch string */ +#undef HYPRE_BRANCH_NAME + /* Define to 1 if using complex values */ #undef HYPRE_COMPLEX diff --git a/src/config/configure.in b/src/config/configure.in index 671a6a959..1750e43b0 100644 --- a/src/config/configure.in +++ b/src/config/configure.in @@ -115,6 +115,7 @@ AS_IF([test -d "$HYPRE_SRCDIR/../.git"], [ AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_STRING, ["$develop_string"], [Develop branch string]) AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_NUMBER, [$develop_number], [Develop branch commit number]) + AC_DEFINE_UNQUOTED(HYPRE_BRANCH_NAME, ["$develop_branch"], [Feature branch string]) AS_IF([test "x$develop_branch" = "xmaster"], [AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_BRANCH, ["$develop_branch"], [Main development branch?])], [AC_MSG_NOTICE([NOTE: On branch $develop_branch, not the main development branch])] diff --git a/src/configure b/src/configure index 05b366f42..4b4e0d543 100755 --- a/src/configure +++ b/src/configure @@ -2738,6 +2738,11 @@ cat >>confdefs.h <<_ACEOF #define HYPRE_DEVELOP_NUMBER $develop_number _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HYPRE_BRANCH_NAME "$develop_branch" +_ACEOF + if test "x$develop_branch" = "xmaster"; then : cat >>confdefs.h <<_ACEOF diff --git a/src/test/TEST_ij/versioncheck.sh b/src/test/TEST_ij/versioncheck.sh index 3634d78d1..cacf34f73 100755 --- a/src/test/TEST_ij/versioncheck.sh +++ b/src/test/TEST_ij/versioncheck.sh @@ -19,10 +19,10 @@ if [ -d ../../../.git ]; then DEVBRANCH=`git rev-parse --abbrev-ref HEAD` if [ -n "$DEVSTRING" ]; then if [ "$DEVBRANCH" != "master" ]; then - echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \ + echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (branch $DEVBRANCH; not the develop branch)" \ > ${TNAME}.testdatacheck else - echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \ + echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (branch $DEVBRANCH; the develop branch)" \ > ${TNAME}.testdatacheck fi fi diff --git a/src/test/TEST_sstruct/versioncheck.sh b/src/test/TEST_sstruct/versioncheck.sh index 3634d78d1..cacf34f73 100755 --- a/src/test/TEST_sstruct/versioncheck.sh +++ b/src/test/TEST_sstruct/versioncheck.sh @@ -19,10 +19,10 @@ if [ -d ../../../.git ]; then DEVBRANCH=`git rev-parse --abbrev-ref HEAD` if [ -n "$DEVSTRING" ]; then if [ "$DEVBRANCH" != "master" ]; then - echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \ + echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (branch $DEVBRANCH; not the develop branch)" \ > ${TNAME}.testdatacheck else - echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \ + echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (branch $DEVBRANCH; the develop branch)" \ > ${TNAME}.testdatacheck fi fi diff --git a/src/test/TEST_struct/versioncheck.sh b/src/test/TEST_struct/versioncheck.sh index 3634d78d1..cacf34f73 100755 --- a/src/test/TEST_struct/versioncheck.sh +++ b/src/test/TEST_struct/versioncheck.sh @@ -19,10 +19,10 @@ if [ -d ../../../.git ]; then DEVBRANCH=`git rev-parse --abbrev-ref HEAD` if [ -n "$DEVSTRING" ]; then if [ "$DEVBRANCH" != "master" ]; then - echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \ + echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (branch $DEVBRANCH; not the develop branch)" \ > ${TNAME}.testdatacheck else - echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \ + echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (branch $DEVBRANCH; the develop branch)" \ > ${TNAME}.testdatacheck fi fi diff --git a/src/test/ij.c b/src/test/ij.c index e20726589..17d3156b2 100644 --- a/src/test/ij.c +++ b/src/test/ij.c @@ -2391,15 +2391,19 @@ main( hypre_int argc, if (myid == 0) { -#ifdef HYPRE_DEVELOP_STRING -#ifdef HYPRE_DEVELOP_BRANCH - hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (main development branch %s)\n\n", +#if defined(HYPRE_DEVELOP_STRING) && defined(HYPRE_DEVELOP_BRANCH) + hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (branch %s; the develop branch)\n\n", HYPRE_DEVELOP_STRING, HYPRE_DEVELOP_BRANCH); -#else - hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (not main development branch)\n\n", - HYPRE_DEVELOP_STRING); -#endif + +#elif defined(HYPRE_DEVELOP_STRING) && !defined(HYPRE_DEVELOP_BRANCH) + hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (branch %s; not the develop branch)\n\n", + HYPRE_DEVELOP_STRING, HYPRE_BRANCH_NAME); + +#elif defined(HYPRE_RELEASE_VERSION) + hypre_printf("\nUsing HYPRE_RELEASE_VERSION: %s\n\n", + HYPRE_RELEASE_VERSION); #endif + hypre_printf("Running with these driver parameters:\n"); hypre_printf(" solver ID = %d\n\n", solver_id); } diff --git a/src/test/sstruct.c b/src/test/sstruct.c index 08c681222..513ba22d8 100644 --- a/src/test/sstruct.c +++ b/src/test/sstruct.c @@ -2917,14 +2917,17 @@ main( hypre_int argc, if (myid == 0) { -#ifdef HYPRE_DEVELOP_STRING -#ifdef HYPRE_DEVELOP_BRANCH - hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (main development branch %s)\n\n", +#if defined(HYPRE_DEVELOP_STRING) && defined(HYPRE_DEVELOP_BRANCH) + hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (branch %s; the develop branch)\n\n", HYPRE_DEVELOP_STRING, HYPRE_DEVELOP_BRANCH); -#else - hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (not main development branch)\n\n", - HYPRE_DEVELOP_STRING); -#endif + +#elif defined(HYPRE_DEVELOP_STRING) && !defined(HYPRE_DEVELOP_BRANCH) + hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (branch %s; not the develop branch)\n\n", + HYPRE_DEVELOP_STRING, HYPRE_BRANCH_NAME); + +#elif defined(HYPRE_RELEASE_VERSION) + hypre_printf("\nUsing HYPRE_RELEASE_VERSION: %s\n\n", + HYPRE_RELEASE_VERSION); #endif } diff --git a/src/test/struct.c b/src/test/struct.c index 5e78452d3..296254682 100644 --- a/src/test/struct.c +++ b/src/test/struct.c @@ -736,15 +736,19 @@ main( hypre_int argc, if (myid == 0 && sum == 0) { -#ifdef HYPRE_DEVELOP_STRING -#ifdef HYPRE_DEVELOP_BRANCH - hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (main development branch %s)\n\n", +#if defined(HYPRE_DEVELOP_STRING) && defined(HYPRE_DEVELOP_BRANCH) + hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (branch %s; the develop branch)\n\n", HYPRE_DEVELOP_STRING, HYPRE_DEVELOP_BRANCH); -#else - hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (not main development branch)\n\n", - HYPRE_DEVELOP_STRING); -#endif + +#elif defined(HYPRE_DEVELOP_STRING) && !defined(HYPRE_DEVELOP_BRANCH) + hypre_printf("\nUsing HYPRE_DEVELOP_STRING: %s (branch %s; not the develop branch)\n\n", + HYPRE_DEVELOP_STRING, HYPRE_BRANCH_NAME); + +#elif defined(HYPRE_RELEASE_VERSION) + hypre_printf("\nUsing HYPRE_RELEASE_VERSION: %s\n\n", + HYPRE_RELEASE_VERSION); #endif + hypre_printf("Running with these driver parameters:\n"); hypre_printf(" (nx, ny, nz) = (%d, %d, %d)\n", nx, ny, nz); hypre_printf(" (istart[0],istart[1],istart[2]) = (%d, %d, %d)\n", \