Commit 3d9c053b authored by Andreas Marek's avatar Andreas Marek
Browse files

ELPA_2013.11 OpenMP tests return error code

If the ELPA library is compiled with OpenMP, the tests check
whether the MPI library provides the neccessary threading level.

There has been the error, that if the required threading level
was not available the test programs aborted, put no explicit
error code was set. This is changed now.
parent 7d7dd578
...@@ -94,7 +94,8 @@ program read_real ...@@ -94,7 +94,8 @@ program read_real
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system" print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available" print *," ", provided_mpi_thread_level, " is available"
stop call EXIT(1)
stop 1
endif endif
#endif #endif
......
...@@ -95,7 +95,8 @@ program read_real_gen ...@@ -95,7 +95,8 @@ program read_real_gen
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system" print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available" print *," ", provided_mpi_thread_level, " is available"
stop call EXIT(1)
stop 1
endif endif
#endif #endif
......
...@@ -136,9 +136,10 @@ program test_complex ...@@ -136,9 +136,10 @@ program test_complex
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system" print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available" print *," ", provided_mpi_thread_level, " is available"
stop call EXIT(1)
stop 1
endif endif
#endif #endif
call mpi_comm_rank(mpi_comm_world,myid,mpierr) call mpi_comm_rank(mpi_comm_world,myid,mpierr)
......
...@@ -139,7 +139,8 @@ program test_complex2 ...@@ -139,7 +139,8 @@ program test_complex2
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system" print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available" print *," ", provided_mpi_thread_level, " is available"
stop call EXIT(1)
stop 1
endif endif
#endif #endif
......
...@@ -106,7 +106,8 @@ program test_complex_gen ...@@ -106,7 +106,8 @@ program test_complex_gen
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system" print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available" print *," ", provided_mpi_thread_level, " is available"
stop call EXIT(1)
stop 1
endif endif
#endif #endif
......
...@@ -136,7 +136,8 @@ program test_real ...@@ -136,7 +136,8 @@ program test_real
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system" print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available" print *," ", provided_mpi_thread_level, " is available"
stop call EXIT(1)
stop 1
endif endif
#endif #endif
......
...@@ -134,7 +134,8 @@ program test_real2 ...@@ -134,7 +134,8 @@ program test_real2
if (required_mpi_thread_level .ne. provided_mpi_thread_level) then if (required_mpi_thread_level .ne. provided_mpi_thread_level) then
print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system" print *,"MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system"
print *," ", provided_mpi_thread_level, " is available" print *," ", provided_mpi_thread_level, " is available"
stop call EXIT(1)
stop 1
endif endif
#endif #endif
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
! the original distribution, the GNU Lesser General Public License. ! the original distribution, the GNU Lesser General Public License.
! !
! !
#include "config-f90.h"
program test_real_gen program test_real_gen
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
...@@ -88,7 +89,22 @@ program test_real_gen ...@@ -88,7 +89,22 @@ program test_real_gen
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! MPI Initialization ! MPI Initialization
#ifndef WITH_OPENMP
call mpi_init(mpierr) call mpi_init(mpierr)
#else
required_mpi_thread_level = MPI_THREAD_MULTIPLE
call mpi_init_thread(required_mpi_thread_level, &
provided_mpi_thread_level, mpierr)
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"
call EXIT(1)
stop 1
endif
#endif
call mpi_comm_rank(mpi_comm_world,myid,mpierr) call mpi_comm_rank(mpi_comm_world,myid,mpierr)
call mpi_comm_size(mpi_comm_world,nprocs,mpierr) call mpi_comm_size(mpi_comm_world,nprocs,mpierr)
......
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