Commit e2b1a693 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl

Print human-readable supported MPI thread level

Small helper module for better error diagnostics
parent e7c45e05
......@@ -117,31 +117,31 @@ noinst_PROGRAMS = \
build_lib = libelpa-@PACKAGE_VERSION@@SUFFIX@.la
elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90
elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90 test/util.F90
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90 test/util.F90
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90 test/util.F90
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90 test/util.F90
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90 test/util.F90
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90 test/util.F90
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90 test/util.F90
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90 test/util.F90
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 test/util.F90
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
check_SCRIPTS = \
......
......@@ -195,7 +195,8 @@ am_libelpa_@PACKAGE_VERSION@@SUFFIX@_la_OBJECTS = src/elpa1.lo \
libelpa_@PACKAGE_VERSION@@SUFFIX@_la_OBJECTS = \
$(am_libelpa_@PACKAGE_VERSION@@SUFFIX@_la_OBJECTS)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
am_elpa1_test_complex@SUFFIX@_OBJECTS = test/test_complex.$(OBJEXT)
am_elpa1_test_complex@SUFFIX@_OBJECTS = test/test_complex.$(OBJEXT) \
test/util.$(OBJEXT)
elpa1_test_complex@SUFFIX@_OBJECTS = \
$(am_elpa1_test_complex@SUFFIX@_OBJECTS)
elpa1_test_complex@SUFFIX@_DEPENDENCIES = $(build_lib)
......@@ -203,41 +204,48 @@ AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
am_elpa1_test_real@SUFFIX@_OBJECTS = test/test_real.$(OBJEXT)
am_elpa1_test_real@SUFFIX@_OBJECTS = test/test_real.$(OBJEXT) \
test/util.$(OBJEXT)
elpa1_test_real@SUFFIX@_OBJECTS = \
$(am_elpa1_test_real@SUFFIX@_OBJECTS)
elpa1_test_real@SUFFIX@_DEPENDENCIES = $(build_lib)
am_elpa2_print_kernels@SUFFIX@_OBJECTS = \
src/print_available_elpa2_kernels.$(OBJEXT)
src/print_available_elpa2_kernels.$(OBJEXT) \
test/util.$(OBJEXT)
elpa2_print_kernels@SUFFIX@_OBJECTS = \
$(am_elpa2_print_kernels@SUFFIX@_OBJECTS)
elpa2_print_kernels@SUFFIX@_DEPENDENCIES = $(build_lib)
am_elpa2_test_complex@SUFFIX@_OBJECTS = test/test_complex2.$(OBJEXT)
am_elpa2_test_complex@SUFFIX@_OBJECTS = test/test_complex2.$(OBJEXT) \
test/util.$(OBJEXT)
elpa2_test_complex@SUFFIX@_OBJECTS = \
$(am_elpa2_test_complex@SUFFIX@_OBJECTS)
elpa2_test_complex@SUFFIX@_DEPENDENCIES = $(build_lib)
am_elpa2_test_complex_choose_kernel_with_api@SUFFIX@_OBJECTS = \
test/test_complex2_choose_kernel_with_api.$(OBJEXT)
test/test_complex2_choose_kernel_with_api.$(OBJEXT) \
test/util.$(OBJEXT)
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_OBJECTS = $(am_elpa2_test_complex_choose_kernel_with_api@SUFFIX@_OBJECTS)
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_DEPENDENCIES = \
$(build_lib)
am_elpa2_test_complex_default_kernel@SUFFIX@_OBJECTS = \
test/test_complex2_default_kernel.$(OBJEXT)
test/test_complex2_default_kernel.$(OBJEXT) \
test/util.$(OBJEXT)
elpa2_test_complex_default_kernel@SUFFIX@_OBJECTS = \
$(am_elpa2_test_complex_default_kernel@SUFFIX@_OBJECTS)
elpa2_test_complex_default_kernel@SUFFIX@_DEPENDENCIES = $(build_lib)
am_elpa2_test_real@SUFFIX@_OBJECTS = test/test_real2.$(OBJEXT)
am_elpa2_test_real@SUFFIX@_OBJECTS = test/test_real2.$(OBJEXT) \
test/util.$(OBJEXT)
elpa2_test_real@SUFFIX@_OBJECTS = \
$(am_elpa2_test_real@SUFFIX@_OBJECTS)
elpa2_test_real@SUFFIX@_DEPENDENCIES = $(build_lib)
am_elpa2_test_real_choose_kernel_with_api@SUFFIX@_OBJECTS = \
test/test_real2_choose_kernel_with_api.$(OBJEXT)
test/test_real2_choose_kernel_with_api.$(OBJEXT) \
test/util.$(OBJEXT)
elpa2_test_real_choose_kernel_with_api@SUFFIX@_OBJECTS = \
$(am_elpa2_test_real_choose_kernel_with_api@SUFFIX@_OBJECTS)
elpa2_test_real_choose_kernel_with_api@SUFFIX@_DEPENDENCIES = \
$(build_lib)
am_elpa2_test_real_default_kernel@SUFFIX@_OBJECTS = \
test/test_real2_default_kernel.$(OBJEXT)
test/test_real2_default_kernel.$(OBJEXT) test/util.$(OBJEXT)
elpa2_test_real_default_kernel@SUFFIX@_OBJECTS = \
$(am_elpa2_test_real_default_kernel@SUFFIX@_OBJECTS)
elpa2_test_real_default_kernel@SUFFIX@_DEPENDENCIES = $(build_lib)
......@@ -767,23 +775,23 @@ dist_doc_DATA = README COPYING/COPYING COPYING/gpl.txt COPYING/lgpl.txt
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = @PKG_CONFIG_FILE@
build_lib = libelpa-@PACKAGE_VERSION@@SUFFIX@.la
elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90
elpa1_test_real@SUFFIX@_SOURCES = test/test_real.F90 test/util.F90
elpa1_test_real@SUFFIX@_LDADD = $(build_lib)
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90
elpa2_test_real@SUFFIX@_SOURCES = test/test_real2.F90 test/util.F90
elpa2_test_real@SUFFIX@_LDADD = $(build_lib)
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90
elpa2_test_real_default_kernel@SUFFIX@_SOURCES = test/test_real2_default_kernel.F90 test/util.F90
elpa2_test_real_default_kernel@SUFFIX@_LDADD = $(build_lib)
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90
elpa2_test_real_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_real2_choose_kernel_with_api.F90 test/util.F90
elpa2_test_real_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90
elpa1_test_complex@SUFFIX@_SOURCES = test/test_complex.F90 test/util.F90
elpa1_test_complex@SUFFIX@_LDADD = $(build_lib)
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90
elpa2_test_complex@SUFFIX@_SOURCES = test/test_complex2.F90 test/util.F90
elpa2_test_complex@SUFFIX@_LDADD = $(build_lib)
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90
elpa2_test_complex_default_kernel@SUFFIX@_SOURCES = test/test_complex2_default_kernel.F90 test/util.F90
elpa2_test_complex_default_kernel@SUFFIX@_LDADD = $(build_lib)
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_SOURCES = test/test_complex2_choose_kernel_with_api.F90 test/util.F90
elpa2_test_complex_choose_kernel_with_api@SUFFIX@_LDADD = $(build_lib)
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90
elpa2_print_kernels@SUFFIX@_SOURCES = src/print_available_elpa2_kernels.F90 test/util.F90
elpa2_print_kernels@SUFFIX@_LDADD = $(build_lib)
check_SCRIPTS = \
elpa1_test_real.sh \
......@@ -1019,6 +1027,8 @@ test/$(DEPDIR)/$(am__dirstamp):
@: > test/$(DEPDIR)/$(am__dirstamp)
test/test_complex.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
test/util.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
elpa1_test_complex@SUFFIX@$(EXEEXT): $(elpa1_test_complex@SUFFIX@_OBJECTS) $(elpa1_test_complex@SUFFIX@_DEPENDENCIES) $(EXTRA_elpa1_test_complex@SUFFIX@_DEPENDENCIES)
@rm -f elpa1_test_complex@SUFFIX@$(EXEEXT)
......
......@@ -50,6 +50,9 @@ program read_real
!-------------------------------------------------------------------------------
use ELPA1
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -93,7 +96,7 @@ program read_real
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -50,6 +50,9 @@ program read_real_gen
!-------------------------------------------------------------------------------
use ELPA1
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -94,7 +97,7 @@ program read_real_gen
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -55,6 +55,9 @@ program test_complex
!-------------------------------------------------------------------------------
use ELPA1
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -137,7 +140,7 @@ program test_complex
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -56,6 +56,9 @@ program test_complex2
use ELPA1
use ELPA2
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -139,7 +142,7 @@ program test_complex2
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -57,6 +57,9 @@ program test_complex2
use ELPA1
use ELPA2
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -140,7 +143,7 @@ program test_complex2
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -56,6 +56,9 @@ program test_complex2
use ELPA1
use ELPA2
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -138,7 +141,7 @@ program test_complex2
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -56,6 +56,9 @@ program test_complex_gen
!-------------------------------------------------------------------------------
use ELPA1
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -105,7 +108,7 @@ program test_complex_gen
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -56,6 +56,9 @@ program test_real
!-------------------------------------------------------------------------------
use ELPA1
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -137,7 +140,7 @@ program test_real
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -57,6 +57,9 @@ program test_real2
use ELPA1
use ELPA2
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -136,7 +139,7 @@ program test_real2
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -57,6 +57,9 @@ program test_real2
use ELPA1
use ELPA2
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -134,7 +137,7 @@ program test_real2
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -57,6 +57,9 @@ program test_real2
use ELPA1
use ELPA2
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -134,7 +137,7 @@ program test_real2
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
......@@ -56,6 +56,9 @@ program test_real_gen
!-------------------------------------------------------------------------------
use ELPA1
#ifdef WITH_OPENMP
use test_util
#endif
implicit none
include 'mpif.h'
......@@ -98,7 +101,7 @@ program test_real_gen
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available"
print *," ", mpi_thread_level_name(provided_mpi_thread_level), " is available"
call EXIT(1)
stop 1
endif
......
module test_util
implicit none
private
public mpi_thread_level_name
include 'mpif.h'
contains
pure function mpi_thread_level_name(level) result(str)
integer, intent(in) :: level
character(len=21) :: str
select case(level)
case (MPI_THREAD_SINGLE)
str = "MPI_THREAD_SINGLE"
case (MPI_THREAD_FUNNELED)
str = "MPI_THREAD_FUNNELED"
case (MPI_THREAD_SERIALIZED)
str = "MPI_THREAD_SERIALIZED"
case (MPI_THREAD_MULTIPLE)
str = "MPI_THREAD_MULTIPLE"
case default
write(str,'(i0,1x,a)') level, "(Unknown level)"
end select
end function
end module
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment