[Debichem-commits] [debichem] r5668 - unstable/cp2k/debian/patches

mbanck at alioth.debian.org mbanck at alioth.debian.org
Sun Jun 14 14:46:30 UTC 2015


Author: mbanck
Date: 2015-06-14 14:46:30 +0000 (Sun, 14 Jun 2015)
New Revision: 5668

Modified:
   unstable/cp2k/debian/patches/elpa2_support.patch
Log:
fix last commit

Modified: unstable/cp2k/debian/patches/elpa2_support.patch
===================================================================
--- unstable/cp2k/debian/patches/elpa2_support.patch	2015-06-14 14:26:06 UTC (rev 5667)
+++ unstable/cp2k/debian/patches/elpa2_support.patch	2015-06-14 14:46:30 UTC (rev 5668)
@@ -114,7 +114,27 @@
    USE ELPA1
    USE ELPA2
  #endif
-@@ -110,7 +110,7 @@ CONTAINS
+@@ -63,6 +63,7 @@ MODULE cp_fm_diag
+ 
+   ! these saved variables are DIAGONALIZATION global
+    INTEGER, SAVE :: diag_type = 0
++   INTEGER, SAVE :: kernel_type = 0
+ 
+   ! Public subroutines
+ 
+@@ -86,9 +87,10 @@ CONTAINS
+ !> \param error ...
+ !> \author  MI 11.2013       
+ ! *****************************************************************************
+-  SUBROUTINE diag_init(diag_lib,switched,error)
++  SUBROUTINE diag_init(diag_lib,switched,k_elpa,error)
+     CHARACTER(LEN=*), INTENT(IN)             :: diag_lib
+     LOGICAL, INTENT(INOUT)                   :: switched
++    INTEGER, INTENT(IN)                      :: k_elpa
+     TYPE(cp_error_type), INTENT(inout)       :: error
+ 
+     CHARACTER(len=*), PARAMETER :: routineN = 'diag_init', &
+@@ -108,7 +110,7 @@ CONTAINS
      IF(try_library) THEN
          IF(diag_lib.EQ."ELPA") THEN
  
@@ -123,24 +143,54 @@
              diag_type = 3
  #else
            ! ELPA library not linked, switch to SL
-@@ -1006,11 +1006,18 @@ CONTAINS
+@@ -127,6 +129,10 @@ CONTAINS
+          END IF
+     END IF
+ 
++    IF(diag_type == 3) THEN
++       kernel_type = k_elpa
++    END IF
++
+     ! Check that one of the diagonalization type is set
+     IF(diag_type<1) THEN
+       ! something wrong
+@@ -955,6 +961,7 @@ CONTAINS
+                                                 myprow, n, n_rows, nblk, neig
+     INTEGER, DIMENSION(9)                    :: descm, descv
+     LOGICAL                                  :: failure
++    LOGICAL                                  :: success
+     REAL(KIND=dp), DIMENSION(:), POINTER     :: eval
+     REAL(KIND=dp), DIMENSION(:, :), POINTER  :: m, m1, v
+     TYPE(cp_blacs_env_type), POINTER         :: context
+@@ -965,6 +972,7 @@ CONTAINS
+ #if defined(__SCALAPACK)
+ 
+     failure = .FALSE.
++    success = .TRUE.
+ 
+     n = matrix%matrix_struct%nrow_global
+     m => matrix%local_data
+@@ -998,10 +1006,22 @@ CONTAINS
      ! the full eigenvalues vector is needed
      ALLOCATE(eval(n),STAT=istat)
      CPPrecondition(istat==0,cp_failure_level,routineP,error,failure)
 -#if defined (__ELPA)
 +
      ! Calculate eigenvalues/eigenvectors
--!    CALL solve_evp_real_2stage(n,neig,m,n_rows, eval,v,n_rows,nblk,comm_row,comm_col,group)
 +#if defined (__ELPA) || defined (__ELPA2)
 +
 +
 +#if defined (__ELPA)
-+    CALL solve_evp_real_2stage(n,neig,m,n_rows, eval,v,n_rows,nblk,comm_row,comm_col,group)
-+#else
-     success = solve_evp_real_2stage(n,neig,m,n_rows, eval,v,n_rows,nblk,comm_row,comm_col,group,&
-               THIS_REAL_ELPA_KERNEL_API=kernel_type,useQR=.FALSE.)
+     CALL solve_evp_real_2stage(n,neig,m,n_rows, eval,v,n_rows,nblk,comm_row,comm_col,group)
+ #else
++    success = solve_evp_real_2stage(n,neig,m,n_rows, eval,v,n_rows,nblk,comm_row,comm_col,group,&
++              THIS_REAL_ELPA_KERNEL_API=kernel_type,useQR=.FALSE.)
 +#endif
 +
-  
-     CPPrecondition(success,cp_failure_level,routineP,error,failure)
- 
++ 
++    CPPrecondition(success,cp_failure_level,routineP,error,failure)
++
++#else
+     CPPrecondition(.FALSE.,cp_failure_level,routineP,error,failure)
+ #endif
+     eigenvalues(1:neig) = eval(1:neig)




More information about the Debichem-commits mailing list