Changeset 2047


Ignore:
Timestamp:
08/28/09 11:11:56 (15 years ago)
Author:
Eric.Larour
Message:

Clarified issm_options.m4
Added optimization flags.
Improved configuration on linux64 machines.

Location:
issm/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/configs/linux64/linux64.sh

    r2042 r2047  
    11#!/bin/sh
    22
    3 ./configure --prefix=$ISSM_DIR --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/lib --with-plapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/lib --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/lib --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/lib --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" --with-graphics-lib=/usr/lib64/libX11.so
     3./configure --prefix=$ISSM_DIR --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/lib --with-plapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/lib --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/lib --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/lib --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" --with-graphics-lib=/usr/lib64/libX11.so --with-cxxoptflags="-march=opteron -O2"
  • issm/trunk/m4/issm_options.m4

    r2042 r2047  
    22
    33AC_DEFUN([ISSM_OPTIONS],[
    4         dnl Debugging option check.
     4
     5
     6
     7
     8        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%debugging-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    59        AC_ARG_ENABLE([debugging],AS_HELP_STRING([--enable-debugging],
    610                                         [turn debug support on]),
    711                [enable_debugging=$enableval],[enable_debugging=no])
    812        if test "x$enable_debugging" = xyes; then
    9          AC_DEFINE([_DEBUG_],[1],[Macro to enable debugging in Dakota.])
    10         fi
    11 
    12         dnl serial build?
     13         AC_DEFINE([_ISSM_DEBUG_],[1],[Macro to enable debugging in ISSM.])
     14        fi
     15        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Debuggin-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     16
     17
     18
     19
     20        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%serial build-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1321        AC_ARG_WITH([serial],
    1422                          AS_HELP_STRING([--with-serial = value],
     
    1826        AM_CONDITIONAL([NOSERIAL], [test $SERIAL_VALUE = no])
    1927        AC_MSG_RESULT($SERIAL_VALUE)
    20        
    21 
    22         dnl parallel build?
     28        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%serial build-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     29       
     30
     31        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%parallel build-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2332        AC_ARG_WITH([parallel],
    2433                          AS_HELP_STRING([--with-parallel = value],
     
    2837        AM_CONDITIONAL([NOPARALLEL], [test $PARALLEL_VALUE = no])
    2938        AC_MSG_RESULT($PARALLEL_VALUE)
    30 
     39        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%parallel build-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     40
     41       
     42       
    3143        dnl: check that at least serial or parallel builds have been requested!
    3244        if test "$SERIAL_VALUE" != "yes" ; then
     
    3749
    3850
    39         dnl Matlab directory
     51        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%matlab-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    4052        AC_ARG_WITH([matlab-dir],
    4153                          AS_HELP_STRING([--with-matlab-dir = DIR],
     
    5062                HAVE_MATLAB=yes
    5163                MATLABINCL=-I"$MATLAB_ROOT/extern/include";
    52                 dnl  use matlab provided mexext routine to test for extension
    53                                
    54                 MEX=$MATLAB_ROOT/bin/mex
    55 
     64               
    5665                dnl OS-dependent variables and checks
    5766                case "${host_os}" in
    5867                        *linux*)
    59                         if test "${host_cpu}" = "x86_64";
    60                         then
    61                                 MEXLIB=-L"$MATLAB_ROOT/bin/glnxa64/ -lmex"
    62                                 MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnxa64/mexFunction.map";
    63                         else
    64                                 MEXLIB=-L"$MATLAB_ROOT/bin/glnx86/ -lmex"
    65                                 MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnx86/mexFunction.map";
    66                         fi
    67                         MEXEXT=`$MATLAB_ROOT/bin/mexext`
    68                         MEXEXT=".$MEXEXT"
     68                                if test "${host_cpu}" = "x86_64";
     69                                then
     70                                        MEXLIB=-L"$MATLAB_ROOT/bin/glnxa64/ -lmex"
     71                                        MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnxa64/mexFunction.map";
     72                                else
     73                                        MEXLIB=-L"$MATLAB_ROOT/bin/glnx86/ -lmex"
     74                                        MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnx86/mexFunction.map";
     75                                fi
     76                                MEXEXT=`$MATLAB_ROOT/bin/mexext`
     77                                MEXEXT=".$MEXEXT"
    6978                        ;;
    7079                        *darwin9.6.0*)
    71                         MEXLIB=-L"$MATLAB_ROOT/bin/maci/ -lmex -lmx"
    72                         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"
     80                                MEXLIB=-L"$MATLAB_ROOT/bin/maci/ -lmex -lmx"
     81                                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"
     82                                MEXEXT=`$MATLAB_ROOT/bin/mexext`
     83                                MEXEXT=".$MEXEXT"
    7584                        ;;
    7685                        *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"
    82                         ;;
    83 
     86                                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"
     87
     88
     89                                MEXEXT=`$MATLAB_ROOT/bin/mexext.bat`
     90                                MEXEXT=".$MEXEXT"
     91                        ;;
    8492                esac
    8593
     
    103111        fi
    104112
    105         dnl get version number
     113        dnl should we use large arrays compilation (Matlab 7.5 and upper?)
    106114        if test $HAVE_MATLAB = yes; then
    107115
     
    121129        AM_CONDITIONAL(LARGEARRAYS, test x$largearrays = xyes)
    122130       
    123         dnl Triangle directory
     131        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%matlab-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     132       
     133
     134
     135        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%triangle-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    124136        AC_ARG_WITH([triangle-dir],
    125137                          AS_HELP_STRING([--with-triangle-dir = DIR], [triangle root directory. necessary for serial build]),
    126138                         [TRIANGLE_ROOT=$withval],[TRIANGLE_ROOT=""])
    127139        AC_MSG_CHECKING(for Triangle headers and libraries )
     140
    128141        if test -d "$TRIANGLE_ROOT"; then
    129 
    130142
    131143                dnl defaults
     
    150162        fi
    151163        AC_MSG_RESULT(ok)
    152 
    153         dnl Dakota directory
     164        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%triangle-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     165
     166
     167
     168        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%dakota-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    154169        AC_ARG_WITH([dakota-dir],
    155170                          AS_HELP_STRING([--with-dakota-dir = DIR], [dakota root directory. necessary for serial build]),
     
    172187        fi
    173188        AC_MSG_RESULT($HAVE_DAKOTA)
    174 
    175                
    176         dnl Metis directory
     189        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%dakota-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     190
     191
     192
     193
     194        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%metis-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    177195        AC_ARG_WITH([metis-dir],
    178196                          AS_HELP_STRING([--with-metis-dir = DIR],
     
    213231        AC_MSG_RESULT($HAVE_METIS)
    214232        fi
    215 
    216         dnl Mpi options!
     233        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%metis-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     234
     235
     236
     237
     238        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mpi-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    217239        AC_MSG_CHECKING(for mpi...)
    218240        AC_ARG_WITH([mpi-lib],
     
    247269        fi
    248270        AC_MSG_RESULT(done)
    249 
    250         dnl Petsc directory and architecture
     271        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mpi-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     272
     273
     274
     275        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%petsc-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    251276        AC_ARG_WITH([petsc-dir],
    252277                          AS_HELP_STRING([--with-petsc-dir = DIR],
     
    279304                case "${host_os}" in
    280305                        *cygwin*)
    281                         PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetsc.lib  libpetscsnes.lib libpetscts.lib libmpiuni.lib"
     306                        PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetsc.lib  libpetscsnes.lib libpetscts.lib libmpiuni.lib"
    282307                        ;;
    283308                        *linux*)
    284                         PETSCLIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     309                        PETSCLIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
    285310                        ;;
    286311                        *darwin9.6.0*)
    287                         PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     312                        PETSCLIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
    288313                        ;;
    289314                esac
     
    305330                AC_MSG_RESULT($HAVE_PETSC)
    306331        fi
    307 
    308         dnl: when running in serial mode, MPI must be ignored, and set to internal petsc mpiuni:
     332        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%petsc-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     333
     334
     335
     336
     337
     338        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mpiuni-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     339        dnl when running in serial mode, MPI must be ignored, and set to internal petsc mpiuni:
    309340        if test "$PARALLEL_VALUE" = "no" ; then
    310341                HAVE_MPI=yes
     
    313344                case "${host_os}" in
    314345                        *cygwin*)
    315                         MPILIB="-link -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
     346                        MPILIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
    316347                        ;;
    317348                        *linux*)
    318                         MPILIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
     349                        MPILIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
    319350                        ;;
    320351                        *darwin9.6.0*)
    321                         MPILIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
     352                        MPILIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
    322353                        ;;
    323354                esac
    324355                                                                 
    325 
    326 
    327                        
    328356                AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
    329357                AC_DEFINE([HAVE_MPI],[1],[with Mpi in ISSM src])
     
    331359                AC_SUBST([MPILIB])
    332360        fi
    333        
    334 
    335         dnl Slepc directory
     361        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mpiuni-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     362       
     363
     364        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%slepc-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    336365        AC_ARG_WITH([slepc-dir],
    337366                          AS_HELP_STRING([--with-slepc-dir = DIR],
     
    355384        fi
    356385        AC_MSG_RESULT($HAVE_SLEPC)
    357        
    358         dnl Scalapack directory
     386        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%slepc-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     387       
     388
     389
     390        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%scalapack-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    359391        AC_ARG_WITH([scalapack-dir],
    360392                          AS_HELP_STRING([--with-scalapack-dir = DIR],
     
    376408        fi
    377409        AC_MSG_RESULT($HAVE_SCALAPACK)
    378 
    379         dnl Blas-lapack directory
     410        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%scalapack-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     411
     412
     413
     414
     415        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%blas-lapack-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    380416        AC_ARG_WITH([blas-lapack-dir],
    381417                          AS_HELP_STRING([--with-blas-lapack-dir = DIR],
     
    413449        fi
    414450        AC_MSG_RESULT($HAVE_BLASLAPACK)
    415 
    416         dnl mkl directory
     451        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%blas-lapack-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     452
     453
     454
     455        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mkl-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    417456        AC_ARG_WITH([mkl-dir],
    418457                          AS_HELP_STRING([--with-mkl-dir = DIR],
     
    458497        fi
    459498        AC_MSG_RESULT($HAVE_PLAPACK)
     499        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mkl-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     500
     501
     502
     503
     504
     505        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mumps-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    460506
    461507        dnl Mumps directory
     
    480526        fi
    481527        AC_MSG_RESULT($HAVE_MUMPS)
    482 
    483         dnl Blacs directory
     528        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mumps-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     529       
     530
     531
     532        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%blacs-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    484533        AC_ARG_WITH([blacs-dir],
    485534                          AS_HELP_STRING([--with-blacs-dir = DIR],
     
    502551        fi
    503552        AC_MSG_RESULT($HAVE_BLACS)
    504 
    505         dnl math library  option
     553        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%blacs-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     554       
     555
     556
     557
     558        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%math-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    506559        AC_MSG_CHECKING(for math library...)
    507560        AC_ARG_WITH([math-lib],
     
    519572        fi
    520573        AC_MSG_RESULT(done)
    521 
     574        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%math-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     575
     576
     577
     578        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%fortran-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    522579        dnl fortran library  option
    523580        AC_MSG_CHECKING(for fortran library...)
     
    536593        fi
    537594        AC_MSG_RESULT(done)
    538 
    539         dnl graphics library  option
     595        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%fortran-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     596
     597
     598
     599
     600        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%graphics-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    540601        AC_MSG_CHECKING(for graphics library...)
    541602        AC_ARG_WITH([graphics-lib],
     
    553614        fi
    554615        AC_MSG_RESULT(done)
    555 
    556         dnl vendor?
     616        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%graphics-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     617
     618
     619
     620        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%vendor-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    557621        AC_ARG_WITH([vendor],
    558622                          AS_HELP_STRING([--with-vendor = VENDOR], [vendor name, ex: intel]),
     
    569633                fi
    570634        fi
     635        AC_MSG_RESULT(done)
     636        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%vendor-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     637
     638
     639
     640        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%optimization-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     641        dnl bypass standard optimization -g -O2 ?
     642        AC_ARG_WITH([cxxoptflags],
     643                          AS_HELP_STRING([--with-cxxoptflags = CXXOPTFLAGS], [optimization using CXX flags, ex: --with-cxxoptflags=-march=opteron -O3]),
     644                         [CXXOPTFLAGS=$withval],[CXXOPTFLAGS="-g -O2"])
     645        AC_MSG_CHECKING(for C++ optimization flags )
     646        AC_SUBST([CXXOPTFLAGS])
     647        AC_MSG_RESULT(done)
     648
     649        dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%optimization-end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     650
     651
    571652])
  • issm/trunk/src/c/Makefile.am

    r2042 r2047  
    302302
    303303
    304 libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -ansi -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  -g -O2
     304libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -ansi -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXOPTFLAGS)
    305305if LARGEARRAYS
    306306libISSM_a_CXXFLAGS += -D__GCC4BUILD__ 
     
    607607                                        ./parallel/OutputResults.cpp
    608608
    609 libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_
     609libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXOPTFLAGS)
    610610
    611611if NOPARALLEL
  • issm/trunk/src/m/classes/@model/setdefaultparameters.m

    r1916 r2047  
    260260%the string of solverstring is used directly by PETSc to solve finite element
    261261%systems KU=F. By default, we use MUMPS solver
    262 md.solverstring=' -mat_type aijmumps -ksp_type preonly -pc_type lu -mat_mumps_icntl_14 40 ';
     262md=solversettomumps(md);
    263263
    264264%Ice solver: 'general' for Matlab's default solver (or 'lu' or 'sholesky')
  • issm/trunk/src/m/classes/public/solversettoasm.m

    r1293 r2047  
    55%      md=solversettoasm(md)
    66
    7 md.solverstring=' -mat_type aij -ksp_type cgs -pc_type asm -sub_mat_type mumps -sub_pc_type lu -pc_asm_overlap 4 ';
     7md.solverstring=' -mat_type aij -ksp_type cgs -pc_type asm -sub_mat_type mumps -sub_pc_type lu -pc_asm_overlap 4 -pc_factor_shift_positive_definite true';
    88%md.solverstring=' -mat_type aij -ksp_type cgs -pc_type asm -sub_pc_type lu -pc_asm_overlap 2 ';
  • issm/trunk/src/m/classes/public/solversettomumps.m

    r1 r2047  
    55%      md=solversettomumps(md)
    66
    7 md.solverstring=' -mat_type aijmumps -ksp_type preonly -pc_type lu -mat_mumps_icntl_14 40 ';
     7md.solverstring=' -mat_type aijmumps -ksp_type preonly -pc_type lu -mat_mumps_icntl_14 80 -pc_factor_shift_positive_definite true';
    88
    99%optional
  • issm/trunk/src/mex/Makefile.am

    r2042 r2047  
    6464
    6565#Matlab
    66 AM_CFLAGS=  -DMATLAB -fPIC -fno-omit-frame-pointer -std=c99 -D_GNU_SOURCE -pthread -fexceptions
    6766AM_CXXFLAGS=  -DMATLAB  -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
    6867
    6968#Triangle library
    7069AM_CXXFLAGS+=  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
    71 AM_CFLAGS+=   -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
    7270
    7371
    7472#64 vs 32 bits
    7573if LARGEARRAYS
    76 AM_CFLAGS += -D__GCC4BUILD__  -D_SERIAL_
    7774AM_CXXFLAGS += -D__GCC4BUILD__ -D_SERIAL_
    7875else
    79 AM_CFLAGS += -DMX_COMPAT_32 -D_SERIAL_
    8076AM_CXXFLAGS += -DMX_COMPAT_32 -D_SERIAL_
    8177endif
    8278
     79AM_CXXFLAGS += $(CXXOPTFLAGS)
     80
    8381BuildNodeSets_SOURCES = BuildNodeSets/BuildNodeSets.cpp\
    8482                          BuildNodeSets/BuildNodeSets.h
Note: See TracChangeset for help on using the changeset viewer.