diff --git a/example/ALL_Staggered_f.F90 b/example/ALL_Staggered_f.F90 index 8f2c8a562bb839862e7940f464349cbb9ee6426c..57e4b065749864dfccc080b09ef8774bc0deb88d 100644 --- a/example/ALL_Staggered_f.F90 +++ b/example/ALL_Staggered_f.F90 @@ -33,14 +33,14 @@ program ALL_Staggered_f use, intrinsic :: iso_fortran_env, only: stdin=>input_unit& , stdout=>output_unit& , stderr=>error_unit& - , file_storage_size& - ,int32,int64,real32,real64 + , file_storage_size #ifndef ALL_USE_F08 use mpi #else use mpi_f08 #endif implicit none + integer, parameter :: real64 = selected_real_kind(15) call main() contains @@ -132,6 +132,9 @@ contains integer :: my_rank, maximum_rank integer :: i,j type(ALL_t) :: jall +#ifdef ALL_VTK_OUTPUT + character (len=ALL_ERROR_LENGTH) :: error_msg +#endif call MPI_Init(error) @@ -200,17 +203,14 @@ contains flush(stdout) endif #ifdef ALL_VTK_OUTPUT - block - character (len=ALL_ERROR_LENGTH) :: error_msg - call ALL_reset_error() - call jall%print_vtk_outlines(current_step) - if(ALL_error() /= 0) then - error_msg = ALL_error_description() - write(stdout, '(a)') error_msg - ! Maybe also abort if the output is necesssary or handle this - ! some other way. - endif - end block + call ALL_reset_error() + call jall%print_vtk_outlines(current_step) + if(ALL_error() /= 0) then + error_msg = ALL_error_description() + write(stdout, '(a)') error_msg + ! Maybe also abort if the output is necesssary or handle this + ! some other way. + endif #endif call jall%balance() @@ -221,17 +221,14 @@ contains call MPI_Barrier(MPI_COMM_WORLD, error) enddo #ifdef ALL_VTK_OUTPUT - block - character (len=ALL_ERROR_LENGTH) :: error_msg - call ALL_reset_error() - call jall%print_vtk_outlines(current_step) - if(ALL_error() /= 0) then - error_msg = ALL_error_description() - write(stdout, '(a)') error_msg - ! Maybe also abort if the output is necesssary or handle this - ! some other way. - endif - end block + call ALL_reset_error() + call jall%print_vtk_outlines(current_step) + if(ALL_error() /= 0) then + error_msg = ALL_error_description() + write(stdout, '(a)') error_msg + ! Maybe also abort if the output is necesssary or handle this + ! some other way. + endif #endif call jall%finalize()