diff --git a/configure.ac b/configure.ac index f51095bc..8ac7ddd3 100644 --- a/configure.ac +++ b/configure.ac @@ -88,7 +88,7 @@ AM_CONDITIONAL([WITH_MPI_TESTS], [test x"$build_mpi" = x"yes" -a -z "$SKIP_MPI_T #Build with OpenACC suport. Default is 'no' AC_ARG_ENABLE([acc], [AS_HELP_STRING([--enable-acc], [Build with OpenACC support. Defaults to 'no'])] ) -AS_IF([test ${enable_acc:no} = "yes"], [enable_acc=yes], [enable_acc=no]) +AS_IF([test ${enable_acc:-no} = "yes"], [enable_acc=yes], [enable_acc=no]) AM_CONDITIONAL([ENABLE_ACC], [test $enable_acc = "yes"]) AC_CHECK_FUNCS(gettid, [], []) @@ -165,25 +165,22 @@ AC_DEFINE([GIT_REVISION], "git_revision", AC_DEFINE([GIT_HEADHASH], "git_hashval", [Holds the 'git rev-parse HEAD' information if configure ran within a git working directory]) - #Code for setting rpath based ncview's configure.in code. -echo "ac_computer_gnu: $ac_compiler_gnu" -if test x$ac_compiler_gnu = xyes; then - RPATH_FLAGS="" - for word in $NETCDF_LDFLAGS; do - if test `expr $word : -L/` -eq 3; then - RPDIR=${word:2} - RPATH_FLAGS="$RPATH_FLAGS -Wl,-rpath,$RPDIR" - fi - done - for word in $NETCDF_FCLDFLAGS; do - if test `expr $word : -L/` -eq 3; then - RPDIR=${word:2} - RPATH_FLAGS="$RPATH_FLAGS -Wl,-rpath,$RPDIR" - fi - done - AC_SUBST(RPATH_FLAGS) -fi +AS_IF([test x$ac_compiler_gnu = xyes], [RPATH_FLAGS="" + for word in $NETCDF_LDFLAGS $NETCDF_FCLDFLAGS + do + if test `expr $word : -L/` -eq 3 + then + RPDIR=${word:2} + regex=".*$RPDIR.*" + if test `expr "$RPATH_FLAGS" : $regex` -eq 0 + then + # RPDIR not in RPATH_FLAGS + RPATH_FLAGS="$RPATHFLAGS -Wl,-rpath,$RPDIR" + fi + fi + done]) +AC_SUBST(RPATH_FLAGS) dnl # Output files AC_CONFIG_HEADERS([config.h]) diff --git a/tools/libfrencutils/create_xgrid.h b/tools/libfrencutils/create_xgrid.h index 88fdb048..8f17da35 100644 --- a/tools/libfrencutils/create_xgrid.h +++ b/tools/libfrencutils/create_xgrid.h @@ -20,10 +20,16 @@ #ifndef CREATE_XGRID_H_ #define CREATE_XGRID_H_ #ifndef MAXXGRID +#ifdef use_libMPI #define MAXXGRID 1e6 +#else +#define MAXXGRID 5e6 +#endif #endif +#ifndef MV #define MV 50 +#endif /* this value is small compare to earth area */ double poly_ctrlon(const double lon[], const double lat[], int n, double clon); diff --git a/tools/make_topog/make_topog.c b/tools/make_topog/make_topog.c index d6c361e4..f2b12c57 100644 --- a/tools/make_topog/make_topog.c +++ b/tools/make_topog/make_topog.c @@ -25,6 +25,7 @@ #include "mpp.h" #include "mpp_domain.h" #include "mpp_io.h" +#include "mosaic_util.h" #include "tool_util.h" #include "topog.h" diff --git a/tools/river_regrid/river_regrid.c b/tools/river_regrid/river_regrid.c index 0b138c50..0cc8dd28 100644 --- a/tools/river_regrid/river_regrid.c +++ b/tools/river_regrid/river_regrid.c @@ -156,7 +156,8 @@ void calc_tocell(int ntiles, river_type *river_out, unsigned int opcode ); void calc_river_data(int ntiles, river_type* river_data, unsigned int opcode ); void sort_basin(int ntiles, river_type* river_data); -void check_river_data( ); +void check_river_data(int ntiles, river_type *river_data); + void write_river_data(const char *river_src_file, const char *output_file, river_type* river_out, const char *history, int ntiles, int great_circle_algorithm); double distance(double lon1, double lat1, double lon2, double lat2);