Changeset 3223
- Timestamp:
- 03/08/10 15:13:33 (15 years ago)
- Location:
- issm/trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/configs/linux64/linux64.sh.petsc2
r2065 r3223 1 1 #!/bin/sh 2 2 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/externalpackages/fblaslapack/$ISSM_ARCH --with-plapack- dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32/$ISSM_ARCH --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3/$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"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/externalpackages/fblaslapack/$ISSM_ARCH --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3/$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" --with-numthreads=32 --with-petsc-version=2 -
issm/trunk/m4/issm_options.m4
r3131 r3223 286 286 fi 287 287 fi 288 288 289 AC_ARG_WITH([petsc-version], 290 AS_HELP_STRING([--with-petsc-version = VERSION], 291 [petsc version -- 2 or 3]), 292 [PETSC_VERSION=$withval],[PETSC_VERSION=""]) 293 294 if test "$PARALLEL_VALUE" = "yes" ; then 295 if test "$PETSC_VERSION" = "" ; then 296 AC_MSG_ERROR([missing --with-petsc-version argument for parallel compilation!]) 297 fi 298 if test "$PETSC_VERSION" = "2" ; then 299 AC_DEFINE([_PETSC_VERSION_],[2],[ Petsc version number]) 300 fi 301 302 if test "$PETSC_VERSION" = "3" ; then 303 AC_DEFINE([_PETSC_VERSION_],[3],[ Petsc version number]) 304 fi 305 fi 306 307 289 308 AC_ARG_WITH([petsc-arch], 290 309 AS_HELP_STRING([--with-petsc-arch = DIR], … … 315 334 ;; 316 335 esac 317 336 318 337 319 338 … … 481 500 482 501 dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%plapack-beginning%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 483 AC_ARG_WITH([plapack-dir], 484 AS_HELP_STRING([--with-plapack-dir = DIR], 485 [plapack root directory]), 486 [PLAPACK_ROOT=$withval],[PLAPACK_ROOT=""]) 487 488 AC_MSG_CHECKING(for Plapack headers and libraries in $PLAPACK_ROOT) 489 if test -d "$PLAPACK_ROOT"; then 490 491 dnl defaults 492 HAVE_PLAPACK=yes 493 PLAPACKINCL=-I"$PLAPACK_ROOT/INCLUDE" 494 PLAPACKLIB=-L"$PLAPACK_ROOT/ -lPLAPACK" 495 496 AC_DEFINE([_HAVE_PLAPACK_],[1],[with Plapack in ISSM src]) 497 AC_SUBST([PLAPACKINCL]) 498 AC_SUBST([PLAPACKLIB]) 502 AC_ARG_WITH([plapack-lib], 503 AS_HELP_STRING([--with-plapack-lib = lib], 504 [plapack library]), 505 [PLAPACK_LIB=$withval],[PLAPACK_LIB=""]) 506 AC_MSG_CHECKING(for Plapack libraries) 507 508 AC_ARG_WITH([plapack-include], 509 AS_HELP_STRING([--with-plapack-include = include], 510 [plapack include ]), 511 [PLAPACK_INCLUDE=$withval],[PLAPACK_INCLUDE=""]) 512 AC_MSG_CHECKING(for Plapack headers) 513 514 if test -n "$PLAPACK_LIB"; then 515 if test -n "$PLAPACK_INCLUDE"; then 516 517 dnl defaults 518 HAVE_PLAPACK=yes 519 PLAPACKINCL="$PLAPACK_INCLUDE" 520 PLAPACKLIB="$PLAPACK_LIB" 521 522 AC_DEFINE([_HAVE_PLAPACK_],[1],[with Plapack in ISSM src]) 523 AC_SUBST([PLAPACKINCL]) 524 AC_SUBST([PLAPACKLIB]) 525 else 526 HAVE_PLAPACK=no 527 fi 499 528 else 500 529 HAVE_PLAPACK=no … … 521 550 HAVE_MUMPS=yes 522 551 MUMPSINCL=-I"$MUMPS_ROOT/include" 523 dnl MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps -lmumps_common -lpord -lparmetis"552 if test "$PETSC_VERSION" = "2" ; then 524 553 MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps -lpord " 554 else 555 MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps -lmumps_common -lpord -lparmetis" 556 fi 525 557 526 558 AC_DEFINE([_HAVE_MUMPS_],[1],[with Mumps in ISSM src]) -
issm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp
r2063 r3223 2 2 * \brief reduce loads from g set to f set 3 3 */ 4 5 #ifdef HAVE_CONFIG_H 6 #include "config.h" 7 #else 8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 9 #endif 10 4 11 5 12 #include "./Reduceloadfromgtofx.h" … … 36 43 37 44 /*Create G_mn'*/ 45 #if _PETSC_VERSION_ == 2 38 46 MatTranspose(G_mn,&tG_mn); 47 #else 48 MatTranspose(G_mn,MAT_INITIAL_MATRIX,&tG_mn); 49 #endif 39 50 40 51 /*Create G_mn' * pm*/ -
issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp
r2061 r3223 50 50 51 51 //K_nn = K_nn + G_mn' * K_mn; 52 #if _PETSC_VERSION_ == 2 52 53 MatTranspose(Gmn,&tGmn); 54 #else 55 MatTranspose(Gmn,MAT_INITIAL_MATRIX,&tGmn); 56 #endif 53 57 MatMatMult(tGmn,Kmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&tGmnKmn); 54 58 MatAXPY(Knn,a,tGmnKmn,DIFFERENT_NONZERO_PATTERN); -
issm/trunk/src/c/Solverx/Solverx.cpp
r2060 r3223 19 19 20 20 /*Solver*/ 21 KSP ksp=NULL; 21 KSP ksp=NULL; 22 PC pc=NULL; 22 23 int iteration_number; 23 24 PetscTruth flag; … … 39 40 PetscOptionsDetermineSolverType(&solver_type,solver_string); 40 41 42 #if _PETSC_VERSION_ == 2 41 43 if (solver_type==MUMPSPACKAGE_LU){ 42 44 /*Convert Kff to MATTAIJMUMPS: */ … … 59 61 MatConvert(Kff,MATSUPERLU_DIST,MAT_REUSE_MATRIX,&Kff); 60 62 } 61 63 #endif 62 64 63 65 /*Prepare solver*/ … … 65 67 KSPSetOperators(ksp,Kff,Kff,DIFFERENT_NONZERO_PATTERN); 66 68 KSPSetFromOptions(ksp); 69 70 #if _PETSC_VERSION_ == 3 71 /*specific solver?: */ 72 KSPGetPC(ksp,&pc); 73 if (solver_type==MUMPSPACKAGE_LU){ 74 PCFactorSetMatSolverPackage(pc,MAT_SOLVER_MUMPS); 75 } 76 #endif 77 67 78 68 79 /*If initial guess for solution, use it, except if we are using the MUMPS direct solver, where any initial -
issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp
r2552 r3223 45 45 46 46 /*The list of options is going to be pairs of the type "-option option_value"*/ 47 #if _PETSC_VERSION_ == 2 47 48 PetscToken *token=NULL; 49 #else 50 PetscToken token=NULL; 51 #endif 48 52 char* first=NULL; 49 53 char* second=NULL; -
issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
r2064 r3223 25 25 26 26 /*The list of options is going to be pairs of the type "-option option_value"*/ 27 PetscToken *token=NULL; 27 #if _PETSC_VERSION_ == 2 28 PetscToken *token=NULL ; 29 #else 30 PetscToken token=NULL; 31 #endif 28 32 char* first=NULL; 29 33 char* second=NULL;
Note:
See TracChangeset
for help on using the changeset viewer.