[Debichem-commits] [debichem] r5667 - in unstable/cp2k/debian: . patches

mbanck at alioth.debian.org mbanck at alioth.debian.org
Sun Jun 14 14:26:06 UTC 2015


Author: mbanck
Date: 2015-06-14 14:26:06 +0000 (Sun, 14 Jun 2015)
New Revision: 5667

Added:
   unstable/cp2k/debian/patches/elpa2_support.patch
Modified:
   unstable/cp2k/debian/changelog
   unstable/cp2k/debian/patches/series
Log:
  * debian/patches/elpa2_support.patch: New patch to support ELPA2 interface,
    taken from upstream revisions 15202 and 15213.


Modified: unstable/cp2k/debian/changelog
===================================================================
--- unstable/cp2k/debian/changelog	2015-06-14 14:15:18 UTC (rev 5666)
+++ unstable/cp2k/debian/changelog	2015-06-14 14:26:06 UTC (rev 5667)
@@ -1,6 +1,7 @@
 cp2k (2.6.1-3) UNRELEASED; urgency=medium
 
-  * 
+  * debian/patches/elpa2_support.patch: New patch to support ELPA2 interface,
+    taken from upstream revisions 15202 and 15213.
 
  -- Michael Banck <mbanck at debian.org>  Sun, 03 May 2015 17:17:58 +0200
 

