Commit 5dd88a52 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl

Remove most iso_fortran_env #ifdefs

parent 0913a668
......@@ -52,9 +52,6 @@ module ELPA1
use elpa_utilities
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_DETAILED_TIMINGS
use timings
#endif
......@@ -91,10 +88,6 @@ module ELPA1
public :: hh_transform_real
public :: hh_transform_complex
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
!-------------------------------------------------------------------------------
! Timing results, set by every call to solve_evp_xxx
......
......@@ -65,12 +65,6 @@ module ELPA2
use elpa_utilities
USE ELPA1
use elpa2_utilities
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
use elpa_pdgeqrf
implicit none
......@@ -91,9 +85,6 @@ module ELPA2
public :: tridiag_band_complex
public :: trans_ev_tridi_to_band_complex
public :: trans_ev_band_to_full_complex
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
public :: band_band_real
public :: divide_band
......
......@@ -60,12 +60,7 @@
#include <elpa/elpa_kernel_constants.h>
module ELPA2_utilities
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
use ELPA_utilities
implicit none
PRIVATE ! By default, all routines contained are private
......@@ -95,10 +90,6 @@ module ELPA2_utilities
public :: qr_decomposition_via_environment_variable
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
integer, parameter :: number_of_real_kernels = ELPA2_NUMBER_OF_REAL_KERNELS
integer, parameter :: REAL_ELPA_KERNEL_GENERIC = ELPA2_REAL_KERNEL_GENERIC
integer, parameter :: REAL_ELPA_KERNEL_GENERIC_SIMPLE = ELPA2_REAL_KERNEL_GENERIC_SIMPLE
......
......@@ -60,18 +60,17 @@
module ELPA_utilities
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
implicit none
PRIVATE ! By default, all routines contained are private
private ! By default, all routines contained are private
public :: debug_messages_via_environment_variable, pcol, prow
public :: debug_messages_via_environment_variable, pcol, prow, error_unit
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
integer, parameter :: error_unit = 0
#endif
......
......@@ -61,17 +61,15 @@ program read_real
!-------------------------------------------------------------------------------
use ELPA1
use elpa_utilities, only : error_unit
#ifdef WITH_OPENMP
use test_util
#endif
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
#ifdef HAVE_DETAILED_TIMINGS
use timings
use timings
#endif
implicit none
include 'mpif.h'
......@@ -101,9 +99,6 @@ program read_real
character*256 filename
#ifdef WITH_OPENMP
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -45,11 +45,7 @@ module mod_read_input_parameters
contains
subroutine read_input_parameters(na, nev, nblk, write_to_file)
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : stderr => error_unit
#else
#define stderr 0
#endif
use ELPA_utilities, only : error_unit
implicit none
include 'mpif.h'
......@@ -67,8 +63,8 @@ module mod_read_input_parameters
write_to_file = .false.
if (.not. any(COMMAND_ARGUMENT_COUNT() == [0, 3, 4])) then
write(stderr, '(a,i0,a)') "Invalid number (", COMMAND_ARGUMENT_COUNT(), ") of command line arguments!"
write(stderr, *) "Expected: program [ [matrix_size num_eigenvalues block_size] ""output""]"
write(error_unit, '(a,i0,a)') "Invalid number (", COMMAND_ARGUMENT_COUNT(), ") of command line arguments!"
write(error_unit, *) "Expected: program [ [matrix_size num_eigenvalues block_size] ""output""]"
stop 1
endif
......@@ -94,7 +90,7 @@ module mod_read_input_parameters
if (arg4 .eq. "output") then
write_to_file = .true.
else
write(stderr, *) "Invalid value for output flag! Must be ""output"" or omitted"
write(error_unit, *) "Invalid value for output flag! Must be ""output"" or omitted"
stop 1
endif
......
......@@ -45,10 +45,8 @@ module mod_setup_mpi
contains
subroutine setup_mpi(myid, nprocs)
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
use test_util
use ELPA_utilities
implicit none
include 'mpif.h'
......
......@@ -73,6 +73,7 @@ program test_complex
!-------------------------------------------------------------------------------
use ELPA1
use elpa_utilities, only : error_unit
#ifdef WITH_OPENMP
use test_util
#endif
......@@ -82,9 +83,6 @@ program test_complex
use mod_setup_mpi
use mod_blacs_infrastructure
use mod_prepare_matrix
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -125,9 +123,6 @@ program test_complex
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
logical :: write_to_file
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
success = .true.
......
......@@ -79,6 +79,7 @@ program test_complex2
use ELPA1
use ELPA2
use elpa_utilities, only : error_unit
#ifdef WITH_OPENMP
use test_util
#endif
......@@ -88,9 +89,6 @@ program test_complex2
use mod_setup_mpi
use mod_blacs_infrastructure
use mod_prepare_matrix
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
......@@ -135,13 +133,6 @@ program test_complex2
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
logical :: write_to_file
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
success = .true.
......
......@@ -79,6 +79,7 @@ program test_complex2
use ELPA1
use ELPA2
use elpa_utilities, only : error_unit
use elpa2_utilities
use mod_read_input_parameters
......@@ -91,9 +92,6 @@ program test_complex2
use test_util
#endif
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -139,12 +137,6 @@ program test_complex2
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
logical :: write_to_file
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
success = .true.
......
......@@ -80,6 +80,7 @@ program test_complex2
use ELPA1
use ELPA2
use elpa_utilities, only : error_unit
use elpa2_utilities
use mod_read_input_parameters
use mod_check_correctness
......@@ -91,10 +92,6 @@ program test_complex2
use test_util
#endif
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -138,11 +135,6 @@ program test_complex2
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
logical :: write_to_file
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
success = .true.
......
......@@ -74,6 +74,7 @@ program test_real
!-------------------------------------------------------------------------------
use ELPA1
use elpa_utilities, only : error_unit
#ifdef WITH_OPENMP
use test_util
#endif
......@@ -84,9 +85,6 @@ program test_real
use mod_blacs_infrastructure
use mod_prepare_matrix
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -128,13 +126,8 @@ program test_real
provided_mpi_thread_level
#endif
logical :: write_to_file
!-------------------------------------------------------------------------------
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
!-------------------------------------------------------------------------------
success = .true.
......
......@@ -80,6 +80,7 @@ program test_real2
use ELPA1
use ELPA2
use elpa_utilities, only : error_unit
#ifdef WITH_OPENMP
use test_util
#endif
......@@ -90,9 +91,6 @@ program test_real2
use mod_blacs_infrastructure
use mod_prepare_matrix
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -130,12 +128,6 @@ program test_real2
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
logical :: write_to_file
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
success = .true.
......
......@@ -81,6 +81,7 @@ program test_real2
use ELPA1
use ELPA2
use elpa_utilities, only : error_unit
use elpa2_utilities
use mod_read_input_parameters
......@@ -93,9 +94,6 @@ program test_real2
use test_util
#endif
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -135,11 +133,6 @@ program test_real2
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
logical :: write_to_file
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
success = .true.
......
......@@ -80,6 +80,7 @@ program test_real2
use ELPA1
use ELPA2
use elpa_utilities, only : error_unit
use elpa2_utilities
use mod_read_input_parameters
......@@ -92,9 +93,6 @@ program test_real2
use test_util
#endif
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -133,12 +131,7 @@ program test_real2
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
logical :: write_to_file
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
logical :: success
success = .true.
......
......@@ -81,6 +81,7 @@ program test_real2
use ELPA1
use ELPA2
use elpa_utilities, only : error_unit
use elpa2_utilities
use mod_read_input_parameters
......@@ -93,9 +94,6 @@ program test_real2
use test_util
#endif
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -134,13 +132,7 @@ program test_real2
integer :: omp_get_max_threads, required_mpi_thread_level, provided_mpi_thread_level
#endif
logical :: write_to_file
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
logical :: success
success = .true.
write_to_file = .false.
......
......@@ -74,6 +74,7 @@ program test_real
!-------------------------------------------------------------------------------
use ELPA1
use elpa_utilities, only : error_unit
use from_c
#ifdef WITH_OPENMP
use test_util
......@@ -85,9 +86,6 @@ program test_real
use mod_blacs_infrastructure
use mod_prepare_matrix
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
#ifdef HAVE_REDIRECT
use redirect
#endif
......@@ -135,11 +133,6 @@ program test_real
logical :: write_to_file
integer :: checksWrong, checksWrongRecv
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
logical :: success
success = .true.
......
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