Skip to content

Commit

Permalink
Complement PR #425 and fix to CPUID-select ELPA-kernel
Browse files Browse the repository at this point in the history
Complement PR #425 and fix selecting ELPA-kernel. In case of MACHINE_CPU_GENERIC, the selection was incorrectly attempting to use the best possible/known CPU-extension.
  • Loading branch information
hfp committed Jul 12, 2019
1 parent 74c8e9e commit 1325aee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fm/cp_fm_elpa.F
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,15 @@ END FUNCTION get_elpa_kernel_descriptions
! **************************************************************************************************
PURE FUNCTION get_elpa_kernel_index(cpuid) RESULT(index)
USE machine, ONLY: MACHINE_X86, &
MACHINE_CPU_GENERIC, &
MACHINE_X86_SSE4, &
MACHINE_X86_AVX, &
MACHINE_X86_AVX2
INTEGER, INTENT(IN) :: cpuid
INTEGER :: index

index = 1 ! AUTO
IF (cpuid .LE. MACHINE_X86) THEN
IF ((MACHINE_CPU_GENERIC .LT. cpuid) .AND. (cpuid .LE. MACHINE_X86)) THEN
SELECT CASE (cpuid)
CASE (MACHINE_X86_SSE4)
index = 8 ! ELPA_2STAGE_REAL_SSE_BLOCK4
Expand Down

0 comments on commit 1325aee

Please sign in to comment.