Changeset 1439


Ignore:
Timestamp:
07/30/09 14:53:37 (16 years ago)
Author:
Eric.Larour
Message:

All changes necessary to carry out compilation under windows intel platforms

Location:
issm/trunk
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/configure

    r1378 r1439  
    579579PACKAGE_BUGREPORT='Eric Larour <eric.larour@jpl.nasa.gov>'
    580580
     581<<<<<<< .mine
     582ac_subst_vars='am__EXEEXT_FALSE
     583am__EXEEXT_TRUE
     584LTLIBOBJS
     585LIBOBJS
     586GRAPHICSLIB
     587FORTRANLIB
     588MATHLIB
     589BLACSLIB
     590BLACSINCL
     591MUMPSLIB
     592MUMPSINCL
     593PLAPACKLIB
     594PLAPACKINCL
     595MKLINCL
     596MKLLIB
     597BLASLAPACKINCL
     598BLASLAPACKLIB
     599SCALAPACKLIB
     600SLEPCLIB
     601SLEPCINCL
     602PETSCLIB
     603PETSCINCL
     604MPILIB
     605MPIINCL
     606METISLIB
     607METISINCL
     608DAKOTALIB
     609DAKOTAINCL
     610TRIANGLELIB
     611TRIANGLEINCL
     612LARGEARRAYS_FALSE
     613LARGEARRAYS_TRUE
     614MATLAB_MINOR
     615MATLAB_MAJOR
     616MATLAB_VERSION
     617MATLAB
     618MEXLINK
     619MEXLIB
     620MEXEXT
     621MEX
     622MATLABINCL
     623NOPARALLEL_FALSE
     624NOPARALLEL_TRUE
     625NOSERIAL_FALSE
     626NOSERIAL_TRUE
     627X_EXTRA_LIBS
     628X_LIBS
     629X_PRE_LIBS
     630X_CFLAGS
     631XMKMF
     632FLIBS
     633ac_ct_F77
     634FFLAGS
     635F77
     636am__fastdepCXX_FALSE
     637am__fastdepCXX_TRUE
     638CXXDEPMODE
     639ac_ct_CXX
     640CXXFLAGS
     641CXX
     642CPP
     643am__fastdepCC_FALSE
     644am__fastdepCC_TRUE
     645CCDEPMODE
     646AMDEPBACKSLASH
     647AMDEP_FALSE
     648AMDEP_TRUE
     649am__quote
     650am__include
     651DEPDIR
     652OBJEXT
     653EXEEXT
     654ac_ct_CC
     655CPPFLAGS
     656LDFLAGS
     657CFLAGS
     658CC
     659RANLIB
     660am__untar
     661am__tar
     662AMTAR
     663am__leading_dot
     664SET_MAKE
     665AWK
     666mkdir_p
     667MKDIR_P
     668INSTALL_STRIP_PROGRAM
     669STRIP
     670install_sh
     671MAKEINFO
     672AUTOHEADER
     673AUTOMAKE
     674AUTOCONF
     675ACLOCAL
     676VERSION
     677PACKAGE
     678CYGPATH_W
     679am__isrc
     680INSTALL_DATA
     681INSTALL_SCRIPT
     682INSTALL_PROGRAM
     683target_os
     684target_vendor
     685target_cpu
     686target
     687host_os
     688host_vendor
     689host_cpu
     690host
     691build_os
     692build_vendor
     693build_cpu
     694build
     695target_alias
     696host_alias
     697build_alias
     698LIBS
     699ECHO_T
     700ECHO_N
     701ECHO_C
     702DEFS
     703mandir
     704localedir
     705libdir
     706psdir
     707pdfdir
     708dvidir
     709htmldir
     710infodir
     711docdir
     712oldincludedir
     713includedir
     714localstatedir
     715sharedstatedir
     716sysconfdir
     717datadir
     718datarootdir
     719libexecdir
     720sbindir
     721bindir
     722program_transform_name
     723prefix
     724exec_prefix
     725PACKAGE_BUGREPORT
     726PACKAGE_STRING
     727PACKAGE_VERSION
     728PACKAGE_TARNAME
     729PACKAGE_NAME
     730=======
    581731ac_subst_vars='SHELL
     732>>>>>>> .r1435
    582733PATH_SEPARATOR
    583734PACKAGE_NAME
     
    726877LTLIBOBJS'
    727878ac_subst_files=''
     879<<<<<<< .mine
     880ac_user_opts='
     881enable_option_checking
     882enable_dependency_tracking
     883with_x
     884enable_debugging
     885with_serial
     886with_parallel
     887with_matlab_dir
     888with_triangle_dir
     889with_dakota_dir
     890with_metis_dir
     891with_mpi_lib
     892with_mpi_include
     893with_petsc_dir
     894with_petsc_arch
     895with_slepc_dir
     896with_scalapack_dir
     897with_blas_lapack_dir
     898with_mkl_dir
     899with_plapack_dir
     900with_mumps_dir
     901with_blacs_dir
     902with_math_lib
     903with_fortran_lib
     904with_graphics_lib
     905with_vendor
     906'
     907=======
     908>>>>>>> .r1435
    728909      ac_precious_vars='build_alias
    729910host_alias
     
    734915LIBS
    735916CPPFLAGS
     917CPP
    736918CXX
    737919CXXFLAGS
     
    739921F77
    740922FFLAGS
    741 XMKMF
    742 CPP'
     923XMKMF'
    743924
    744925
     
    13561537  --with-mumps-dir = DIR  mumps root directory
    13571538  --with-blacs-dir = DIR  blacs root directory
     1539<<<<<<< .mine
    13581540  --with-math-lib = otions
    13591541                          math options, for ex: "/usr/lib/libm.a
    13601542  --with-fortran-lib = options
    13611543                          fortran options, for ex: "/usr/lib/gfortran.a
     1544  --with-graphics-lib = options
     1545                          graphics options, for ex: "/usr/X11/lib/libX11.a
     1546  --with-vendor = VENDOR  vendor name, ex: intel
     1547=======
     1548  --with-math-lib = otions
     1549                          math options, for ex: "/usr/lib/libm.a
     1550  --with-fortran-lib = options
     1551                          fortran options, for ex: "/usr/lib/gfortran.a
     1552>>>>>>> .r1435
    13621553
    13631554Some influential environment variables:
     
    13691560  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
    13701561              you have headers in a nonstandard directory <include dir>
     1562  CPP         C preprocessor
    13711563  CXX         C++ compiler command
    13721564  CXXFLAGS    C++ compiler flags
     
    13741566  FFLAGS      Fortran 77 compiler flags
    13751567  XMKMF       Path to xmkmf, Makefile generator for X Window System
    1376   CPP         C preprocessor
    13771568
    13781569Use these variables to override the choices made by `configure' or to help
     
    19662157    NONENONEs,x,x, &&
    19672158  program_prefix=${target_alias}-
    1968 am__api_version='1.10'
     2159am__api_version='1.11'
    19692160
    19702161# Find a good install program.  We prefer a C program (faster),
     
    20532244sleep 1
    20542245echo timestamp > conftest.file
     2246# Reject unsafe characters in $srcdir or the absolute working directory
     2247# name.  Accept space and tab only in the latter.
     2248am_lf='
     2249'
     2250case `pwd` in
     2251  *[\\\"\#\$\&\'\`$am_lf]*)
     2252    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
     2253$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
     2254   { (exit 1); exit 1; }; };;
     2255esac
     2256case $srcdir in
     2257  *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
     2258    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
     2259$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
     2260   { (exit 1); exit 1; }; };;
     2261esac
     2262
    20552263# Do `set' in a subshell so we don't clobber the current shell's
    20562264# arguments.  Must try -L first in case configure is actually a
     
    20592267# directory).
    20602268if (
    2061    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
     2269   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    20622270   if test "$*" = "X"; then
    20632271      # -L didn't work.
    2064       set X `ls -t $srcdir/configure conftest.file`
     2272      set X `ls -t "$srcdir/configure" conftest.file`
    20652273   fi
    20662274   rm -f conftest.file
     
    21092317am_aux_dir=`cd $ac_aux_dir && pwd`
    21102318
    2111 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
     2319if test x"${MISSING+set}" != xset; then
     2320  case $am_aux_dir in
     2321  *\ * | *\     *)
     2322    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
     2323  *)
     2324    MISSING="\${SHELL} $am_aux_dir/missing" ;;
     2325  esac
     2326fi
    21122327# Use eval to expand $SHELL
    21132328if eval "$MISSING --run true"; then
     
    21192334fi
    21202335
     2336<<<<<<< .mine
     2337if test x"${install_sh}" != xset; then
     2338  case $am_aux_dir in
     2339  *\ * | *\     *)
     2340    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
     2341  *)
     2342    install_sh="\${SHELL} $am_aux_dir/install-sh"
     2343  esac
     2344fi
     2345
     2346# Installed binaries are usually stripped using `strip' when the user
     2347# run `make install-strip'.  However `strip' might not be the right
     2348# tool to use in cross-compilation environments, therefore Automake
     2349# will honor the `STRIP' environment variable to overrule this program.
     2350if test "$cross_compiling" != no; then
     2351  if test -n "$ac_tool_prefix"; then
     2352  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
     2353set dummy ${ac_tool_prefix}strip; ac_word=$2
     2354{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     2355$as_echo_n "checking for $ac_word... " >&6; }
     2356if test "${ac_cv_prog_STRIP+set}" = set; then
     2357  $as_echo_n "(cached) " >&6
     2358else
     2359  if test -n "$STRIP"; then
     2360  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
     2361else
     2362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2363for as_dir in $PATH
     2364do
     2365  IFS=$as_save_IFS
     2366  test -z "$as_dir" && as_dir=.
     2367  for ac_exec_ext in '' $ac_executable_extensions; do
     2368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2369    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     2370    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2371    break 2
     2372  fi
     2373done
     2374done
     2375IFS=$as_save_IFS
     2376
     2377fi
     2378fi
     2379STRIP=$ac_cv_prog_STRIP
     2380if test -n "$STRIP"; then
     2381  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
     2382$as_echo "$STRIP" >&6; }
     2383else
     2384  { $as_echo "$as_me:$LINENO: result: no" >&5
     2385$as_echo "no" >&6; }
     2386fi
     2387
     2388
     2389fi
     2390if test -z "$ac_cv_prog_STRIP"; then
     2391  ac_ct_STRIP=$STRIP
     2392  # Extract the first word of "strip", so it can be a program name with args.
     2393set dummy strip; ac_word=$2
     2394{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
     2395$as_echo_n "checking for $ac_word... " >&6; }
     2396if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
     2397  $as_echo_n "(cached) " >&6
     2398else
     2399  if test -n "$ac_ct_STRIP"; then
     2400  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
     2401else
     2402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2403for as_dir in $PATH
     2404do
     2405  IFS=$as_save_IFS
     2406  test -z "$as_dir" && as_dir=.
     2407  for ac_exec_ext in '' $ac_executable_extensions; do
     2408  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     2409    ac_cv_prog_ac_ct_STRIP="strip"
     2410    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2411    break 2
     2412  fi
     2413done
     2414done
     2415IFS=$as_save_IFS
     2416
     2417fi
     2418fi
     2419ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
     2420if test -n "$ac_ct_STRIP"; then
     2421  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
     2422$as_echo "$ac_ct_STRIP" >&6; }
     2423else
     2424  { $as_echo "$as_me:$LINENO: result: no" >&5
     2425$as_echo "no" >&6; }
     2426fi
     2427
     2428  if test "x$ac_ct_STRIP" = x; then
     2429    STRIP=":"
     2430  else
     2431    case $cross_compiling:$ac_tool_warned in
     2432yes:)
     2433{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
     2434$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     2435ac_tool_warned=yes ;;
     2436esac
     2437    STRIP=$ac_ct_STRIP
     2438  fi
     2439else
     2440  STRIP="$ac_cv_prog_STRIP"
     2441fi
     2442
     2443fi
     2444INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
     2445
     2446{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
     2447$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
     2448=======
    21212449{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
    21222450echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
     2451>>>>>>> .r1435
    21232452if test -z "$MKDIR_P"; then
    21242453  if test "${ac_cv_path_mkdir+set}" = set; then
     
    23002629MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
    23012630
     2631<<<<<<< .mine
     2632=======
    23022633install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
    23032634
     
    24062737INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
    24072738
     2739>>>>>>> .r1435
    24082740# We need awk for the "check" target.  The system "awk" is bad on
    24092741# some platforms.
     
    25202852ac_compiler_gnu=$ac_cv_c_compiler_gnu
    25212853if test -n "$ac_tool_prefix"; then
     2854<<<<<<< .mine
     2855  for ac_prog in gcc icl
     2856=======
    25222857  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
    25232858set dummy ${ac_tool_prefix}gcc; ac_word=$2
     
    27153050  if test -n "$ac_tool_prefix"; then
    27163051  for ac_prog in cl.exe
     3052>>>>>>> .r1435
    27173053  do
    27183054    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
     
    27583094if test -z "$CC"; then
    27593095  ac_ct_CC=$CC
    2760   for ac_prog in cl.exe
     3096  for ac_prog in gcc icl
    27613097do
    27623098  # Extract the first word of "$ac_prog", so it can be a program name with args.
     
    28153151    CC=$ac_ct_CC
    28163152  fi
    2817 fi
    2818 
    28193153fi
    28203154
     
    34403774cat > confinc << 'END'
    34413775am__doit:
    3442         @echo done
     3776        @echo this is the am__doit target
    34433777.PHONY: am__doit
    34443778END
     
    34513785# First try GNU make style include.
    34523786echo "include confinc" > confmf
    3453 # We grep out `Entering directory' and `Leaving directory'
    3454 # messages which can occur if `w' ends up in MAKEFLAGS.
    3455 # In particular we don't look at `^make:' because GNU make might
    3456 # be invoked under some other name (usually "gmake"), in which
    3457 # case it prints its new name instead of `make'.
    3458 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
    3459    am__include=include
    3460    am__quote=
    3461    _am_result=GNU
    3462 fi
     3787# Ignore all kinds of additional output from `make'.
     3788case `$am_make -s -f confmf 2> /dev/null` in #(
     3789*the\ am__doit\ target*)
     3790  am__include=include
     3791  am__quote=
     3792  _am_result=GNU
     3793  ;;
     3794esac
    34633795# Now try BSD make style include.
    34643796if test "$am__include" = "#"; then
    34653797   echo '.include "confinc"' > confmf
    3466    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
    3467       am__include=.include
    3468       am__quote="\""
    3469       _am_result=BSD
    3470    fi
     3798   case `$am_make -s -f confmf 2> /dev/null` in #(
     3799   *the\ am__doit\ target*)
     3800     am__include=.include
     3801     am__quote="\""
     3802     _am_result=BSD
     3803     ;;
     3804   esac
    34713805fi
    34723806
     
    35253859     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
    35263860  fi
     3861  am__universal=false
     3862  case " $depcc " in #(
     3863     *\ -arch\ *\ -arch\ *) am__universal=true ;;
     3864     esac
     3865
    35273866  for depmode in $am_compiler_list; do
    35283867    # Setup a source with many dependencies, because some compilers
     
    35423881    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
    35433882
     3883    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     3884    # mode.  It turns out that the SunPro C++ compiler does not properly
     3885    # handle `-M -o', and we need to detect this.  Also, some Intel
     3886    # versions had trouble with output in subdirs
     3887    am__obj=sub/conftest.${OBJEXT-o}
     3888    am__minus_obj="-o $am__obj"
    35443889    case $depmode in
     3890    gcc)
     3891      # This depmode causes a compiler race in universal mode.
     3892      test "$am__universal" = false || continue
     3893      ;;
    35453894    nosideeffect)
    35463895      # after this tag, mechanisms are not by side-effect, so they'll
     
    35523901      fi
    35533902      ;;
     3903    msvisualcpp | msvcmsys)
     3904      # This compiler won't grok `-c -o', but also, the minuso test has
     3905      # not run yet.  These depmodes are late enough in the game, and
     3906      # so weak that their functioning should not be impacted.
     3907      am__obj=conftest.${OBJEXT-o}
     3908      am__minus_obj=
     3909      ;;
    35543910    none) break ;;
    35553911    esac
    3556     # We check with `-c' and `-o' for the sake of the "dashmstdout"
    3557     # mode.  It turns out that the SunPro C++ compiler does not properly
    3558     # handle `-M -o', and we need to detect this.
    35593912    if depmode=$depmode \
    3560        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
     3913       source=sub/conftest.c object=$am__obj \
    35613914       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
    3562        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
     3915       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
    35633916         >/dev/null 2>conftest.err &&
    35643917       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
    35653918       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
    3566        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
     3919       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
    35673920       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    35683921      # icc doesn't choke on unknown options, it will just issue warnings
     
    36033956
    36043957
     3958ac_ext=c
     3959ac_cpp='$CPP $CPPFLAGS'
     3960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     3961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     3962ac_compiler_gnu=$ac_cv_c_compiler_gnu
     3963{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
     3964$as_echo_n "checking how to run the C preprocessor... " >&6; }
     3965# On Suns, sometimes $CPP names a directory.
     3966if test -n "$CPP" && test -d "$CPP"; then
     3967  CPP=
     3968fi
     3969if test -z "$CPP"; then
     3970  if test "${ac_cv_prog_CPP+set}" = set; then
     3971  $as_echo_n "(cached) " >&6
     3972else
     3973      # Double quotes because CPP needs to be expanded
     3974    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
     3975    do
     3976      ac_preproc_ok=false
     3977for ac_c_preproc_warn_flag in '' yes
     3978do
     3979  # Use a header file that comes with gcc, so configuring glibc
     3980  # with a fresh cross-compiler works.
     3981  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     3982  # <limits.h> exists even on freestanding compilers.
     3983  # On the NeXT, cc -E runs the code through the compiler's parser,
     3984  # not just through cpp. "Syntax error" is here to catch this case.
     3985  cat >conftest.$ac_ext <<_ACEOF
     3986/* confdefs.h.  */
     3987_ACEOF
     3988cat confdefs.h >>conftest.$ac_ext
     3989cat >>conftest.$ac_ext <<_ACEOF
     3990/* end confdefs.h.  */
     3991#ifdef __STDC__
     3992# include <limits.h>
     3993#else
     3994# include <assert.h>
     3995#endif
     3996                     Syntax error
     3997_ACEOF
     3998if { (ac_try="$ac_cpp conftest.$ac_ext"
     3999case "(($ac_try" in
     4000  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4001  *) ac_try_echo=$ac_try;;
     4002esac
     4003eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4004$as_echo "$ac_try_echo") >&5
     4005  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
     4006  ac_status=$?
     4007  grep -v '^ *+' conftest.er1 >conftest.err
     4008  rm -f conftest.er1
     4009  cat conftest.err >&5
     4010  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4011  (exit $ac_status); } >/dev/null && {
     4012         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     4013         test ! -s conftest.err
     4014       }; then
     4015  :
     4016else
     4017  $as_echo "$as_me: failed program was:" >&5
     4018sed 's/^/| /' conftest.$ac_ext >&5
     4019
     4020  # Broken: fails on valid input.
     4021continue
     4022fi
     4023
     4024rm -f conftest.err conftest.$ac_ext
     4025
     4026  # OK, works on sane cases.  Now check whether nonexistent headers
     4027  # can be detected and how.
     4028  cat >conftest.$ac_ext <<_ACEOF
     4029/* confdefs.h.  */
     4030_ACEOF
     4031cat confdefs.h >>conftest.$ac_ext
     4032cat >>conftest.$ac_ext <<_ACEOF
     4033/* end confdefs.h.  */
     4034#include <ac_nonexistent.h>
     4035_ACEOF
     4036if { (ac_try="$ac_cpp conftest.$ac_ext"
     4037case "(($ac_try" in
     4038  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4039  *) ac_try_echo=$ac_try;;
     4040esac
     4041eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4042$as_echo "$ac_try_echo") >&5
     4043  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
     4044  ac_status=$?
     4045  grep -v '^ *+' conftest.er1 >conftest.err
     4046  rm -f conftest.er1
     4047  cat conftest.err >&5
     4048  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4049  (exit $ac_status); } >/dev/null && {
     4050         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     4051         test ! -s conftest.err
     4052       }; then
     4053  # Broken: success on invalid input.
     4054continue
     4055else
     4056  $as_echo "$as_me: failed program was:" >&5
     4057sed 's/^/| /' conftest.$ac_ext >&5
     4058
     4059  # Passes both tests.
     4060ac_preproc_ok=:
     4061break
     4062fi
     4063
     4064rm -f conftest.err conftest.$ac_ext
     4065
     4066done
     4067# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     4068rm -f conftest.err conftest.$ac_ext
     4069if $ac_preproc_ok; then
     4070  break
     4071fi
     4072
     4073    done
     4074    ac_cv_prog_CPP=$CPP
     4075
     4076fi
     4077  CPP=$ac_cv_prog_CPP
     4078else
     4079  ac_cv_prog_CPP=$CPP
     4080fi
     4081{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
     4082$as_echo "$CPP" >&6; }
     4083ac_preproc_ok=false
     4084for ac_c_preproc_warn_flag in '' yes
     4085do
     4086  # Use a header file that comes with gcc, so configuring glibc
     4087  # with a fresh cross-compiler works.
     4088  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     4089  # <limits.h> exists even on freestanding compilers.
     4090  # On the NeXT, cc -E runs the code through the compiler's parser,
     4091  # not just through cpp. "Syntax error" is here to catch this case.
     4092  cat >conftest.$ac_ext <<_ACEOF
     4093/* confdefs.h.  */
     4094_ACEOF
     4095cat confdefs.h >>conftest.$ac_ext
     4096cat >>conftest.$ac_ext <<_ACEOF
     4097/* end confdefs.h.  */
     4098#ifdef __STDC__
     4099# include <limits.h>
     4100#else
     4101# include <assert.h>
     4102#endif
     4103                     Syntax error
     4104_ACEOF
     4105if { (ac_try="$ac_cpp conftest.$ac_ext"
     4106case "(($ac_try" in
     4107  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4108  *) ac_try_echo=$ac_try;;
     4109esac
     4110eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4111$as_echo "$ac_try_echo") >&5
     4112  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
     4113  ac_status=$?
     4114  grep -v '^ *+' conftest.er1 >conftest.err
     4115  rm -f conftest.er1
     4116  cat conftest.err >&5
     4117  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4118  (exit $ac_status); } >/dev/null && {
     4119         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     4120         test ! -s conftest.err
     4121       }; then
     4122  :
     4123else
     4124  $as_echo "$as_me: failed program was:" >&5
     4125sed 's/^/| /' conftest.$ac_ext >&5
     4126
     4127  # Broken: fails on valid input.
     4128continue
     4129fi
     4130
     4131rm -f conftest.err conftest.$ac_ext
     4132
     4133  # OK, works on sane cases.  Now check whether nonexistent headers
     4134  # can be detected and how.
     4135  cat >conftest.$ac_ext <<_ACEOF
     4136/* confdefs.h.  */
     4137_ACEOF
     4138cat confdefs.h >>conftest.$ac_ext
     4139cat >>conftest.$ac_ext <<_ACEOF
     4140/* end confdefs.h.  */
     4141#include <ac_nonexistent.h>
     4142_ACEOF
     4143if { (ac_try="$ac_cpp conftest.$ac_ext"
     4144case "(($ac_try" in
     4145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4146  *) ac_try_echo=$ac_try;;
     4147esac
     4148eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     4149$as_echo "$ac_try_echo") >&5
     4150  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
     4151  ac_status=$?
     4152  grep -v '^ *+' conftest.er1 >conftest.err
     4153  rm -f conftest.er1
     4154  cat conftest.err >&5
     4155  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4156  (exit $ac_status); } >/dev/null && {
     4157         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     4158         test ! -s conftest.err
     4159       }; then
     4160  # Broken: success on invalid input.
     4161continue
     4162else
     4163  $as_echo "$as_me: failed program was:" >&5
     4164sed 's/^/| /' conftest.$ac_ext >&5
     4165
     4166  # Passes both tests.
     4167ac_preproc_ok=:
     4168break
     4169fi
     4170
     4171rm -f conftest.err conftest.$ac_ext
     4172
     4173done
     4174# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     4175rm -f conftest.err conftest.$ac_ext
     4176if $ac_preproc_ok; then
     4177  :
     4178else
     4179  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
     4180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     4181{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
     4182See \`config.log' for more details." >&5
     4183$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
     4184See \`config.log' for more details." >&2;}
     4185   { (exit 1); exit 1; }; }; }
     4186fi
     4187
     4188ac_ext=c
     4189ac_cpp='$CPP $CPPFLAGS'
     4190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     4191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     4192ac_compiler_gnu=$ac_cv_c_compiler_gnu
     4193
    36054194ac_ext=cpp
    36064195ac_cpp='$CXXCPP $CPPFLAGS'
     
    36134202  else
    36144203    if test -n "$ac_tool_prefix"; then
    3615   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
     4204  for ac_prog in g++ icl
    36164205  do
    36174206    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
     
    36574246if test -z "$CXX"; then
    36584247  ac_ct_CXX=$CXX
    3659   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
     4248  for ac_prog in g++ icl
    36604249do
    36614250  # Extract the first word of "$ac_prog", so it can be a program name with args.
     
    39974586     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
    39984587  fi
     4588  am__universal=false
     4589  case " $depcc " in #(
     4590     *\ -arch\ *\ -arch\ *) am__universal=true ;;
     4591     esac
     4592
    39994593  for depmode in $am_compiler_list; do
    40004594    # Setup a source with many dependencies, because some compilers
     
    40144608    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
    40154609
     4610    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     4611    # mode.  It turns out that the SunPro C++ compiler does not properly
     4612    # handle `-M -o', and we need to detect this.  Also, some Intel
     4613    # versions had trouble with output in subdirs
     4614    am__obj=sub/conftest.${OBJEXT-o}
     4615    am__minus_obj="-o $am__obj"
    40164616    case $depmode in
     4617    gcc)
     4618      # This depmode causes a compiler race in universal mode.
     4619      test "$am__universal" = false || continue
     4620      ;;
    40174621    nosideeffect)
    40184622      # after this tag, mechanisms are not by side-effect, so they'll
     
    40244628      fi
    40254629      ;;
     4630    msvisualcpp | msvcmsys)
     4631      # This compiler won't grok `-c -o', but also, the minuso test has
     4632      # not run yet.  These depmodes are late enough in the game, and
     4633      # so weak that their functioning should not be impacted.
     4634      am__obj=conftest.${OBJEXT-o}
     4635      am__minus_obj=
     4636      ;;
    40264637    none) break ;;
    40274638    esac
    4028     # We check with `-c' and `-o' for the sake of the "dashmstdout"
    4029     # mode.  It turns out that the SunPro C++ compiler does not properly
    4030     # handle `-M -o', and we need to detect this.
    40314639    if depmode=$depmode \
    4032        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
     4640       source=sub/conftest.c object=$am__obj \
    40334641       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
    4034        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
     4642       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
    40354643         >/dev/null 2>conftest.err &&
    40364644       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
    40374645       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
    4038        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
     4646       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
    40394647       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    40404648      # icc doesn't choke on unknown options, it will just issue warnings
     
    40804688ac_compiler_gnu=$ac_cv_f77_compiler_gnu
    40814689if test -n "$ac_tool_prefix"; then
    4082   for ac_prog in ifort g77
     4690  for ac_prog in ifort g77 gfortran
    40834691  do
    40844692    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
     
    41244732if test -z "$F77"; then
    41254733  ac_ct_F77=$F77
    4126   for ac_prog in ifort g77
     4734  for ac_prog in ifort g77 gfortran
    41274735do
    41284736  # Extract the first word of "$ac_prog", so it can be a program name with args.
     
    47875395
    47885396
     5397<<<<<<< .mine
     5398=======
    47895399ac_ext=c
    47905400ac_cpp='$CPP $CPPFLAGS'
     
    48475457  echo "$as_me: failed program was:" >&5
    48485458sed 's/^/| /' conftest.$ac_ext >&5
    4849 
     5459>>>>>>> .r1435
     5460
     5461<<<<<<< .mine
     5462=======
    48505463  # Broken: fails on valid input.
    48515464continue
     
    50185631
    50195632
     5633>>>>>>> .r1435
    50205634{ echo "$as_me:$LINENO: checking for X" >&5
    50215635echo $ECHO_N "checking for X... $ECHO_C" >&6; }
     
    65077121                                HAVE_MATLAB=yes
    65087122                MATLABINCL=-I"$MATLAB_ROOT/extern/include";
    6509                                 MEXEXT=`$MATLAB_ROOT/bin/mexext`
    6510                 MEXEXT=".$MEXEXT"
     7123
    65117124                MEX=$MATLAB_ROOT/bin/mex
    65127125
     
    65217134                                MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnx86/mexFunction.map";
    65227135                        fi
     7136                        MEXEXT=`$MATLAB_ROOT/bin/mexext`
     7137                        MEXEXT=".$MEXEXT"
    65237138                        ;;
     7139<<<<<<< .mine
     7140                        *darwin9.6.0*)
     7141                        MEXLIB=-L"$MATLAB_ROOT/bin/maci/ -lmex -lmx"
     7142                        MEXLINK="-Wl,-twolevel_namespace -undefined error -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci/mexFunction.map"
     7143                        MEXEXT=`$MATLAB_ROOT/bin/mexext`
     7144                        MEXEXT=".$MEXEXT"
     7145                        ;;
     7146                        *cygwin*)
     7147                        MEXLIB="-dll -export:mexFunction -LIBPATH:\"$MATLAB_ROOT\extern\lib\win32\microsoft\" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  -NOLOGO -INCREMENTAL:NO"
     7148
     7149
     7150                        MEXEXT=`$MATLAB_ROOT/bin/mexext.bat`
     7151                        MEXEXT=".$MEXEXT"
     7152                        ;;
     7153
     7154=======
    65247155                        *darwin9.6.0*)
    65257156                        MEXLIB=-L"$MATLAB_ROOT/bin/maci/ -lmex -lmx"
     
    65277158                        ;;
    65287159
     7160>>>>>>> .r1435
    65297161                esac
    65307162
     
    65907222                                break
    65917223                        fi
     7224
     7225                                # For Matlab R2008 and more, the version number is stored in bin/util/mex/version.txt
     7226                        ax_cv_matlab_version=`cat $MATLAB/bin/util/mex/version.txt`
     7227                        if test -n "$ax_cv_matlab_version" ; then
     7228                                break
     7229                        fi
     7230
    65927231                fi
    65937232        done
     
    66097248    MATLAB_MINOR=`echo $MATLAB_VERSION | sed -e 's/^[0-9]*\.\([0-9]*\).*/\1/'`
    66107249    ;;
     7250  R2009a)
     7251        MATLAB_VERSION=R2009a
     7252    MATLAB_MAJOR=R2009
     7253    MATLAB_MINOR=a
     7254        ;;
    66117255  *)
    66127256    if test x$ax_enable_matlab = xyes ; then
     
    67457389
    67467390                                HAVE_METIS=yes
     7391
     7392                case "${host_os}" in
     7393                        *cygwin*)
     7394                        METISLIB="-LIBPATH:\"$METIS_ROOT\" libmetis.lib"
     7395                        ;;
     7396                        *linux*)
     7397                        METISLIB=-L"$METIS_ROOT/ -lmetis"
     7398                        ;;
     7399                        *darwin9.6.0*)
     7400                        METISLIB=-L"$METIS_ROOT/ -lmetis"
     7401                        ;;
     7402                esac
     7403
    67477404                METISINCL=-I"$METIS_ROOT/Lib"
    6748                 METISLIB=-L"$METIS_ROOT/ -lmetis"
    67497405
    67507406
     
    67907446                if test -z "$MPILIB" ; then
    67917447                if test "$PARALLEL_VALUE" = "yes" ; then
     7448<<<<<<< .mine
     7449                        { { $as_echo "$as_me:$LINENO: error: empty --with-mpi-lib options! MPI is needed to run ISSM in paralle!" >&5
     7450$as_echo "$as_me: error: empty --with-mpi-lib options! MPI is needed to run ISSM in paralle!" >&2;}
     7451=======
    67927452                        { { echo "$as_me:$LINENO: error: empty --with-mpi-lib options! MPI is needed to run ISSM in paralle!" >&5
    67937453echo "$as_me: error: empty --with-mpi-lib options! MPI is needed to run ISSM in paralle!" >&2;}
     7454>>>>>>> .r1435
    67947455   { (exit 1); exit 1; }; }
    67957456                fi
     
    67977458                if test -z "$MPI_INCLUDE" ; then
    67987459                        if test "$PARALLEL_VALUE" = "yes" ; then
     7460<<<<<<< .mine
     7461                                { { $as_echo "$as_me:$LINENO: error: empty --with-mpi-include directory! MPI is needed to run ISSM in paralle!" >&5
     7462$as_echo "$as_me: error: empty --with-mpi-include directory! MPI is needed to run ISSM in paralle!" >&2;}
     7463=======
    67997464                                { { echo "$as_me:$LINENO: error: empty --with-mpi-include directory! MPI is needed to run ISSM in paralle!" >&5
    68007465echo "$as_me: error: empty --with-mpi-include directory! MPI is needed to run ISSM in paralle!" >&2;}
     7466>>>>>>> .r1435
    68017467   { (exit 1); exit 1; }; }
    68027468                        fi
     
    68647530
    68657531                        PETSCINCL="-I$PETSC_ROOT/include  -I$PETSC_ROOT/ -I$PETSC_ROOT/bmake/$PETSC_ARCH -I$PETSC_ROOT/src/mat/impls/dense/mpi/plapack/"
    6866                         PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     7532
     7533                        case "${host_os}" in
     7534                                *cygwin*)
     7535                                PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetsc.lib  libpetscsnes.lib libpetscts.lib libmpiuni.lib"
     7536                                ;;
     7537                                *linux*)
     7538                                PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     7539                                ;;
     7540                                *darwin9.6.0*)
     7541                                PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     7542                                ;;
     7543                        esac
    68677544
    68687545
     
    68857562
    68867563        if test $HAVE_PETSC = no; then
     7564<<<<<<< .mine
     7565                { { $as_echo "$as_me:$LINENO: error: could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM!" >&5
     7566$as_echo "$as_me: error: could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM!" >&2;}
     7567=======
    68877568                if test "$PARALLEL_VALUE" = "yes" ; then
    68887569                        { { echo "$as_me:$LINENO: error: could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM in paralle!" >&5
    68897570echo "$as_me: error: could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM in paralle!" >&2;}
     7571>>>>>>> .r1435
    68907572   { (exit 1); exit 1; }; }
    6891                 fi
    68927573        else
    68937574                { echo "$as_me:$LINENO: result: $HAVE_PETSC" >&5
    68947575echo "${ECHO_T}$HAVE_PETSC" >&6; }
     7576        fi
     7577
     7578                if test "$PARALLEL_VALUE" = "no" ; then
     7579                HAVE_MPI=yes
     7580                MPIINCL=-I"$PETSC_ROOT/include/mpiuni"
     7581
     7582                case "${host_os}" in
     7583                        *cygwin*)
     7584                        MPILIB="-link -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
     7585                        ;;
     7586                        *linux*)
     7587                        MPILIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
     7588                        ;;
     7589                        *darwin9.6.0*)
     7590                        MPILIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
     7591                        ;;
     7592                esac
     7593
     7594
     7595
     7596
     7597
     7598cat >>confdefs.h <<\_ACEOF
     7599#define _HAVE_MPI_ 1
     7600_ACEOF
     7601
     7602
     7603cat >>confdefs.h <<\_ACEOF
     7604#define HAVE_MPI 1
     7605_ACEOF
     7606
     7607
     7608
    68957609        fi
    68967610
     
    69727686                                HAVE_BLASLAPACK=yes
    69737687                BLASLAPACKINCL=""
    6974                                 BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     7688
     7689                                case "${host_os}" in
     7690                        *cygwin*)
     7691                        BLASLAPACKLIB="-link -LIBPATH:\"$BLASLAPACK_ROOT\" libf2cblas.lib  libf2clapack.lib"
     7692                        ;;
     7693                        *linux*)
     7694                        BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     7695                        ;;
     7696                        *darwin9.6.0*)
     7697                        BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     7698                        ;;
     7699                esac
     7700
     7701
    69757702
    69767703
     
    71087835echo "${ECHO_T}$HAVE_BLACS" >&6; }
    71097836
     7837<<<<<<< .mine
     7838                { $as_echo "$as_me:$LINENO: checking for math library..." >&5
     7839$as_echo_n "checking for math library...... " >&6; }
     7840=======
    71107841                { echo "$as_me:$LINENO: checking for math library..." >&5
    71117842echo $ECHO_N "checking for math library...... $ECHO_C" >&6; }
     7843>>>>>>> .r1435
    71127844
    71137845# Check whether --with-math-lib was given.
     
    71237855                MATHLIB="$MATH_LIB"
    71247856
     7857<<<<<<< .mine
     7858
     7859cat >>confdefs.h <<\_ACEOF
     7860#define _HAVE_MATH_ 1
     7861_ACEOF
     7862
     7863
     7864        fi
     7865        { $as_echo "$as_me:$LINENO: result: done" >&5
     7866$as_echo "done" >&6; }
     7867
     7868                { $as_echo "$as_me:$LINENO: checking for fortran library..." >&5
     7869$as_echo_n "checking for fortran library...... " >&6; }
     7870
     7871# Check whether --with-fortran-lib was given.
     7872if test "${with_fortran_lib+set}" = set; then
     7873  withval=$with_fortran_lib; FORTRAN_LIB=$withval
     7874else
     7875  FORTRAN_LIB=""
     7876fi
     7877
     7878
     7879                if test -n "$FORTRAN_LIB" ; then
     7880                HAVE_FORTRAN=yes
     7881                FORTRANLIB="$FORTRAN_LIB"
     7882
     7883
     7884cat >>confdefs.h <<\_ACEOF
     7885#define _HAVE_FORTRAN_ 1
     7886_ACEOF
     7887
     7888
     7889        fi
     7890        { $as_echo "$as_me:$LINENO: result: done" >&5
     7891$as_echo "done" >&6; }
     7892
     7893                { $as_echo "$as_me:$LINENO: checking for graphics library..." >&5
     7894$as_echo_n "checking for graphics library...... " >&6; }
     7895
     7896# Check whether --with-graphics-lib was given.
     7897if test "${with_graphics_lib+set}" = set; then
     7898  withval=$with_graphics_lib; GRAPHICS_LIB=$withval
     7899else
     7900  GRAPHICS_LIB=""
     7901fi
     7902
     7903
     7904                if test -n "$GRAPHICS_LIB" ; then
     7905                HAVE_GRAPHICS=yes
     7906                GRAPHICSLIB="$GRAPHICS_LIB"
     7907
     7908
     7909cat >>confdefs.h <<\_ACEOF
     7910#define _HAVE_GRAPHICS_ 1
     7911_ACEOF
     7912
     7913
     7914        fi
     7915        { $as_echo "$as_me:$LINENO: result: done" >&5
     7916$as_echo "done" >&6; }
     7917
     7918
     7919# Check whether --with-vendor was given.
     7920if test "${with_vendor+set}" = set; then
     7921  withval=$with_vendor; VENDOR=$withval
     7922else
     7923  VENDOR=""
     7924fi
     7925
     7926        { $as_echo "$as_me:$LINENO: checking for vendor compilers " >&5
     7927$as_echo_n "checking for vendor compilers ... " >&6; }
     7928        if test -n "$VENDOR"; then
     7929
     7930                if  test $VENDOR = intel; then
     7931                        export CC=icl
     7932                        export CXX=icl
     7933                        export CXXFLAGS="-DWIN32 -D_INTEL_"
     7934                else
     7935                { { $as_echo "$as_me:$LINENO: error: unknow compiler vendor!" >&5
     7936$as_echo "$as_me: error: unknow compiler vendor!" >&2;}
     7937   { (exit 1); exit 1; }; }
     7938                fi
     7939        fi
     7940
     7941
     7942=======
    71257943
    71267944cat >>confdefs.h <<\_ACEOF
     
    71597977
    71607978
     7979>>>>>>> .r1435
    71617980ac_config_files="$ac_config_files Makefile src/Makefile src/c/Makefile src/mex/Makefile bin/Makefile"
    71627981
     
    72568075LTLIBOBJS=$ac_ltlibobjs
    72578076
     8077
     8078 if test -n "$EXEEXT"; then
     8079  am__EXEEXT_TRUE=
     8080  am__EXEEXT_FALSE='#'
     8081else
     8082  am__EXEEXT_TRUE='#'
     8083  am__EXEEXT_FALSE=
     8084fi
    72588085
    72598086if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
     
    84669293
    84679294  case $ac_file$ac_mode in
     9295<<<<<<< .mine
     9296    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
     9297  # Autoconf 2.62 quotes --file arguments for eval, but not when files
     9298  # are listed without --file.  Let's play safe and only enable the eval
     9299  # if we detect the quoting.
     9300  case $CONFIG_FILES in
     9301  *\'*) eval set x "$CONFIG_FILES" ;;
     9302  *)   set x $CONFIG_FILES ;;
     9303  esac
     9304  shift
     9305  for mf
     9306  do
     9307    # Strip MF so we end up with the name of the file.
     9308    mf=`echo "$mf" | sed -e 's/:.*$//'`
     9309    # Check whether this is an Automake generated Makefile or not.
     9310    # We used to match only the files named `Makefile.in', but
     9311    # some people rename them; so instead we look at the file content.
     9312    # Grep'ing the first line is not enough: some people post-process
     9313    # each Makefile.in and add a new line on top of each file to say so.
     9314    # Grep'ing the whole file is not good either: AIX grep has a line
     9315    # limit of 2048, but all sed's we know have understand at least 4000.
     9316    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
     9317      dirpart=`$as_dirname -- "$mf" ||
     9318=======
    84689319    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
    84699320  # Strip MF so we end up with the name of the file.
     
    84789329  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
    84799330    dirpart=`$as_dirname -- "$mf" ||
     9331>>>>>>> .r1435
    84809332$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    84819333         X"$mf" : 'X\(//\)[^/]' \| \
     
    85009352          }
    85019353          s/.*/./; q'`
    8502   else
    8503     continue
    8504   fi
    8505   # Extract the definition of DEPDIR, am__include, and am__quote
    8506   # from the Makefile without running `make'.
    8507   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
    8508   test -z "$DEPDIR" && continue
    8509   am__include=`sed -n 's/^am__include = //p' < "$mf"`
    8510   test -z "am__include" && continue
    8511   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
    8512   # When using ansi2knr, U may be empty or an underscore; expand it
    8513   U=`sed -n 's/^U = //p' < "$mf"`
    8514   # Find all dependency output files, they are included files with
    8515   # $(DEPDIR) in their names.  We invoke sed twice because it is the
    8516   # simplest approach to changing $(DEPDIR) to its actual value in the
    8517   # expansion.
    8518   for file in `sed -n "
    8519     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
    8520       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
    8521     # Make sure the directory exists.
    8522     test -f "$dirpart/$file" && continue
    8523     fdir=`$as_dirname -- "$file" ||
     9354    else
     9355      continue
     9356    fi
     9357    # Extract the definition of DEPDIR, am__include, and am__quote
     9358    # from the Makefile without running `make'.
     9359    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     9360    test -z "$DEPDIR" && continue
     9361    am__include=`sed -n 's/^am__include = //p' < "$mf"`
     9362    test -z "am__include" && continue
     9363    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
     9364    # When using ansi2knr, U may be empty or an underscore; expand it
     9365    U=`sed -n 's/^U = //p' < "$mf"`
     9366    # Find all dependency output files, they are included files with
     9367    # $(DEPDIR) in their names.  We invoke sed twice because it is the
     9368    # simplest approach to changing $(DEPDIR) to its actual value in the
     9369    # expansion.
     9370    for file in `sed -n "
     9371      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
     9372        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
     9373      # Make sure the directory exists.
     9374      test -f "$dirpart/$file" && continue
     9375      fdir=`$as_dirname -- "$file" ||
    85249376$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    85259377         X"$file" : 'X\(//\)[^/]' \| \
     
    85449396          }
    85459397          s/.*/./; q'`
    8546     { as_dir=$dirpart/$fdir
     9398      { as_dir=$dirpart/$fdir
    85479399  case $as_dir in #(
    85489400  -*) as_dir=./$as_dir;;
     
    85859437echo "$as_me: error: cannot create directory $as_dir" >&2;}
    85869438   { (exit 1); exit 1; }; }; }
    8587     # echo "creating $dirpart/$file"
    8588     echo '# dummy' > "$dirpart/$file"
     9439      # echo "creating $dirpart/$file"
     9440      echo '# dummy' > "$dirpart/$file"
     9441    done
    85899442  done
    8590 done
     9443}
    85919444 ;;
    85929445
  • issm/trunk/configure.ac

    r1 r1439  
    44AM_INIT_AUTOMAKE
    55AC_PROG_RANLIB
    6 AC_PROG_CC
    7 AC_PROG_CXX
    8 AC_PROG_F77([ifort g77])
     6AC_PROG_CC([gcc icl])
     7AC_PROG_CPP
     8AC_PROG_CXX([g++ icl])
     9AC_PROG_F77([ifort g77 gfortran])
    910AC_F77_LIBRARY_LDFLAGS
    1011AM_PROG_CC_C_O
  • issm/trunk/etc/environment.csh

    r1351 r1439  
    8686setenv AUTOMAKE_DIR
    8787setenv PATH {$PATH}:{$AUTOMAKE_DIR}/bin
     88
     89#BORLAND
     90setenv BORLAND_DIR
     91setenv PATH {$PATH}:{$BORLAND_DIR}/Bin
     92
  • issm/trunk/etc/environment.sh

    r1351 r1439  
    8989PATH="$PATH:$AUTOMAKE_DIR/bin"
    9090
     91#BORLAND
     92export BORLAND_DIR
     93PATH="$PATH:$BORLAND_DIR/Bin"
    9194
     95#INTEL
     96export INTEL_DIR
     97PATH="$PATH:$INTEL_DIR"
     98
     99#SDK
     100export SDK_DIR
     101PATH="$PATH:$SDK_DIR"
  • issm/trunk/etc/environment_variables.csh

    r1362 r1439  
    6363#autoconf
    6464set AUTOCONF_DIR={$ISSM_DIR}/devpackages/autoconf/install
     65
     66#borland
     67set BORLAND_DIR=/cygdrive/c/Borland
  • issm/trunk/etc/environment_variables.sh

    r1362 r1439  
    77
    88#MATLAB
    9 MATLAB_DIR=/usr/local/pkgs/matlab-7.6/
     9MATLAB_DIR=C:/MATLAB/R2009a/
    1010
    1111#MPI
     
    7171#autoconf
    7272AUTOCONF_DIR="$ISSM_DIR/devpackages/autoconf/install"
     73
     74#borland
     75#BORLAND_DIR="/cygdrive/c/Borland/"
     76
     77#intel
     78INTEL_DIR="C:/IntelInstall/Compiler/11.1/038/bin/ia32/"
     79
     80#sdk
     81SDK_DIR="C:/MicrosoftVisualStudio 9.0/Microsoft Visual C++ 2008 Express Edition with SP1 - ENU"
     82
  • issm/trunk/m4/issm_options.m4

    r1382 r1439  
    5151                MATLABINCL=-I"$MATLAB_ROOT/extern/include";
    5252                dnl  use matlab provided mexext routine to test for extension
    53                 MEXEXT=`$MATLAB_ROOT/bin/mexext`
    54                 MEXEXT=".$MEXEXT"
     53                               
    5554                MEX=$MATLAB_ROOT/bin/mex
    5655
     
    6665                                MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnx86/mexFunction.map";
    6766                        fi
     67                        MEXEXT=`$MATLAB_ROOT/bin/mexext`
     68                        MEXEXT=".$MEXEXT"
    6869                        ;;
    6970                        *darwin9.6.0*)
    7071                        MEXLIB=-L"$MATLAB_ROOT/bin/maci/ -lmex -lmx"
    7172                        MEXLINK="-Wl,-twolevel_namespace -undefined error -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci/mexFunction.map"
     73                        MEXEXT=`$MATLAB_ROOT/bin/mexext`
     74                        MEXEXT=".$MEXEXT"
     75                        ;;
     76                        *cygwin*)
     77                        MEXLIB="-dll -export:mexFunction -LIBPATH:\"$MATLAB_ROOT\extern\lib\win32\microsoft\" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  -NOLOGO -INCREMENTAL:NO"
     78
     79
     80                        MEXEXT=`$MATLAB_ROOT/bin/mexext.bat`
     81                        MEXEXT=".$MEXEXT"
    7282                        ;;
    7383
     
    176186                dnl defaults
    177187                HAVE_METIS=yes
     188               
     189                case "${host_os}" in
     190                        *cygwin*)
     191                        METISLIB="-LIBPATH:\"$METIS_ROOT\" libmetis.lib"
     192                        ;;
     193                        *linux*)
     194                        METISLIB=-L"$METIS_ROOT/ -lmetis"
     195                        ;;
     196                        *darwin9.6.0*)
     197                        METISLIB=-L"$METIS_ROOT/ -lmetis"
     198                        ;;
     199                esac
     200                                                 
    178201                METISINCL=-I"$METIS_ROOT/Lib"
    179                 METISLIB=-L"$METIS_ROOT/ -lmetis"
    180202
    181203                AC_DEFINE([_HAVE_METIS_],[1],[with Metis in ISSM src])
     
    256278               
    257279                        PETSCINCL="-I$PETSC_ROOT/include  -I$PETSC_ROOT/ -I$PETSC_ROOT/bmake/$PETSC_ARCH -I$PETSC_ROOT/src/mat/impls/dense/mpi/plapack/"
    258                         PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     280               
     281                        case "${host_os}" in
     282                                *cygwin*)
     283                                PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetsc.lib  libpetscsnes.lib libpetscts.lib libmpiuni.lib"
     284                                ;;
     285                                *linux*)
     286                                PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     287                                ;;
     288                                *darwin9.6.0*)
     289                                PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     290                                ;;
     291                        esac
    259292                                                 
    260293
     
    273306
    274307        if test $HAVE_PETSC = no; then
    275                 if test "$PARALLEL_VALUE" = "yes" ; then
    276                         AC_MSG_ERROR([could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM in paralle!])
    277                 fi
     308                AC_MSG_ERROR([could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM!])
    278309        else
    279310                AC_MSG_RESULT($HAVE_PETSC)
    280311        fi
    281312
     313        dnl: when running in serial mode, MPI must be ignored, and set to internal petsc mpiuni:
     314        if test "$PARALLEL_VALUE" = "no" ; then
     315                HAVE_MPI=yes
     316                MPIINCL=-I"$PETSC_ROOT/include/mpiuni"
     317
     318                case "${host_os}" in
     319                        *cygwin*)
     320                        MPILIB="-link -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
     321                        ;;
     322                        *linux*)
     323                        MPILIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
     324                        ;;
     325                        *darwin9.6.0*)
     326                        MPILIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
     327                        ;;
     328                esac
     329                                                                 
     330
     331
     332                       
     333                AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
     334                AC_DEFINE([HAVE_MPI],[1],[with Mpi in ISSM src])
     335                AC_SUBST([MPIINCL])
     336                AC_SUBST([MPILIB])
     337        fi
     338       
    282339
    283340        dnl Slepc directory
     
    338395                HAVE_BLASLAPACK=yes
    339396                BLASLAPACKINCL=""
    340                 dnl BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lmkl_lapack -lmkl -lguide"
    341                 BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     397               
     398                dnl: branch on whether we are running on windows or linux.
     399                case "${host_os}" in
     400                        *cygwin*)
     401                        BLASLAPACKLIB="-link -LIBPATH:\"$BLASLAPACK_ROOT\" libf2cblas.lib  libf2clapack.lib"
     402                        ;;
     403                        *linux*)
     404                        BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     405                        ;;
     406                        *darwin9.6.0*)
     407                        BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     408                        ;;
     409                esac
     410                                                                 
     411
    342412
    343413                AC_DEFINE([_HAVE_BLASLAPACK_],[1],[with blas lapack in ISSM src])
     
    489559        AC_MSG_RESULT(done)
    490560
     561        dnl vendor?
     562        AC_ARG_WITH([vendor],
     563                          AS_HELP_STRING([--with-vendor = VENDOR], [vendor name, ex: intel]),
     564                         [VENDOR=$withval],[VENDOR=""])
     565        AC_MSG_CHECKING(for vendor compilers )
     566        if test -n "$VENDOR"; then
     567
     568                if  test $VENDOR = intel; then
     569                        export CC=icl
     570                        export CXX=icl
     571                        export CXXFLAGS="-DWIN32 -D_INTEL_"
     572                else
     573                AC_MSG_ERROR([unknow compiler vendor!])
     574                fi
     575        fi
     576
    491577])
  • issm/trunk/m4/matlab.m4

    r1 r1439  
    289289                                break
    290290                        fi
     291                               
     292                                # For Matlab R2008 and more, the version number is stored in bin/util/mex/version.txt
     293                        ax_cv_matlab_version=`cat $MATLAB/bin/util/mex/version.txt`
     294                        if test -n "$ax_cv_matlab_version" ; then
     295                                break
     296                        fi
     297
    291298                fi
    292299        done
     
    305312    MATLAB_MINOR=`echo $MATLAB_VERSION | sed -e 's/^@<:@0-9@:>@*\.\(@<:@0-9@:>@*\).*/\1/'`
    306313    ;;
     314  R2009a)
     315        MATLAB_VERSION=R2009a
     316    MATLAB_MAJOR=R2009
     317    MATLAB_MINOR=a
     318        ;;
    307319  *)
    308320    if test x$ax_enable_matlab = xyes ; then
  • issm/trunk/src/c/HoleFillerx/HoleFillerCrippen.c

    r1 r1439  
    2121#include <stdlib.h>
    2222#include <math.h>
     23
     24
    2325#include <time.h>
    2426#include <string.h>
  • issm/trunk/src/c/InterpFromGridx/InterpFromGridx.cpp

    r1174 r1439  
    115115
    116116                        /*Treat NANs*/
    117                         if isnan(data_value){
     117                        if (isnan(data_value)){
    118118                                data_value=default_value;
    119119                        }
  • issm/trunk/src/c/InterpFromMesh2dx/InterpFromMesh2dx.cpp

    r1248 r1439  
    3030
    3131        /*Set debug to 1 if there are lots of elements*/
    32         debug=(bool)((double)nels_data*(double)nods_prime >= pow(10,9));
     32        debug=(bool)((double)nels_data*(double)nods_prime >= pow((double)10,(double)9));
    3333
    3434        /*figure out what kind of interpolation is needed*/
     
    6161
    6262                /*display current iteration*/
    63                 if (debug && fmod(i,100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100);
     63                if (debug && fmod((double)i,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100);
    6464
    6565                /*if there is no point inside the domain, go to next iteration*/
     
    9999                                        data_value=data[i];
    100100                                }
    101                                 if isnan(data_value) data_value=default_value;
     101                                if (isnan(data_value)) data_value=default_value;
    102102
    103103                                /*insert value and go to the next point*/
  • issm/trunk/src/c/InterpFromMesh3dx/InterpFromMesh3dx.cpp

    r1248 r1439  
    3131
    3232        /*Set debug to 1 if there are lots of elements*/
    33         debug=(bool)((double)nels_data*(double)nods_prime >= pow(10,9));
     33        debug=(bool)((double)nels_data*(double)nods_prime >= pow((double)10,(double)9));
    3434
    3535        /*figure out what kind of interpolation is needed*/
     
    6262
    6363                /*display current iteration*/
    64                 if (debug && fmod(i,100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100);
     64                if (debug && fmod((double)i,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100);
    6565
    6666                /*if there is no point inside the domain, go to next iteration*/
     
    108108                                                data_value=data[i];
    109109                                        }
    110                                         if isnan(data_value) data_value=default_value;
     110                                        if (isnan(data_value)) data_value=default_value;
    111111
    112112                                        /*insert value and go to the next point*/
  • issm/trunk/src/c/Makefile.am

    r1380 r1439  
    8585                                        ./shared/Dofs/DistributeNumDofs.cpp\
    8686                                        ./shared/Numerics/numerics.h\
     87                                        ./shared/Numerics/isnan.h\
     88                                        ./shared/Numerics/isnan.cpp\
    8789                                        ./shared/Numerics/GaussPoints.h\
    8890                                        ./shared/Numerics/cross.cpp\
     
    290292
    291293
    292 libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -ansi -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_ -m32
     294libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -ansi -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_
    293295if LARGEARRAYS
    294296libISSM_a_CXXFLAGS += -D__GCC4BUILD__ 
     
    594596endif
    595597
    596 
    597 #this compilation order works for linux
    598 #LDADD = ./libpISSM.a $(METISLIB) $(PETSCLIB) $(DAKOTALIB) $(SLEPCLIB) $(MUMPSLIB) $(PLAPACKLIB)  $(MPILIB) $(X_LIBS) $(BLASLAPACKLIB) $(MKLLIB) $(SCALAPACKLIB) $(BLACSLIB) $(FLIBS) $(GRAPHICSLIB)
    599 
    600 #this compilation order works  for mac
    601 LDADD = $(TRIANGLELIB)  $(PETSCLIB)  ../c/libpISSM.a  $(METISLIB) $(FLIBS)  $(PLAPACKLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MUMPSLIB) $(BLACSLIB) $(DAKOTALIB) $(X_LIBS) $(SLEPCLIB)  $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB)
     598LDADD = ./libpISSM.a $(METISLIB) $(PETSCLIB) $(DAKOTALIB) $(SLEPCLIB) $(MUMPSLIB) $(PLAPACKLIB)  $(MPILIB) $(X_LIBS) -lX11 $(BLASLAPACKLIB) $(MKLLIB) $(SCALAPACKLIB) $(BLACSLIB) $(FLIBS)
    602599
    603600diagnostic_exe_SOURCES = parallel/diagnostic.cpp
  • issm/trunk/src/c/io/WriteNodeSets.cpp

    r304 r1439  
    2828        int fsize=0;
    2929        int ssize=0;
    30         mwSize nfields=9;
     30        const mwSize nfields=9;
    3131        const   char*   fnames[nfields];
    3232        mwSize          onebyone[2] = {1,1};
  • issm/trunk/src/c/objects/Beam.cpp

    r1188 r1439  
    408408
    409409                //compute ub
    410                 constant_part=-1.58*pow(10.0,-10.0)*rho_ice*gravity*h[0];
     410                constant_part=-1.58*pow((double)10.0,-(double)10.0)*rho_ice*gravity*h[0];
    411411                ub=constant_part*slope[0];
    412412                vb=constant_part*slope[1];
  • issm/trunk/src/c/objects/Friction.cpp

    r483 r1439  
    6767        /*diverse: */
    6868        int     i;
    69         int     numgrids=3;
     69        const int     numgrids=3;
    7070        double  Neff[numgrids];
    7171        double  r,s;
     
    118118        /*diverse: */
    119119        int     i;
    120         int     numgrids=3;
     120        const int     numgrids=3;
    121121        double  Neff[numgrids];
    122122        double  r,s;
  • issm/trunk/src/c/objects/Icefront.cpp

    r803 r1439  
    10721072                //Get the coordinates of gauss point for each triangle in penta/quad
    10731073                r_tria=gauss_coord[1]-gauss_coord[0];
    1074                 s_tria=-3/sqrt(3)*(gauss_coord[0]+gauss_coord[1]-2/3);
     1074                s_tria=-3/sqrt((double)3)*(gauss_coord[0]+gauss_coord[1]-2/3);
    10751075
    10761076                //Coordinates of gauss points in the reference triangle
    10771077                r_quad[0]=r_tria;
    1078                 s_quad[0]=1/sqrt(3)*s_tria-2/3;
    1079                 r_quad[1]=-1/sqrt(3)*s_tria+2/3;
     1078                s_quad[0]=1/sqrt((double)3)*s_tria-2/3;
     1079                r_quad[1]=-1/sqrt((double)3)*s_tria+2/3;
    10801080                s_quad[1]=r_tria;
    10811081                r_quad[2]=-r_tria;
    1082                 s_quad[2]=-1/sqrt(3)*s_tria+2/3;
    1083                 r_quad[3]=1/sqrt(3)*s_tria-2/3;
     1082                s_quad[2]=-1/sqrt((double)3)*s_tria+2/3;
     1083                r_quad[3]=1/sqrt((double)3)*s_tria-2/3;
    10841084                s_quad[3]=-r_tria;
    10851085
     
    13241324                //Get the coordinates of gauss point for each triangle in penta/quad
    13251325                r_tria=gauss_coord[1]-gauss_coord[0];
    1326                 s_tria=-3/sqrt(3)*(gauss_coord[0]+gauss_coord[1]-2/3);
     1326                s_tria=-3/sqrt((double)3)*(gauss_coord[0]+gauss_coord[1]-2/3);
    13271327
    13281328                //Coordinates of gauss points in the reference triangle
    13291329                r_quad[0]=r_tria;
    1330                 s_quad[0]=1/sqrt(3)*s_tria-2/3;
    1331                 r_quad[1]=-1/sqrt(3)*s_tria+2/3;
     1330                s_quad[0]=1/sqrt((double)3)*s_tria-2/3;
     1331                r_quad[1]=-1/sqrt((double)3)*s_tria+2/3;
    13321332                s_quad[1]=r_tria;
    13331333                r_quad[2]=-r_tria;
    1334                 s_quad[2]=-1/sqrt(3)*s_tria+2/3;
    1335                 r_quad[3]=1/sqrt(3)*s_tria-2/3;
     1334                s_quad[2]=-1/sqrt((double)3)*s_tria+2/3;
     1335                r_quad[3]=1/sqrt((double)3)*s_tria-2/3;
    13361336                s_quad[3]=-r_tria;
    13371337
  • issm/trunk/src/c/objects/Matice.cpp

    r1051 r1439  
    161161        else{
    162162                if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){
    163                         viscosity=pow(10,14);
     163                        viscosity=pow((double)10,(double)14);
    164164                }
    165165                else{
     
    173173                        if(A==0){
    174174                                /*Maxiviscositym viscosity for 0 shear areas: */
    175                                 viscosity=4.5*pow(10,17);
     175                                viscosity=4.5*pow((double)10,(double)17);
    176176                        }
    177177                        else{
     
    229229                if(A==0){
    230230                        /*Maximum viscosity_complement for 0 shear areas: */
    231                         viscosity_complement=4.5*pow(10,17);
     231                        viscosity_complement=4.5*pow((double)10,(double)17);
    232232                }
    233233                else{
     
    238238        }
    239239        else{
    240                 viscosity_complement=4.5*pow(10,17);
     240                viscosity_complement=4.5*pow((double)10,(double)17);
    241241        }
    242242               
     
    282282                if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) &&
    283283                                (epsilon[3]==0) && (epsilon[4]==0)){
    284                         viscosity3d=pow(10,14);
     284                        viscosity3d=pow((double)10,(double)14);
    285285                }
    286286                else{
     
    297297                        if(A==0){
    298298                                /*Maxiviscosity3dm viscosity for 0 shear areas: */
    299                                 viscosity3d=4.5*pow(10,17);
     299                                viscosity3d=4.5*pow((double)10,(double)17);
    300300                        }
    301301                        else{
     
    341341        double eps0;
    342342
    343         eps0=pow(10,-27);
     343        eps0=pow((double)10,(double)-27);
    344344       
    345345        if (n==1){
     
    350350                if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) &&
    351351                                (epsilon[3]==0) && (epsilon[4]==0) && (epsilon[5]==0)){
    352                         viscosity3d=pow(10,14);
     352                        viscosity3d=pow((double)10,(double)14);
    353353                }
    354354                else{
     
    366366                        if(A==0){
    367367                                /*Maxiviscosity3dm viscosity for 0 shear areas: */
    368                                 viscosity3d=4.5*pow(10,17);
     368                                viscosity3d=4.5*pow((double)10,(double)17);
    369369                        }
    370370                        else{
  • issm/trunk/src/c/objects/Pengrid.cpp

    r927 r1439  
    267267
    268268        //Create elementary matrix: add penalty to contrain wb (wb=ub*db/dx+vb*db/dy)
    269         Ke[2][0]=-slope[0]*kmax*pow(10.0,penalty_offset);
    270         Ke[2][1]=-slope[1]*kmax*pow(10.0,penalty_offset);
    271         Ke[2][2]=kmax*pow(10,penalty_offset);
     269        Ke[2][0]=-slope[0]*kmax*pow((double)10.0,penalty_offset);
     270        Ke[2][1]=-slope[1]*kmax*pow((double)10.0,penalty_offset);
     271        Ke[2][2]=kmax*pow((double)10,penalty_offset);
    272272       
    273273        /*Add Ke to global matrix Kgg: */
     
    299299        GetDofList(&doflist[0],&numberofdofspernode);
    300300
    301         Ke[0][0]=kmax*pow(10,penalty_offset);
     301        Ke[0][0]=kmax*pow((double)10,penalty_offset);
    302302       
    303303        /*Add Ke to global matrix Kgg: */
     
    348348        //Add penalty load
    349349        if (temperature<t_pmp){ //If T<Tpmp, there must be no melting. Therefore, melting should be  constrained to 0 when T<Tpmp, instead of using spcs, use penalties
    350                 Ke[0][0]=kmax*pow(10,penalty_offset);
     350                Ke[0][0]=kmax*pow((double)10,penalty_offset);
    351351        }
    352352       
     
    435435
    436436        //Add penalty load
    437         P_terms[0]=kmax*pow(10,penalty_offset)*t_pmp;
     437        P_terms[0]=kmax*pow((double)10,penalty_offset)*t_pmp;
    438438
    439439        /*Add P_terms to global vector pg: */
     
    501501        else{
    502502                if (sub_analysis_type==SteadyAnalysisEnum()){
    503                         P_terms[0]=melting_offset*pow(10,penalty_offset)*(temperature-t_pmp);
     503                        P_terms[0]=melting_offset*pow((double)10,penalty_offset)*(temperature-t_pmp);
    504504                }
    505505                else{
    506                         P_terms[0]=melting_offset*pow(10,penalty_offset)*(temperature-t_pmp)/dt;
     506                        P_terms[0]=melting_offset*pow((double)10,penalty_offset)*(temperature-t_pmp)/dt;
    507507                }
    508508        }
  • issm/trunk/src/c/objects/Penta.cpp

    r1313 r1439  
    774774        int i,j;
    775775
    776         int numgrids=6;
    777         int DOFPERGRID=4;
    778         int numdof=numgrids*DOFPERGRID;
     776        const int numgrids=6;
     777        const int DOFPERGRID=4;
     778        const int numdof=numgrids*DOFPERGRID;
    779779        int doflist[numdof];
    780780        int numberofdofspernode;
    781781
    782         int numgrids2d=3;
    783         int numdof2d=numgrids2d*DOFPERGRID;
     782        const int numgrids2d=3;
     783        const int numdof2d=numgrids2d*DOFPERGRID;
    784784
    785785        int   dofs[3]={0,1,2};
     
    25642564        int i,j;
    25652565
    2566         int numgrids=6;
    2567         int DOFVELOCITY=3;
     2566        const int numgrids=6;
     2567        const int DOFVELOCITY=3;
    25682568        double B[8][27];
    25692569        double B_reduced[numgrids][DOFVELOCITY*numgrids];
     
    26162616       
    26172617        int i;
    2618         int calculationdof=3;
    2619         int numgrids=6;
     2618        const int calculationdof=3;
     2619        const int numgrids=6;
    26202620        int DOFPERGRID=4;
    26212621
     
    26982698
    26992699        int i;
    2700         int calculationdof=3;
    2701         int numgrids=6;
     2700        const int calculationdof=3;
     2701        const int numgrids=6;
    27022702        int DOFPERGRID=4;
    27032703
     
    27842784
    27852785        int i;
    2786         int numgrids2d=3;
     2786        const int numgrids2d=3;
    27872787        int num_dof=4;
    27882788
     
    28912891
    28922892        int i;
    2893         int numgrids2d=3;
     2893        const int numgrids2d=3;
    28942894        int num_dof=4;
    28952895
     
    29832983        int i;
    29842984
    2985         int numgrids=7;
     2985        const  int numgrids=7;
    29862986        double dh1dh7_param[3][numgrids];
    29872987        double Jinv[3][3];
     
    30683068        int i,j;
    30693069
    3070         int numgrids=6;
    3071         int DOFPERGRID=4;
    3072         int numdof=numgrids*DOFPERGRID;
    3073         int numgrids2d=3;
     3070        const int numgrids=6;
     3071        const int DOFPERGRID=4;
     3072        const int numdof=numgrids*DOFPERGRID;
     3073        const int numgrids2d=3;
    30743074        int numdof2d=numgrids2d*DOFPERGRID;
    30753075        int doflist[numdof];
     
    36033603       
    36043604        int i;
    3605         int calculationdof=3;
    3606         int numgrids=6;
     3605        const int calculationdof=3;
     3606        const int numgrids=6;
    36073607        int DOFPERGRID=1;
    36083608
     
    36723672       
    36733673        int i;
    3674         int calculationdof=3;
    3675         int numgrids=6;
     3674        const int calculationdof=3;
     3675        const int numgrids=6;
    36763676        int DOFPERGRID=1;
    36773677
  • issm/trunk/src/c/objects/Sing.cpp

    r1188 r1439  
    312312        B=matice->GetB();
    313313
    314         ub=-1.58*pow(10.0,-10.0)*rho_ice*gravity*h*slope[0];
    315         vb=-1.58*pow(10.0,-10.0)*rho_ice*gravity*h*slope[1];
     314        ub=-1.58*pow((double)10.0,(double)-10.0)*rho_ice*gravity*h*slope[0];
     315        vb=-1.58*pow((double)10.0,(double)-10.0)*rho_ice*gravity*h*slope[1];
    316316
    317317        //compute constant_part
  • issm/trunk/src/c/objects/Tria.cpp

    r1242 r1439  
    655655                v_gauss[1]=1.0/3.0*(vxvy_list[0][1]+vxvy_list[1][1]+vxvy_list[2][1]);
    656656               
    657                 K[0][0]=pow(Jdettria,.5)/2.0*fabs(v_gauss[0]);
    658                 K[1][1]=pow(Jdettria,.5)/2.0*fabs(v_gauss[1]);
     657                K[0][0]=pow(Jdettria,(double).5)/2.0*fabs(v_gauss[0]);
     658                K[1][1]=pow(Jdettria,(double).5)/2.0*fabs(v_gauss[1]);
    659659        }
    660660
     
    10161016
    10171017                if (slope_magnitude>MAXSLOPE){
    1018                         alpha2_list[0]=pow(10,MOUNTAINKEXPONENT);
    1019                         alpha2_list[1]=pow(10,MOUNTAINKEXPONENT);
    1020                         alpha2_list[2]=pow(10,MOUNTAINKEXPONENT);
     1018                        alpha2_list[0]=pow((double)10,MOUNTAINKEXPONENT);
     1019                        alpha2_list[1]=pow((double)10,MOUNTAINKEXPONENT);
     1020                        alpha2_list[2]=pow((double)10,MOUNTAINKEXPONENT);
    10211021                }
    10221022
     
    26622662        normal[2]=v13[0]*v23[1]-v13[1]*v23[0];
    26632663
    2664         normal_norm=sqrt( pow(normal[0],2)+pow(normal[1],2)+pow(normal[2],2) );
     2664        normal_norm=sqrt( pow(normal[0],(double)2)+pow(normal[1],(double)2)+pow(normal[2],(double)2) );
    26652665
    26662666        *(surface_normal)=normal[0]/normal_norm;
     
    29032903                /*We are using an absolute misfit: */
    29042904                for (i=0;i<numgrids;i++){
    2905                         absolute_list[i]=0.5*(pow((vx_list[i]-obs_vx_list[i]),2)+pow((vy_list[i]-obs_vy_list[i]),2));
     2905                        absolute_list[i]=0.5*(pow((vx_list[i]-obs_vx_list[i]),(double)2)+pow((vy_list[i]-obs_vy_list[i]),(double)2));
    29062906                }
    29072907        }
     
    29092909                /*We are using a relative misfit: */
    29102910                for (i=0;i<numgrids;i++){
    2911                         scalex=pow(meanvel/(obs_vx_list[i]+epsvel),2);
    2912                         scaley=pow(meanvel/(obs_vy_list[i]+epsvel),2);
     2911                        scalex=pow(meanvel/(obs_vx_list[i]+epsvel),(double)2);
     2912                        scaley=pow(meanvel/(obs_vy_list[i]+epsvel),(double)2);
    29132913                        if(obs_vx_list[i]==0)scalex=0;
    29142914                        if(obs_vy_list[i]==0)scaley=0;
     
    29192919                /*We are using a logarithmic misfit: */
    29202920                for (i=0;i<numgrids;i++){
    2921                         velocity_mag=sqrt(pow(vx_list[i],2)+pow(vy_list[i],2))+epsvel; //epsvel to avoid velocity being nil.
    2922                         obs_velocity_mag=sqrt(pow(obs_vx_list[i],2)+pow(obs_vy_list[i],2))+epsvel; //epsvel to avoid observed velocity being nil.
    2923                         logarithmic_list[i]=4*pow(meanvel,2)*pow(log(velocity_mag/obs_velocity_mag),2);
     2921                        velocity_mag=sqrt(pow(vx_list[i],(double)2)+pow(vy_list[i],(double)2))+epsvel; //epsvel to avoid velocity being nil.
     2922                        obs_velocity_mag=sqrt(pow(obs_vx_list[i],(double)2)+pow(obs_vy_list[i],(double)2))+epsvel; //epsvel to avoid observed velocity being nil.
     2923                        logarithmic_list[i]=4*pow(meanvel,(double)2)*pow(log(velocity_mag/obs_velocity_mag),(double)2);
    29242924                }
    29252925        }
     
    31003100        normal[2]=(x4-x6)*(y5-y6)-(y4-y6)*(x5-x6);
    31013101
    3102         norm_normal=sqrt(pow(normal[0],2)+pow(normal[1],2)+pow(normal[2],2));
     3102        norm_normal=sqrt(pow(normal[0],(double)2)+pow(normal[1],(double)2)+pow(normal[2],(double)2));
    31033103        nz=1.0/norm_normal*normal[2];
    31043104
     
    36843684        /* Compute basal friction */
    36853685        for(i=0;i<numgrids;i++){
    3686                 basalfriction_list[i]= alpha2_list[i]*(pow(vx_list[i],2.0)+pow(vy_list[i],2.0));
     3686                basalfriction_list[i]= alpha2_list[i]*(pow(vx_list[i],(double)2.0)+pow(vy_list[i],(double)2.0));
    36873687        }
    36883688       
  • issm/trunk/src/c/shared/Elements/Paterson.cpp

    r890 r1439  
    88#define __FUNCT__ "Paterson"
    99#include <math.h>
     10
     11
    1012double Paterson(double temperature){
    1113       
     
    3133
    3234        if(T<=-45.0){
    33                 B=pow(10,8)*(-0.000292866376675*pow(T+50,3)+ 0.011672640664130*pow(T+50,2)  -0.325004442485481*(T+50)+  6.524779401948101);
     35                B=pow((double)10,(double)8)*(-0.000292866376675*pow(T+50,3)+ 0.011672640664130*pow(T+50,2)  -0.325004442485481*(T+50)+  6.524779401948101);
    3436        }
    3537        if((T>=-45.0) && (T<=-40.0)){
    36                 B=pow(10,8)*(-0.000292866376675*pow(T+45,3)+ 0.007279645014004*pow(T+45,2)  -0.230243014094813*(T+45)+  5.154964909039554);
     38                B=pow((double)10,(double)8)*(-0.000292866376675*pow(T+45,3)+ 0.007279645014004*pow(T+45,2)  -0.230243014094813*(T+45)+  5.154964909039554);
    3739        }
    3840        if((T>=-40.0) && (T<=-35.0)){
    39                 B=pow(10,8)*(0.000072737147457*pow(T+40,3)+  0.002886649363879*pow(T+40,2)  -0.179411542205399*(T+40)+  4.149132666831214);
     41                B=pow((double)10,(double)8)*(0.000072737147457*pow(T+40,3)+  0.002886649363879*pow(T+40,2)  -0.179411542205399*(T+40)+  4.149132666831214);
    4042        }
    4143        if((T>=-35.0) && (T<=-30.0)){
    42                 B=pow(10,8)*(-0.000086144770023*pow(T+35,3)+ 0.003977706575736*pow(T+35,2)  -0.145089762507325*(T+35)+  3.333333333333331);
     44                B=pow((double)10,(double)8)*(-0.000086144770023*pow(T+35,3)+ 0.003977706575736*pow(T+35,2)  -0.145089762507325*(T+35)+  3.333333333333331);
    4345        }
    4446        if((T>=-30.0) && (T<=-25.0)){
    45                 B=pow(10,8)*(-0.000043984685769*pow(T+30,3)+ 0.002685535025386*pow(T+30,2)  -0.111773554501713*(T+30)+  2.696559088937191);
     47                B=pow((double)10,(double)8)*(-0.000043984685769*pow(T+30,3)+ 0.002685535025386*pow(T+30,2)  -0.111773554501713*(T+30)+  2.696559088937191);
    4648        }
    4749        if((T>=-25.0) && (T<=-20.0)){
    48                 B=pow(10,8)*(-0.000029799523463*pow(T+25,3)+ 0.002025764738854*pow(T+25,2)  -0.088217055680511*(T+25)+  2.199331606342181);
     50                B=pow((double)10,(double)8)*(-0.000029799523463*pow(T+25,3)+ 0.002025764738854*pow(T+25,2)  -0.088217055680511*(T+25)+  2.199331606342181);
    4951        }
    5052        if((T>=-20.0) && (T<=-15.0)){
    51                 B=pow(10,8)*(0.000136920904777*pow(T+20,3)+  0.001578771886910*pow(T+20,2)  -0.070194372551690*(T+20)+  1.805165505978111);
     53                B=pow((double)10,(double)8)*(0.000136920904777*pow(T+20,3)+  0.001578771886910*pow(T+20,2)  -0.070194372551690*(T+20)+  1.805165505978111);
    5254        }
    5355        if((T>=-15.0) && (T<=-10.0)){
    54                 B=pow(10,8)*(-0.000899763781026*pow(T+15,3)+ 0.003632585458564*pow(T+15,2)  -0.044137585824322*(T+15)+  1.510778053489523);
     56                B=pow((double)10,(double)8)*(-0.000899763781026*pow(T+15,3)+ 0.003632585458564*pow(T+15,2)  -0.044137585824322*(T+15)+  1.510778053489523);
    5557        }
    5658        if((T>=-10.0) && (T<=-5.0)){
    57                 B=pow(10,8)*(0.001676964325070*pow(T+10,3)-  0.009863871256831*pow(T+10,2)  -0.075294014815659*(T+10)+  1.268434288203714);
     59                B=pow((double)10,(double)8)*(0.001676964325070*pow(T+10,3)-  0.009863871256831*pow(T+10,2)  -0.075294014815659*(T+10)+  1.268434288203714);
    5860        }
    5961        if((T>=-5.0) && (T<=-2.0)){
    60                 B=pow(10,8)*(-0.003748937622487*pow(T+5,3)+0.015290593619213*pow(T+5,2)  -0.048160403003748*(T+5)+  0.854987973338348);
     62                B=pow((double)10,(double)8)*(-0.003748937622487*pow(T+5,3)+0.015290593619213*pow(T+5,2)  -0.048160403003748*(T+5)+  0.854987973338348);
    6163        }
    6264        if(T>=-2.0){
    63                 B=pow(10,8)*(-0.003748937622488*pow(T+2,3)-0.018449844983174*pow(T+2,2)  -0.057638157095631*(T+2)+  0.746900791092860);
     65                B=pow((double)10,(double)8)*(-0.003748937622488*pow(T+2,3)-0.018449844983174*pow(T+2,2)  -0.057638157095631*(T+2)+  0.746900791092860);
    6466        }
    6567
  • issm/trunk/src/c/shared/Exp/IsInPolySerial.cpp

    r1 r1439  
    44
    55#include <math.h>
     6
     7
    68#include "./exp.h"
    79
  • issm/trunk/src/c/shared/Matlab/PrintfFunction.cpp

    r1 r1439  
    66#include "stdarg.h"
    77#include "stdio.h"
     8
     9#ifdef _SERIAL_
     10#include "mex.h"
     11#endif
    812
    913int PrintfFunction(char* format,...){
     
    2024        //First use vsprintf to get the whole input string.
    2125        va_start(ap,format);
     26         #ifndef WIN32
    2227        string_size=vsprintf(string,format,ap); //printf style coding
     28        #else
     29        string_size=vsprintf_s(string,format,ap); //printf style coding
     30        #endif
    2331        va_end(ap);
    2432
     
    2735                if(my_rank==0)printf(string);
    2836        #else
    29                 printf(string);
     37                mexPrintf(string);
    3038        #endif
     39
     40        return 1;
    3141}
    3242
  • issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp

    r1 r1439  
    3939#include <stdio.h>
    4040#include <sys/types.h>
    41 #include <math.h>     /*  fabs  */
     41#include <math.h>
    4242#include <float.h>    /*  DBL_EPSILON  */
    4343
     
    197197        if (ntrma != ntrmb) {
    198198                _printf_("%s -- Matrix A and B inner vectors not equal size.\n",
    199                                  __func__);
     199                                 __FUNCT__);
    200200            noerr=0;   
    201201                return noerr;
     
    275275        if (!b && nvec) {
    276276                _printf_("%s -- No right-hand side for nvec=%d.\n",
    277                                  __func__,nvec);
     277                                 __FUNCT__,nvec);
    278278                noerr=0;
    279279                return noerr;
     
    310310                        xfree((void **)&pindx);
    311311                        _printf_("%s -- Pivot %f less than machine epsilon.\n",
    312                                          __func__,pivot);
     312                                         __FUNCT__,pivot);
    313313                        noerr=0;
    314314                        return noerr;
  • issm/trunk/src/c/shared/Numerics/GaussPoints.cpp

    r99 r1439  
    99#include <math.h>
    1010#include <float.h>
     11
    1112
    1213/*=======1=========2=========3=========4=========5=========6=========7=========8
  • issm/trunk/src/c/shared/Numerics/norm.cpp

    r99 r1439  
    99#endif
    1010
    11 #include "math.h"
     11#include <math.h>
     12
    1213
    1314double norm(double* vector){
  • issm/trunk/src/c/shared/Numerics/numerics.h

    r465 r1439  
    77
    88#include "./GaussPoints.h"
     9#include "./isnan.h"
    910#include "../../objects/objects.h"
    1011
  • issm/trunk/src/c/shared/TriMesh/GridInsideHole.cpp

    r1 r1439  
    88
    99#include <math.h>
     10
     11
    1012#include "./trimesh.h"
    1113#include "../Exp/exp.h"
  • issm/trunk/src/c/shared/TriMesh/trimesh.h

    r1061 r1439  
    99#include "stdio.h"
    1010#include <math.h>
     11
     12
    1113
    1214//#define REAL double //took  it out because it may conflict with stdlib.h defines. put back if necessary
  • issm/trunk/src/c/toolkits/petsc/patches/PetscDetermineLocalSize.cpp

    r1 r1439  
    55#include "stdio.h"
    66#include <math.h>
     7
     8
    79#include "../../../shared/shared.h"
    810
     
    2931                  left  are then redistributed, therefore resulting in a
    3032                  more even distribution.*/
    31                 num_local_rows[i]=(int)floor(global_size/num_procs);
     33                num_local_rows[i]=(int)floor((double)global_size/(double)num_procs);
    3234        }
    3335       
    3436        /*There may be some rows left. Distribute evenly.*/
    35         row_rest=global_size - num_procs*(int)floor(global_size/num_procs);
     37        row_rest=global_size - num_procs*(int)floor((double)global_size/(double)num_procs);
    3638        for (i=0;i<row_rest;i++){
    3739                num_local_rows[i]++;
  • issm/trunk/src/c/toolkits/plapack/patches/CyclicalFactorization.cpp

    r831 r1439  
    33*/
    44#include <math.h>
     5
     6
    57#include "../../../shared/shared.h"
    68
  • issm/trunk/src/m/classes/public/LaunchQueueJobGeneric.m

    r1268 r1439  
    1414end
    1515
    16 %if we are running locally, no need to call ssh to launch the job. We figure out by comparing the
    17 %hostname to the cluster name
    18 [result,hostname]=system('hostname -s');hostname=hostname(1:end-1);
    19        
    20 disp('uploading input file and queueing script');
    21 if strcmpi(hostname,md.cluster),
    22         if md.qmu_analysis,
    23                 system(['cp ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' ' ' executionpath]);
     16if ~strcmpi(options.batch,'yes'),
     17
     18        %if we are running locally, no need to call ssh to launch the job. We figure out by comparing the
     19        %hostname to the cluster name
     20        [result,hostname]=system('hostname -s');hostname=hostname(1:end-1);
     21        disp('uploading input file and queueing script');
     22        if strcmpi(hostname,md.cluster),
     23                if md.qmu_analysis,
     24                        system(['cp ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' ' ' executionpath]);
     25                else
     26                        system(['cp ' md.name '.bin' ' ' md.name '.queue' ' ' executionpath]);
     27                end
    2428        else
    25                 system(['cp ' md.name '.bin' ' ' md.name '.queue' ' ' executionpath]);
     29                if md.qmu_analysis,
     30                        system(['scp ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' ' ' md.cluster ':' executionpath]);
     31                else
     32                        system(['scp ' md.name '.bin' ' ' md.name '.queue' ' ' md.cluster ':' executionpath]);
     33                end
    2634        end
     35
     36        disp('launching solution sequence on remote cluster');
     37        %now call the queuing script to launch the job.
     38        if strcmpi(hostname,md.cluster),
     39                system(['cd ' executionpath ' && source ' md.name '.queue ']);
     40        else
     41                system(['ssh  ' md.cluster ' ''cd ' executionpath ' && source ' md.name '.queue ''']);
     42        end
     43
    2744else
    28         if md.qmu_analysis,
    29                 system(['scp ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' ' ' md.cluster ':' executionpath]);
    30         else
    31                 system(['scp ' md.name '.bin' ' ' md.name '.queue' ' ' md.cluster ':' executionpath]);
    32         end
     45        disp('batch mode requested: not launching job interactively');
     46        disp(['launch solution sequence by copying files ' md.name '.bin' ',' md.name '.queue and ' md.name '.qmu.in, onto remote cluster ' md.cluster]);
     47        disp(['   then log int ' md.cluster ' and source queue file ' md.name '.queue']);
     48        md.waitonlock=0;
    3349end
    3450
    35 disp('launching solution sequence on remote cluster');
    36 %now call the queuing script to launch the job.
    37 if strcmpi(hostname,md.cluster),
    38         system(['cd ' executionpath ' && source ' md.name '.queue ']);
    39 else
    40         system(['ssh  ' md.cluster ' ''cd ' executionpath ' && source ' md.name '.queue ''']);
    41 end
     51
  • issm/trunk/src/m/utils/Nightly/nightlyrun.m

    r1019 r1439  
    3030cd Verification
    3131
    32 %Get a list of the test decks
    33 [status,list]=system('ls -l | grep -v CVS | grep -v cielo | awk ''{printf("%s|",$9);}'' '); %only works on *nix systems.
    34 list=strsplit(list,'|');
     32[status,list]=system('ls '); %will work on all machines, hopefully
     33list=strsplit(list,char(10));
     34list=list(1:end-1);
    3535
    3636%Get packages
  • issm/trunk/src/mex/ComputePressure/ComputePressure.cpp

    r1042 r1439  
    1717        ParameterInputs* inputs=NULL;
    1818        int      numberofnodes;
     19
     20        printf("hello\n");
    1921
    2022        /* output datasets: */
     
    6062
    6163void ComputePressureUsage(void) {
    62         _printf_("\n");
    63         _printf_("   usage: [p_g] = %s(elements, nodes, loads, materials, params,inputs);\n",__FUNCT__);
    64         _printf_("\n");
     64        printf("\n");
     65        printf("   usage: [p_g] = %s(elements, nodes, loads, materials, params,inputs);\n",__FUNCT__);
     66        printf("\n");
    6567}
  • issm/trunk/startup.m

    r1031 r1439  
    1313
    1414%Recover ISSM_DIR
    15 [status,ISSM_DIR]=system('echo $ISSM_DIR');
     15if ispc,
     16        [status,ISSM_DIR]=system('echo [%ISSM_DIR%]');
     17else
     18        [status,ISSM_DIR]=system('echo $ISSM_DIR');
     19end
    1620if status~=0,
    1721        error('issmdir error message: problem when running ''echo $ISSM_DIR'' shell command');
     
    2024        error('issmdir error message: ''ISSM_DIR'' environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!');
    2125end
    22 %get rid of return carriage
    23 ISSM_DIR=ISSM_DIR(1:end-1); clear status;
     26%get rid of useless symbols in the name
     27if ispc,
     28ISSM_DIR=ISSM_DIR(2:end-2);
     29else
     30ISSM_DIR=ISSM_DIR(1:end-1);
     31end
     32clear status;
    2433
    2534%Now add all issm code paths necessary to run issm smoothly.
Note: See TracChangeset for help on using the changeset viewer.