Changeset 19168
- Timestamp:
- 02/27/15 18:25:03 (10 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/configs/config-win64.sh
r19109 r19168 3 3 # Works on Win8, but should also work on 7. 4 4 ./configure --prefix=$ISSM_DIR \ 5 --with-vendor=MSVC- win64 \5 --with-vendor=MSVC-Win64 \ 6 6 --disable-static \ 7 7 --enable-standalone-libraries \ -
issm/trunk-jpl/m4/issm_options.m4
r19149 r19168 197 197 export CC=cl 198 198 export CXX=cccl 199 export CXXFLAGS="-DWIN32 -D_INTEL_WIN_ - EHsc"200 export CFLAGS="-DWIN32 -D_INTEL_WIN_ - EHsc"199 export CXXFLAGS="-DWIN32 -D_INTEL_WIN_ -D_HAVE_PETSC_MPI_ -EHsc" 200 export CFLAGS="-DWIN32 -D_INTEL_WIN_ -D_HAVE_PETSC_MPI_ -EHsc" 201 201 export AR="ar-lib lib" 202 202 export OS_LDFLAG="-Wl," … … 963 963 else 964 964 PETSCLIB="-L$PETSC_ROOT/lib -Wl,libpetsc.lib" 965 if test $PETSC_MAJOR -gt 3 || test $PETSC_MINOR -ge 3; then PETSCLIB+=" -Wl,libmetis.lib"; fi966 965 fi 967 966 ;; … … 990 989 dnl }}} 991 990 dnl metis{{{ 992 if test "$HAVE_PETSC" = "yes" && test "x$PETSC_MAJOR" = "x3" && test $PETSC_MINOR -ge 3 ; then991 if test "$HAVE_PETSC" = "yes" && test "x$PETSC_MAJOR" = "x3" && test $PETSC_MINOR -ge 3 && test $VENDOR != "MSVC-Win64"; then 993 992 dnl in petsc >=3.3, metis is provided 994 993 HAVE_METIS="yes" -
issm/trunk-jpl/src/c/toolkits/mpi/issmmpi.h
r17669 r19168 20 20 #ifdef _HAVE_AMPI_ 21 21 #include <ampi/ampi.h> 22 #elif _HAVE_PETSC_MPI_ // Petsc now hides there MPI header. It can be reached through Petsc. 23 #include <petsc.h> 22 24 #else 23 25 #include <mpi.h> -
issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscMat.cpp
r18254 r19168 42 42 MatSetSizes(this->matrix,m,n,M,N); 43 43 MatSetFromOptions(this->matrix); 44 PetscErrorCode ierr = MatMPIAIJSetPreallocation(this->matrix,0,d_nnz,0,o_nnz); 44 45 /* 46 * Versions of Petsc beyond 3.3 have changed the use of preallocation 47 * routines to distinguish between parallel builds and sequential. Since 48 * our Windows builds are currently only sequential, we need to change 49 * the way we use these functions. 50 * 51 * The following code computes the total number of non-zeroes per row of the 52 * matrix in question. In parallel builds it is nescessary to kep track of 53 * diagonal non zeros and off-diagonal (d_nnz and o_nnz). Sequential does 54 * not make that distinction. 55 */ 56 #ifdef _HAVE_PETSC_MPI_ 57 int* nnz = new int[M]; 58 for(int i = 0; i < M; i++) 59 nnz[i] = o_nnz[i] + d_nnz[i]; 60 61 PetscErrorCode ierr = MatSeqAIJSetPreallocation(this->matrix,0,nnz); 62 #else 63 PetscErrorCode ierr = MatMPIAIJSetPreallocation(this->matrix,0,d_nnz,0,o_nnz); 64 #endif 45 65 if(ierr) _error_("PETSc could not allocate matrix (probably not enough memory)"); 46 66 // MatSetOption(this->matrix,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.