Changeset 2042
- Timestamp:
- 08/27/09 18:57:37 (15 years ago)
- Location:
- issm/trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/configs/linux64/linux64.sh
r1363 r2042 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_ARCH3 ./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 39 39 40 40 cluster_name=astrid 41 cluster_codepath=/u/astrid 1/larour/issm/trunk/bin41 cluster_codepath=/u/astrid-r1b/larour/issm/trunk/bin 42 42 cluster_executionpath=/u/wilkes-r1b/larour/Testing/Execution 43 43 -
issm/trunk/etc/environment.sh
r2011 r2042 29 29 #PETSC 30 30 export 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"31 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PETSC_DIR/lib/" 32 export LD_RUN_PATH="$LD_RUN_PATH:$PETSC_DIR/lib" 33 33 34 34 #SLEPC -
issm/trunk/m4/issm_options.m4
r1506 r2042 275 275 if test -d "$PETSC_ROOT"; then 276 276 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 303 298 else 304 299 HAVE_PETSC=no … … 476 471 HAVE_MUMPS=yes 477 472 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" 479 474 480 475 AC_DEFINE([_HAVE_MUMPS_],[1],[with Mumps in ISSM src]) -
issm/trunk/src/c/Makefile.am
r2002 r2042 615 615 endif 616 616 617 LDADD = ./libpISSM.a $(METISLIB) $(PETSCLIB) $(DAKOTALIB) $(SLEPCLIB) $(MUMPSLIB) $(PLAPACKLIB) $(MPILIB) $(X_LIBS) $(GRAPHICSLIB) $(BLASLAPACKLIB) $(MKLLIB) $(SCALAPACKLIB) $(BLACSLIB) $(FLIBS)617 LDADD = ./libpISSM.a $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(DAKOTALIB) $(METISLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) 618 618 619 619 diagnostic_exe_SOURCES = parallel/diagnostic.cpp -
issm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp
r1 r2042 36 36 37 37 /*Create G_mn'*/ 38 MatTranspose(G_mn, &tG_mn);38 MatTranspose(G_mn,MAT_INITIAL_MATRIX,&tG_mn); 39 39 40 40 /*Create G_mn' * pm*/ -
issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp
r1 r2042 50 50 51 51 //K_nn = K_nn + G_mn' * K_mn; 52 MatTranspose(Gmn, &tGmn);52 MatTranspose(Gmn,MAT_INITIAL_MATRIX,&tGmn); 53 53 MatMatMult(tGmn,Kmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&tGmnKmn); 54 54 MatAXPY(Knn,a,tGmnKmn,DIFFERENT_NONZERO_PATTERN); -
issm/trunk/src/c/Solverx/Solverx.cpp
r1904 r2042 20 20 /*Solver*/ 21 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 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 // 62 64 63 65 /*Prepare solver*/ … … 65 67 KSPSetOperators(ksp,Kff,Kff,DIFFERENT_NONZERO_PATTERN); 66 68 KSPSetFromOptions(ksp); 69 70 /*specific solver?: */ 71 KSPGetPC(ksp,&pc); 72 if (solver_type==MUMPSPACKAGE_LU){ 73 PCFactorSetMatSolverPackage(pc,MAT_SOLVER_MUMPS); 74 } 67 75 68 76 /*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 52 52 PCSetType(pc,PCLU); 53 53 KSPSetUp(ksp); 54 PCGetFactoredMatrix(pc,&factored_matrix);54 //PCGetFactoredMatrix(pc,&factored_matrix); //not found any replacement yet 55 55 MatMatSolve(factored_matrix,identity,inv); 56 56 -
issm/trunk/src/c/toolkits/petsc/patches/MatPartition.cpp
r1904 r2042 35 35 int lower_row,upper_row,range; 36 36 int MA,NA; //matrixA dimensions 37 MatType type;37 const char* type=NULL; 38 38 int csize; 39 39 -
issm/trunk/src/c/toolkits/petsc/patches/MatlabMatrixToPetscMatrix.cpp
r1904 r2042 27 27 int rows, cols; 28 28 double* mxmatrix_ptr=NULL; 29 double* tmatrix=NULL; 29 30 int ierr; 30 31 int i,j; … … 89 90 #endif 90 91 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 91 100 /*Create serial matrix: */ 92 101 ierr=MatCreateSeqDense(PETSC_COMM_SELF,rows,cols,NULL,&matrix);CHKERRQ(ierr); … … 99 108 for(i=0;i<cols;i++)idxn[i]=i; 100 109 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); 103 113 104 114 } -
issm/trunk/src/c/toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp
r1904 r2042 47 47 48 48 /*petsc type: */ 49 MatType type;49 const char* type=NULL; 50 50 int* idxm=NULL; 51 51 int* idxn=NULL; -
issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp
r1 r2042 45 45 46 46 /*The list of options is going to be pairs of the type "-option option_value"*/ 47 PetscToken *token=NULL;47 PetscToken token=NULL; 48 48 char* first=NULL; 49 49 char* second=NULL; -
issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
r1 r2042 25 25 26 26 /*The list of options is going to be pairs of the type "-option option_value"*/ 27 PetscToken *token=NULL;27 PetscToken token=NULL; 28 28 char* first=NULL; 29 29 char* second=NULL; -
issm/trunk/src/mex/Makefile.am
r1805 r2042 57 57 58 58 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 61 LDADD = $(TRIANGLELIB) ../c/libISSM.a $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(DAKOTALIB) $(METISLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) 60 62 61 63 AM_LDFLAGS = $(MEXLINK) -
issm/trunk/todo
r1113 r2042 36 36 37 37 Answer Jesse, Bob. 38 39 40 41 42 43 44 45 Look at issm_options.m4, homogeneize! 46 Look at petsc, why doesn't it compile? 47 Homogeneize the archive. 48 49 50 51 52 53 54 55 Look at issm_options.m4, homogeneize! 56 Look at petsc, why doesn't it compile? 57 Homogeneize the archive. 58 59 60 61 62 63 64 65 Look at issm_options.m4, homogeneize! 66 Look at petsc, why doesn't it compile? 67 Homogeneize the archive. 68 69 70 71 72 73 74 75 Look at issm_options.m4, homogeneize! 76 Look at petsc, why doesn't it compile? 77 Homogeneize the archive. 78
Note:
See TracChangeset
for help on using the changeset viewer.