Changeset 2042


Ignore:
Timestamp:
08/27/09 18:57:37 (15 years ago)
Author:
Eric.Larour
Message:

New petsc and new mpich2, with opteron optimization, sounds a lot faster, may be...

Location:
issm/trunk
Files:
16 edited

Legend:

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

    r1363 r2042  
    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/externalpackages/fblaslapack/$ISSM_ARCH
     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
  • issm/trunk/etc/cluster.rc

    r1575 r2042  
    3939
    4040cluster_name=astrid
    41 cluster_codepath=/u/astrid1/larour/issm/trunk/bin
     41cluster_codepath=/u/astrid-r1b/larour/issm/trunk/bin
    4242cluster_executionpath=/u/wilkes-r1b/larour/Testing/Execution
    4343
  • issm/trunk/etc/environment.sh

    r2011 r2042  
    2929#PETSC
    3030export PETSC_DIR
    31 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PETSC_DIR/lib/$ISSM_ARCH"
    32 export LD_RUN_PATH="$LD_RUN_PATH:$PETSC_DIR/lib/$ISSM_ARCH"
     31export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PETSC_DIR/lib/"
     32export LD_RUN_PATH="$LD_RUN_PATH:$PETSC_DIR/lib"
    3333
    3434#SLEPC
  • issm/trunk/m4/issm_options.m4

    r1506 r2042  
    275275        if test -d "$PETSC_ROOT"; then
    276276
    277                 if test -d "$PETSC_ROOT/bmake/$PETSC_ARCH"; then
    278                
    279                         PETSCINCL="-I$PETSC_ROOT/include  -I$PETSC_ROOT/ -I$PETSC_ROOT/bmake/$PETSC_ARCH -I$PETSC_ROOT/src/mat/impls/dense/mpi/plapack/"
    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
    292                                                  
    293 
    294 
    295                         AC_DEFINE([_HAVE_PETSC_],[1],[with Petsc in ISSM src])
    296                         AC_SUBST([PETSCINCL])
    297                         AC_SUBST([PETSCLIB])
    298 
    299                         HAVE_PETSC=yes
    300                 else
    301                         HAVE_PETSC=no
    302                 fi
     277                PETSCINCL="-I$PETSC_ROOT/$PETSC_ARCH/include  -I$PETSC_ROOT/include -I$PETSC_ROOT/ -I$PETSC_ROOT/bmake/$PETSC_ARCH -I$PETSC_ROOT/src/mat/impls/dense/mpi/plapack/"
     278       
     279                case "${host_os}" in
     280                        *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"
     282                        ;;
     283                        *linux*)
     284                        PETSCLIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     285                        ;;
     286                        *darwin9.6.0*)
     287                        PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     288                        ;;
     289                esac
     290                                                                 
     291
     292
     293                AC_DEFINE([_HAVE_PETSC_],[1],[with Petsc in ISSM src])
     294                AC_SUBST([PETSCINCL])
     295                AC_SUBST([PETSCLIB])
     296
     297                HAVE_PETSC=yes
    303298        else
    304299                HAVE_PETSC=no
     
    476471                HAVE_MUMPS=yes
    477472                MUMPSINCL=-I"$MUMPS_ROOT/include"
    478                 MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps -lpord"
     473                MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lmumps_common -lpord -lparmetis"
    479474
    480475                AC_DEFINE([_HAVE_MUMPS_],[1],[with Mumps in ISSM src])
  • issm/trunk/src/c/Makefile.am

    r2002 r2042  
    615615endif
    616616
    617 LDADD = ./libpISSM.a $(METISLIB) $(PETSCLIB) $(DAKOTALIB) $(SLEPCLIB) $(MUMPSLIB) $(PLAPACKLIB)  $(MPILIB) $(X_LIBS) $(GRAPHICSLIB) $(BLASLAPACKLIB) $(MKLLIB) $(SCALAPACKLIB) $(BLACSLIB) $(FLIBS)
     617LDADD =   ./libpISSM.a $(PETSCLIB)   $(FLIBS)  $(PLAPACKLIB)  $(MUMPSLIB) $(SCALAPACKLIB)  $(BLACSLIB)  $(DAKOTALIB) $(METISLIB) $(BLASLAPACKLIB)  $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB)
    618618
    619619diagnostic_exe_SOURCES = parallel/diagnostic.cpp
  • issm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp

    r1 r2042  
    3636               
    3737                        /*Create G_mn'*/
    38                         MatTranspose(G_mn,&tG_mn); 
     38                        MatTranspose(G_mn,MAT_INITIAL_MATRIX,&tG_mn); 
    3939
    4040                        /*Create G_mn' * pm*/
  • issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp

    r1 r2042  
    5050                       
    5151                        //K_nn = K_nn + G_mn' * K_mn;
    52                         MatTranspose(Gmn,&tGmn);
     52                        MatTranspose(Gmn,MAT_INITIAL_MATRIX,&tGmn);
    5353                        MatMatMult(tGmn,Kmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&tGmnKmn);
    5454                        MatAXPY(Knn,a,tGmnKmn,DIFFERENT_NONZERO_PATTERN);
  • issm/trunk/src/c/Solverx/Solverx.cpp

    r1904 r2042  
    2020        /*Solver*/
    2121        KSP ksp=NULL;
     22        PC  pc=NULL;
    2223        int iteration_number;
    2324        PetscTruth flag;
     
    3940        PetscOptionsDetermineSolverType(&solver_type,solver_string);
    4041
    41         if (solver_type==MUMPSPACKAGE_LU){
    42                 /*Convert Kff to MATTAIJMUMPS: */
    43                 MatConvert(Kff,MATAIJMUMPS,MAT_REUSE_MATRIX,&Kff);
    44         }
    45         if (solver_type==MUMPSPACKAGE_CHOL){
    46                 /*Convert Kff to MATTSBAIJMUMPS: */
    47                 MatConvert(Kff,MATSBAIJMUMPS,MAT_REUSE_MATRIX,&Kff);
    48         }
    49         if (solver_type==SPOOLESPACKAGE_LU){
    50                 /*Convert Kff to MATTSBAIJMUMPS: */
    51                 MatConvert(Kff,MATAIJSPOOLES,MAT_REUSE_MATRIX,&Kff);
    52         }
    53         if (solver_type==SPOOLESPACKAGE_CHOL){
    54                 /*Convert Kff to MATTSBAIJMUMPS: */
    55                 MatConvert(Kff,MATSBAIJSPOOLES,MAT_REUSE_MATRIX,&Kff);
    56         }
    57         if (solver_type==SUPERLUDISTPACKAGE){
    58                 /*Convert Kff to MATTSBAIJMUMPS: */
    59                 MatConvert(Kff,MATSUPERLU_DIST,MAT_REUSE_MATRIX,&Kff);
    60         }
    61 
     42        /*obsolete? : */
     43//      if (solver_type==MUMPSPACKAGE_LU){
     44//              /*Convert Kff to MATTAIJMUMPS: */
     45//              MatConvert(Kff,MATAIJMUMPS,MAT_REUSE_MATRIX,&Kff);
     46//      }
     47//      if (solver_type==MUMPSPACKAGE_CHOL){
     48//              /*Convert Kff to MATTSBAIJMUMPS: */
     49//              MatConvert(Kff,MATSBAIJMUMPS,MAT_REUSE_MATRIX,&Kff);
     50//      }
     51//      if (solver_type==SPOOLESPACKAGE_LU){
     52//              /*Convert Kff to MATTSBAIJMUMPS: */
     53//              MatConvert(Kff,MATAIJSPOOLES,MAT_REUSE_MATRIX,&Kff);
     54//      }
     55//      if (solver_type==SPOOLESPACKAGE_CHOL){
     56//              /*Convert Kff to MATTSBAIJMUMPS: */
     57//              MatConvert(Kff,MATSBAIJSPOOLES,MAT_REUSE_MATRIX,&Kff);
     58//      }
     59//      if (solver_type==SUPERLUDISTPACKAGE){
     60//              /*Convert Kff to MATTSBAIJMUMPS: */
     61//              MatConvert(Kff,MATSUPERLU_DIST,MAT_REUSE_MATRIX,&Kff);
     62//      }
     63//
    6264
    6365        /*Prepare solver*/
     
    6567        KSPSetOperators(ksp,Kff,Kff,DIFFERENT_NONZERO_PATTERN);
    6668        KSPSetFromOptions(ksp);
     69
     70        /*specific solver?: */
     71        KSPGetPC(ksp,&pc);
     72        if (solver_type==MUMPSPACKAGE_LU){
     73                PCFactorSetMatSolverPackage(pc,MAT_SOLVER_MUMPS);
     74        }
    6775
    6876        /*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/MatInvert.cpp

    r1 r2042  
    5252        PCSetType(pc,PCLU);
    5353        KSPSetUp(ksp);
    54         PCGetFactoredMatrix(pc,&factored_matrix);
     54        //PCGetFactoredMatrix(pc,&factored_matrix); //not found any replacement yet
    5555        MatMatSolve(factored_matrix,identity,inv);
    5656
  • issm/trunk/src/c/toolkits/petsc/patches/MatPartition.cpp

    r1904 r2042  
    3535        int lower_row,upper_row,range;
    3636        int MA,NA; //matrixA dimensions
    37         MatType type;
     37        const char* type=NULL;
    3838        int csize;
    3939
  • issm/trunk/src/c/toolkits/petsc/patches/MatlabMatrixToPetscMatrix.cpp

    r1904 r2042  
    2727        int rows, cols;
    2828        double* mxmatrix_ptr=NULL;
     29        double* tmatrix=NULL;
    2930        int ierr;
    3031        int i,j;
     
    8990                #endif
    9091
     92                /*transpose, as Petsc now does not allows MAT_COLUMN_ORIENTED matrices in MatSetValues: */
     93                tmatrix=(double*)xmalloc(rows*cols*sizeof(double));
     94                for(i=0;i<cols;i++){
     95                        for(j=0;j<rows;j++){
     96                                *(tmatrix+rows*i+j)=*(mxmatrix_ptr+cols*j+i);
     97                        }
     98                }
     99
    91100                /*Create serial matrix: */
    92101                ierr=MatCreateSeqDense(PETSC_COMM_SELF,rows,cols,NULL,&matrix);CHKERRQ(ierr);
     
    99108                for(i=0;i<cols;i++)idxn[i]=i;
    100109
    101                 ierr=MatSetOption(matrix,MAT_COLUMN_ORIENTED); CHKERRQ(ierr);//matlab is col-oriented.
    102                 ierr=MatSetValues(matrix,rows,idxm,cols,idxn,mxmatrix_ptr,INSERT_VALUES); CHKERRQ(ierr);
     110                ierr=MatSetValues(matrix,rows,idxm,cols,idxn,tmatrix,INSERT_VALUES); CHKERRQ(ierr);
     111
     112                xfree((void**)&tmatrix);
    103113
    104114        }
  • issm/trunk/src/c/toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp

    r1904 r2042  
    4747
    4848        /*petsc type: */
    49         MatType type;
     49        const char* type=NULL;
    5050        int*    idxm=NULL;
    5151        int*    idxn=NULL;
  • issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp

    r1 r2042  
    4545
    4646        /*The list of options is going to be pairs of the type "-option option_value"*/
    47         PetscToken *token=NULL;
     47        PetscToken token=NULL;
    4848        char* first=NULL;
    4949        char* second=NULL;
  • issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp

    r1 r2042  
    2525
    2626        /*The list of options is going to be pairs of the type "-option option_value"*/
    27         PetscToken *token=NULL;
     27        PetscToken token=NULL;
    2828        char* first=NULL;
    2929        char* second=NULL;
  • issm/trunk/src/mex/Makefile.am

    r1805 r2042  
    5757
    5858
    59 LDADD =   $(TRIANGLELIB)  $(PETSCLIB)  ../c/libISSM.a  $(METISLIB) $(FLIBS)  $(PLAPACKLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MUMPSLIB) $(BLACSLIB) $(DAKOTALIB)  $(MPILIB) $(MEXLIB) $(MATHLIB) $(FORTRANLIB)
     59#LDADD =   $(TRIANGLELIB)  $(PETSCLIB)  ../c/libISSM.a  $(METISLIB) $(FLIBS)  $(PLAPACKLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(MUMPSLIB) $(BLACSLIB) $(DAKOTALIB)  $(MPILIB) $(MEXLIB) $(MATHLIB) $(FORTRANLIB)
     60
     61LDADD =   $(TRIANGLELIB) ../c/libISSM.a $(PETSCLIB)   $(FLIBS)  $(PLAPACKLIB)  $(MUMPSLIB) $(SCALAPACKLIB)  $(BLACSLIB)  $(DAKOTALIB) $(METISLIB) $(BLASLAPACKLIB)  $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB)
    6062
    6163AM_LDFLAGS = $(MEXLINK)
  • issm/trunk/todo

    r1113 r2042  
    3636
    3737Answer Jesse, Bob.
     38
     39
     40
     41
     42
     43
     44
     45Look at issm_options.m4, homogeneize!
     46Look at petsc, why doesn't it compile?
     47Homogeneize the archive.
     48
     49
     50
     51
     52
     53
     54
     55Look at issm_options.m4, homogeneize!
     56Look at petsc, why doesn't it compile?
     57Homogeneize the archive.
     58
     59
     60
     61
     62
     63
     64
     65Look at issm_options.m4, homogeneize!
     66Look at petsc, why doesn't it compile?
     67Homogeneize the archive.
     68
     69
     70
     71
     72
     73
     74
     75Look at issm_options.m4, homogeneize!
     76Look at petsc, why doesn't it compile?
     77Homogeneize the archive.
     78
Note: See TracChangeset for help on using the changeset viewer.