Added: unstable/cp2k/debian/patches/elpa2_support.patch
===================================================================
--- unstable/cp2k/debian/patches/elpa2_support.patch	                        (rev 0)
+++ unstable/cp2k/debian/patches/elpa2_support.patch	2015-06-14 14:26:06 UTC (rev 5667)
@@ -0,0 +1,146 @@
+Index: cp2k-2.6.1/src/input_cp2k_global.F
+===================================================================
+--- cp2k-2.6.1.orig/src/input_cp2k_global.F
++++ cp2k-2.6.1/src/input_cp2k_global.F
+@@ -40,6 +40,7 @@ MODULE input_cp2k_global
+        do_fft_sg, do_opt_basis, do_optimize_input, do_pdgemm, do_swarm, &
+        do_tamc, do_test, do_tree_mc, do_tree_mc_ana, driver_run, ehrenfest, &
+        electronic_spectra_run, energy_force_run, energy_run, &
++       elpa_gen,elpa_gen_sim,elpa_bgp,elpa_bgq,elpa_sse,elpa_avx_b2,elpa_avx_b4,elpa_avx_b6,&
+        fftw_plan_estimate, fftw_plan_exhaustive, fftw_plan_measure, &
+        fftw_plan_patient, gaussian, geo_opt_run, linear_response_run, &
+        mol_dyn_run, mon_car_run, none_run, pint_run, real_time_propagation, &
+@@ -114,7 +115,7 @@ CONTAINS
+     CALL keyword_release(keyword,error=error)
+ 
+     CALL keyword_create(keyword, name="PREFERRED_DIAG_LIBRARY",&
+-         description="Specifies the DIAGONALIZATION library. If not availabe ....",&
++         description="Specifies the DIAGONALIZATION library to be used. If not availabe, the standard scalapack is used",&
+          usage="PREFERRED_DIAG_LIBRARY ELPA",&
+          default_i_val=do_diag_sl, &
+          enum_i_vals=(/do_diag_sl,do_diag_sl2,do_diag_elpa/),&
+@@ -123,6 +124,20 @@ CONTAINS
+          supported_feature=.TRUE.,error=error)
+     CALL section_add_keyword(section,keyword,error=error)
+     CALL keyword_release(keyword,error=error)
++
++    CALL keyword_create(keyword, name="ELPA_KERNEL",&
++         description="Specifies the kernel to be used when ELPA is in use",&
++         usage="ELPA_KERNEL SSE",&
++         default_i_val=elpa_gen,&
++         enum_i_vals=(/ elpa_gen,elpa_gen_sim,elpa_bgp,elpa_bgq,elpa_sse,elpa_avx_b2,elpa_avx_b4,elpa_avx_b6/),&
++         enum_c_vals=s2a("GENERIC","GENERIC_SIMPLE","BGP","BGQ","SSE","AVX_BLOCK2","AVX_BLOCK4","AVX_BLOCK6"),&
++         enum_desc=s2a("Generic kernel","Simplified generic kernel","Kernel optimized for IBM BGP","Kernel optimized for IBM BGQ",&
++                       "Kernel wiwth assembler for SSE vectorization","Kernel optimized for x86_64 using SSE2/SSE3 (Intel)",&
++                       "Kernel optimized for x86_64 using SSE2/SSE4 (AMD Bulldozer) ",&
++                       "Kernel optimized for x86_64 using SSE2/SSE4 (block6)"),&
++         supported_feature=.TRUE.,error=error)
++    CALL section_add_keyword(section,keyword,error=error)
++    CALL keyword_release(keyword,error=error)
+ 
+ 
+     CALL keyword_create(keyword, name="PREFERRED_FFT_LIBRARY",&
+Index: cp2k-2.6.1/src/global_types.F
+===================================================================
+--- cp2k-2.6.1.orig/src/global_types.F
++++ cp2k-2.6.1/src/global_types.F
+@@ -79,6 +79,7 @@ MODULE global_types
+      INTEGER :: prog_name_id !! index to define the type of program
+      INTEGER :: run_type_id  !! index to define the run_tupe
+      INTEGER :: blacs_grid_layout !! will store the user preference for the blacs grid
++     INTEGER :: k_elpa !! optimized kernel for the ELPA diagonalization library
+      LOGICAL :: blacs_repeatable !! will store the user preference for the repeatability of blacs collectives
+      REAL(KIND=dp) :: cp2k_start_time, cp2k_target_time
+      INTEGER :: handle
+@@ -114,6 +115,7 @@ CONTAINS
+        globenv%ref_count=1
+        globenv%run_type_id=0
+        globenv%diag_library="SL"
++       globenv%k_elpa=1
+        globenv%default_fft_library="FFTSG"
+        globenv%fftw_wisdom_file_name="/etc/fftw/wisdom"
+        globenv%prog_name_id=0
+Index: cp2k-2.6.1/src/input_constants.F
+===================================================================
+--- cp2k-2.6.1.orig/src/input_constants.F
++++ cp2k-2.6.1/src/input_constants.F
+@@ -691,6 +691,15 @@ MODULE input_constants
+   INTEGER, PARAMETER, PUBLIC               :: do_diag_sl=1,&
+                                               do_diag_sl2=2,&
+                                               do_diag_elpa=3
++  ! ELPA kernel
++  INTEGER, PARAMETER, PUBLIC               :: elpa_gen=1,&
++                                              elpa_gen_sim=2,&
++                                              elpa_bgp=3,&
++                                              elpa_bgq=4,&
++                                              elpa_sse=5,&
++                                              elpa_avx_b2=6,&
++                                              elpa_avx_b4=7,&
++                                              elpa_avx_b6=8
+ 
+   ! FFT library
+   ! these might need sync with fft_lib.F
+Index: cp2k-2.6.1/src/environment.F
+===================================================================
+--- cp2k-2.6.1.orig/src/environment.F
++++ cp2k-2.6.1/src/environment.F
+@@ -554,6 +554,7 @@ CONTAINS
+     CALL section_vals_val_get(global_section,"BLACS_GRID",i_val=globenv%blacs_grid_layout,error=error)
+     CALL section_vals_val_get(global_section,"BLACS_REPEATABLE",l_val=globenv%blacs_repeatable,error=error)
+     CALL section_vals_val_get(global_section,"PREFERRED_DIAG_LIBRARY",i_val=i_diag,error=error)
++    CALL section_vals_val_get(global_section,"ELPA_KERNEL",i_val=globenv%k_elpa,error=error)
+     CALL section_vals_val_get(global_section,"PREFERRED_FFT_LIBRARY",i_val=i_fft,error=error)
+ 
+     CALL section_vals_val_get(global_section,"PRINT_LEVEL",i_val=print_level,error=error)
+@@ -1036,7 +1037,7 @@ CONTAINS
+ 
+     switched = .FALSE.
+   
+-    CALL diag_init(diag_lib=TRIM(globenv%diag_library), switched=switched,error=error)
++    CALL diag_init(diag_lib=TRIM(globenv%diag_library), switched=switched,k_elpa=globenv%k_elpa,error=error)
+   
+     IF(switched) THEN
+   
+Index: cp2k-2.6.1/src/fm/cp_fm_diag.F
+===================================================================
+--- cp2k-2.6.1.orig/src/fm/cp_fm_diag.F
++++ cp2k-2.6.1/src/fm/cp_fm_diag.F
+@@ -48,7 +48,7 @@ MODULE cp_fm_diag
+   USE termination,                     ONLY: stop_program
+   USE timings,                         ONLY: timeset,&
+                                              timestop
+-#if defined (__ELPA)
++#if defined (__ELPA)  || defined(__ELPA2)
+   USE ELPA1
+   USE ELPA2
+ #endif
+@@ -110,7 +110,7 @@ CONTAINS
+     IF(try_library) THEN
+         IF(diag_lib.EQ."ELPA") THEN
+ 
+-#if defined (__ELPA)
++#if defined (__ELPA)  || defined (__ELPA2)
+             diag_type = 3
+ #else
+           ! ELPA library not linked, switch to SL
+@@ -1006,11 +1006,18 @@ 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.)
++#endif
++
+  
+     CPPrecondition(success,cp_failure_level,routineP,error,failure)
+ 

Modified: unstable/cp2k/debian/patches/series
===================================================================
--- unstable/cp2k/debian/patches/series	2015-06-14 14:15:18 UTC (rev 5666)
+++ unstable/cp2k/debian/patches/series	2015-06-14 14:26:06 UTC (rev 5667)
@@ -1,3 +1,4 @@
 makeflags.patch
 data_files_standard_location.patch
 testsuite_output.patch
+elpa2_support.patch




More information about the Debichem-commits mailing list