diff --git a/ELPA_2014.06/config.h.in b/ELPA_2014.06/config.h.in index 475be276edc42d24791896206076100d70bc5f8c..efcf014b1579701fa15d95664eba2cf781d00985 100644 --- a/ELPA_2014.06/config.h.in +++ b/ELPA_2014.06/config.h.in @@ -6,6 +6,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* can use module iso_fortran_env */ +#undef HAVE_ISO_FORTRAN_ENV + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H diff --git a/ELPA_2014.06/configure b/ELPA_2014.06/configure index 83df4a80d07dd51273827607a47497161a582598..633569da77733b63d58368ef03d7b33349a1782e 100755 --- a/ELPA_2014.06/configure +++ b/ELPA_2014.06/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for elpa 2013.11.008. +# Generated by GNU Autoconf 2.69 for elpa 2014.06.000. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='elpa' PACKAGE_TARNAME='elpa' -PACKAGE_VERSION='2013.11.008' -PACKAGE_STRING='elpa 2013.11.008' +PACKAGE_VERSION='2014.06.000' +PACKAGE_STRING='elpa 2014.06.000' PACKAGE_BUGREPORT='elpa-library@rzg.mpg.de' PACKAGE_URL='' @@ -678,8 +678,6 @@ WITH_OPENMP_TRUE FC_MODOUT ac_empty FC_MODINC -ELPA_SO_VERSION -ELPA_LIB_VERSION FCFLAGS ac_ct_FC FC @@ -740,6 +738,8 @@ CC FORTRAN_MODULE_DEPS CPP_FOUND ifGNUmake +ELPA_SO_VERSION +ELPA_LIB_VERSION AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V @@ -1390,7 +1390,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures elpa 2013.11.008 to adapt to many kinds of systems. +\`configure' configures elpa 2014.06.000 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1460,7 +1460,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of elpa 2013.11.008:";; + short | recursive ) echo "Configuration of elpa 2014.06.000:";; esac cat <<\_ACEOF @@ -1599,7 +1599,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -elpa configure 2013.11.008 +elpa configure 2014.06.000 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2082,7 +2082,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by elpa $as_me 2013.11.008, which was +It was created by elpa $as_me 2014.06.000, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2947,7 +2947,7 @@ fi # Define the identity of the package. PACKAGE='elpa' - VERSION='2013.11.008' + VERSION='2014.06.000' cat >>confdefs.h <<_ACEOF @@ -3041,6 +3041,13 @@ fi AM_BACKSLASH='\' +ELPA_LIB_VERSION=2014.06.000 + +# this is the version of the API, should be changed in the major revision +# if and only if the actual API changes +ELPA_SO_VERSION=0:0:0 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 $as_echo_n "checking for GNU make... " >&6; } if ${_cv_gnu_make_command+:} false; then : @@ -5913,14 +5920,6 @@ fi - -ELPA_LIB_VERSION=2013.11.006 - -# this is the version of the API, should be changed in the major revision -# if and only if the actual API changes -ELPA_SO_VERSION=0:0:0 - - ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -6213,6 +6212,27 @@ save_LDFLAGS=$LDFLAGS FCFLAGS="$FCFLAGS $BLACS_FCFLAGS" LDFLAGS="$LDFLAGS $BLACS_LDFLAGS" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran module iso_fortran_env is available" >&5 +$as_echo_n "checking whether Fortran module iso_fortran_env is available... " >&6; } +cat > conftest.$ac_ext <<_ACEOF + + program test_error_unit + use ISO_FORTRAN_ENV, only : error_unit + implicit none + + write(error_unit,*) "error_unit is defined" + end program + +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + can_use_iso_fortran_env=yes +else + can_use_iso_fortran_env=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile a Fortran program using MKL" >&5 $as_echo_n "checking whether we can compile a Fortran program using MKL... " >&6; } @@ -6545,6 +6565,12 @@ FCFLAGS=$save_FCFLAGS LDFLAGS=$save_LDFLAGS +if test "x${can_use_iso_fortran_env}" = "xyes" ; then + +$as_echo "#define HAVE_ISO_FORTRAN_ENV 1" >>confdefs.h + +fi + case `pwd` in *\ * | *\ *) @@ -20809,7 +20835,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by elpa $as_me 2013.11.008, which was +This file was extended by elpa $as_me 2014.06.000, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20875,7 +20901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -elpa config.status 2013.11.008 +elpa config.status 2014.06.000 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/ELPA_2014.06/configure.ac b/ELPA_2014.06/configure.ac index e79722dd77e7543e84ac18a783b8f35885c0419b..89c1d6607eb5f200105383877941482219b71bfc 100644 --- a/ELPA_2014.06/configure.ac +++ b/ELPA_2014.06/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.69]) -AC_INIT([elpa],[2013.11.008], elpa-library@rzg.mpg.de) +AC_INIT([elpa],[2014.06.000], elpa-library@rzg.mpg.de) AC_CONFIG_SRCDIR([src/elpa1.F90]) AM_INIT_AUTOMAKE([foreign -Wall subdir-objects]) @@ -7,6 +7,11 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AM_SILENT_RULES([yes]) +AC_SUBST([ELPA_LIB_VERSION], [2014.06.000]) +# this is the version of the API, should be changed in the major revision +# if and only if the actual API changes +AC_SUBST([ELPA_SO_VERSION], [0:0:0]) + AX_CHECK_GNU_MAKE() if test x$_cv_gnu_make_command = x ; then AC_MSG_ERROR([Need GNU Make]) @@ -195,12 +200,6 @@ AX_PROG_FC_MPI([],[have_mpi=yes],[have_mpi=no AC_MSG_ERROR([no mpi found]) fi]) - -AC_SUBST([ELPA_LIB_VERSION], [2013.11.006]) -# this is the version of the API, should be changed in the major revision -# if and only if the actual API changes -AC_SUBST([ELPA_SO_VERSION], [0:0:0]) - AC_FC_FREEFORM AC_FC_MODULE_FLAG AC_FC_MODULE_OUTPUT_FLAG @@ -235,6 +234,21 @@ save_LDFLAGS=$LDFLAGS FCFLAGS="$FCFLAGS $BLACS_FCFLAGS" LDFLAGS="$LDFLAGS $BLACS_LDFLAGS" + +dnl check wheter fortran error_unit is defined +AC_MSG_CHECKING([whether Fortran module iso_fortran_env is available]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + program test_error_unit + use ISO_FORTRAN_ENV, only : error_unit + implicit none + + write(error_unit,*) "error_unit is defined" + end program +])], + [can_use_iso_fortran_env=yes], + [can_use_iso_fortran_env=no] +) + dnl check whether one can link with specified MKL (desired method) AC_MSG_CHECKING([whether we can compile a Fortran program using MKL]) @@ -331,6 +345,11 @@ FCFLAGS=$save_FCFLAGS LDFLAGS=$save_LDFLAGS +dnl set the conditionals according to the previous tests +if test "x${can_use_iso_fortran_env}" = "xyes" ; then + AC_DEFINE([HAVE_ISO_FORTRAN_ENV],[1],[can use module iso_fortran_env]) +fi + LT_INIT diff --git a/ELPA_2014.06/src/elpa1.F90 b/ELPA_2014.06/src/elpa1.F90 index f1cfc6e490e7b7253cc4860cca7dd288925bb5b8..4c391273a50f9bbb4d559cc5aa1918f9a3dd2f52 100644 --- a/ELPA_2014.06/src/elpa1.F90 +++ b/ELPA_2014.06/src/elpa1.F90 @@ -50,7 +50,9 @@ module ELPA1 -! Version 1.1.2, 2011-02-21 +#ifdef HAVE_ISO_FORTRAN_ENV + use iso_fortran_env, only : error_unit +#endif implicit none @@ -85,6 +87,10 @@ 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 @@ -199,19 +205,19 @@ subroutine solve_evp_real(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_rows, mpi_ ttt0 = MPI_Wtime() call tridiag_real(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, ev, e, tau) ttt1 = MPI_Wtime() - if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time tridiag_real :',ttt1-ttt0 + if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) write(error_unit,*) 'Time tridiag_real :',ttt1-ttt0 time_evp_fwd = ttt1-ttt0 ttt0 = MPI_Wtime() call solve_tridi(na, nev, ev, e, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() - if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time solve_tridi :',ttt1-ttt0 + if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) write(error_unit,*) 'Time solve_tridi :',ttt1-ttt0 time_evp_solve = ttt1-ttt0 ttt0 = MPI_Wtime() call trans_ev_real(na, nev, a, lda, tau, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() - if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time trans_ev_real:',ttt1-ttt0 + if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) write(error_unit,*) 'Time trans_ev_real:',ttt1-ttt0 time_evp_back = ttt1-ttt0 deallocate(e, tau) @@ -285,13 +291,13 @@ subroutine solve_evp_complex(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_rows, m ttt0 = MPI_Wtime() call tridiag_complex(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, ev, e, tau) ttt1 = MPI_Wtime() - if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time tridiag_complex :',ttt1-ttt0 + if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) write(error_unit,*) 'Time tridiag_complex :',ttt1-ttt0 time_evp_fwd = ttt1-ttt0 ttt0 = MPI_Wtime() call solve_tridi(na, nev, ev, e, q_real, l_rows, nblk, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() - if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time solve_tridi :',ttt1-ttt0 + if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) write(error_unit,*) 'Time solve_tridi :',ttt1-ttt0 time_evp_solve = ttt1-ttt0 ttt0 = MPI_Wtime() @@ -299,7 +305,7 @@ subroutine solve_evp_complex(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_rows, m call trans_ev_complex(na, nev, a, lda, tau, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() - if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) print *,'Time trans_ev_complex:',ttt1-ttt0 + if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) write(error_unit,*) 'Time trans_ev_complex:',ttt1-ttt0 time_evp_back = ttt1-ttt0 deallocate(q_real) @@ -1800,7 +1806,7 @@ subroutine solve_tridi( na, nev, d, e, q, ldq, nblk, mpi_comm_rows, mpi_comm_col ! Scalapack supports it but delivers no results for these columns, ! which is rather annoying if(nc==0) then - print *,'ERROR: Problem contains processor column with zero width' + write(error_unit,*) 'ERROR: Problem contains processor column with zero width' call MPI_Abort(MPI_COMM_WORLD,1,mpierr) endif @@ -1888,7 +1894,7 @@ recursive subroutine merge_recursive(np_off, nprocs) if(nprocs<=1) then ! Safety check only - print *,"INTERNAL error merge_recursive: nprocs=",nprocs + write(error_unit,*) "INTERNAL error merge_recursive: nprocs=",nprocs call mpi_abort(MPI_COMM_WORLD,1,mpierr) endif @@ -2144,7 +2150,7 @@ subroutine solve_tridi_single(nlen, d, e, q, ldq) ! DSTEDC failed, try DSTEQR. The workspace is enough for DSTEQR. - print '(a,i8,a)','Warning: Lapack routine DSTEDC failed, info= ',info,', Trying DSTEQR!' + write(error_unit,'(a,i8,a)') 'Warning: Lapack routine DSTEDC failed, info= ',info,', Trying DSTEQR!' d(:) = ds(:) e(:) = es(:) @@ -2152,7 +2158,7 @@ subroutine solve_tridi_single(nlen, d, e, q, ldq) ! If DSTEQR fails also, we don't know what to do further ... if(info /= 0) then - print '(a,i8,a)','ERROR: Lapack routine DSTEQR failed, info= ',info,', Aborting!' + write(error_unit,'(a,i8,a)') 'ERROR: Lapack routine DSTEQR failed, info= ',info,', Aborting!' call mpi_abort(mpi_comm_world,0,mpierr) endif @@ -2166,12 +2172,12 @@ subroutine solve_tridi_single(nlen, d, e, q, ldq) do i=1,nlen-1 if(d(i+1) 1d-14) then - print '(a,i8,2g25.16)','***WARNING: Monotony error dste**:',i+1,d(i),d(i+1) + write(error_unit,'(a,i8,2g25.16)') '***WARNING: Monotony error dste**:',i+1,d(i),d(i+1) else - print '(a,i8,2g25.16)','Info: Monotony error dste{dc,qr}:',i+1,d(i),d(i+1) - print '(a)', 'The eigenvalues from a lapack call are not sorted to machine precision.' - print '(a)', 'In this extent, this is completely harmless.' - print '(a)', 'Still, we keep this info message just in case.' + write(error_unit,'(a,i8,2g25.16)') 'Info: Monotony error dste{dc,qr}:',i+1,d(i),d(i+1) + write(error_unit,'(a)') 'The eigenvalues from a lapack call are not sorted to machine precision.' + write(error_unit,'(a)') 'In this extent, this is completely harmless.' + write(error_unit,'(a)') 'Still, we keep this info message just in case.' end if allocate(qtmp(nlen)) dtmp = d(i+1) @@ -3016,7 +3022,7 @@ subroutine check_monotony(n,d,text) do i=1,n-1 if(d(i+1) tridiagonal @@ -182,7 +189,7 @@ subroutine solve_evp_real_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_row call tridiag_band_real(na, nbw, nblk, a, lda, ev, e, mpi_comm_rows, mpi_comm_cols, mpi_comm_all) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time tridiag_band_real :',ttt1-ttt0 + write(error_unit,*) 'Time tridiag_band_real :',ttt1-ttt0 call mpi_bcast(ev,na,MPI_REAL8,0,mpi_comm_all,mpierr) call mpi_bcast(e,na,MPI_REAL8,0,mpi_comm_all,mpierr) @@ -196,7 +203,7 @@ subroutine solve_evp_real_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_row call solve_tridi(na, nev, ev, e, q, ldq, nblk, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time solve_tridi :',ttt1-ttt0 + write(error_unit,*) 'Time solve_tridi :',ttt1-ttt0 time_evp_solve = ttt1-ttt0 ttts = ttt1 @@ -208,7 +215,7 @@ subroutine solve_evp_real_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_row call trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time trans_ev_tridi_to_band_real:',ttt1-ttt0 + write(error_unit,*) 'Time trans_ev_tridi_to_band_real:',ttt1-ttt0 ! We can now deallocate the stored householder vectors deallocate(hh_trans_real) @@ -219,7 +226,7 @@ subroutine solve_evp_real_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_row call trans_ev_band_to_full_real(na, nev, nblk, nbw, a, lda, tmat, q, ldq, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time trans_ev_band_to_full_real :',ttt1-ttt0 + write(error_unit,*) 'Time trans_ev_band_to_full_real :',ttt1-ttt0 time_evp_back = ttt1-ttts deallocate(tmat) @@ -301,7 +308,7 @@ subroutine solve_evp_complex_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_ call bandred_complex(na, a, lda, nblk, nbw, mpi_comm_rows, mpi_comm_cols, tmat) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time bandred_complex :',ttt1-ttt0 + write(error_unit,*) 'Time bandred_complex :',ttt1-ttt0 ! Reduction band -> tridiagonal @@ -311,7 +318,7 @@ subroutine solve_evp_complex_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_ call tridiag_band_complex(na, nbw, nblk, a, lda, ev, e, mpi_comm_rows, mpi_comm_cols, mpi_comm_all) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time tridiag_band_complex :',ttt1-ttt0 + write(error_unit,*) 'Time tridiag_band_complex :',ttt1-ttt0 call mpi_bcast(ev,na,MPI_REAL8,0,mpi_comm_all,mpierr) call mpi_bcast(e,na,MPI_REAL8,0,mpi_comm_all,mpierr) @@ -331,7 +338,7 @@ subroutine solve_evp_complex_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_ call solve_tridi(na, nev, ev, e, q_real, ubound(q_real,1), nblk, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time solve_tridi :',ttt1-ttt0 + write(error_unit,*) 'Time solve_tridi :',ttt1-ttt0 time_evp_solve = ttt1-ttt0 ttts = ttt1 @@ -345,7 +352,7 @@ subroutine solve_evp_complex_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_ call trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time trans_ev_tridi_to_band_complex:',ttt1-ttt0 + write(error_unit,*) 'Time trans_ev_tridi_to_band_complex:',ttt1-ttt0 ! We can now deallocate the stored householder vectors deallocate(hh_trans_complex) @@ -356,7 +363,7 @@ subroutine solve_evp_complex_2stage(na, nev, a, lda, ev, q, ldq, nblk, mpi_comm_ call trans_ev_band_to_full_complex(na, nev, nblk, nbw, a, lda, tmat, q, ldq, mpi_comm_rows, mpi_comm_cols) ttt1 = MPI_Wtime() if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print 1,'Time trans_ev_band_to_full_complex :',ttt1-ttt0 + write(error_unit,*) 'Time trans_ev_band_to_full_complex :',ttt1-ttt0 time_evp_back = ttt1-ttts deallocate(tmat) @@ -426,8 +433,8 @@ subroutine bandred_real(na, a, lda, nblk, nbw, mpi_comm_rows, mpi_comm_cols, tma if(mod(nbw,nblk)/=0) then if(my_prow==0 .and. my_pcol==0) then - print *,'ERROR: nbw=',nbw,', nblk=',nblk - print *,'ELPA2 works only for nbw==n*nblk' + write(error_unit,*) 'ERROR: nbw=',nbw,', nblk=',nblk + write(error_unit,*) 'ELPA2 works only for nbw==n*nblk' call mpi_abort(mpi_comm_world,0,mpierr) endif endif @@ -1592,8 +1599,8 @@ subroutine trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, mpi_comm_rows if(mod(nbw,nblk)/=0) then if(my_prow==0 .and. my_pcol==0) then - print *,'ERROR: nbw=',nbw,', nblk=',nblk - print *,'band backtransform works only for nbw==n*nblk' + write(error_unit,*) 'ERROR: nbw=',nbw,', nblk=',nblk + write(error_unit,*) 'band backtransform works only for nbw==n*nblk' call mpi_abort(mpi_comm_world,0,mpierr) endif endif @@ -2179,7 +2186,7 @@ subroutine trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, mpi_comm_rows offset = nbw - top_msg_length if(offset<0) then - print *,'internal error, offset for shifting = ',offset + write(error_unit,*) 'internal error, offset for shifting = ',offset call MPI_Abort(MPI_COMM_WORLD, 1, mpierr) endif a_off = a_off + offset @@ -2204,10 +2211,10 @@ subroutine trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, mpi_comm_rows enddo ! Just for safety: - if(ANY(top_send_request /= MPI_REQUEST_NULL)) print *,'*** ERROR top_send_request ***',my_prow,my_pcol - if(ANY(bottom_send_request /= MPI_REQUEST_NULL)) print *,'*** ERROR bottom_send_request ***',my_prow,my_pcol - if(ANY(top_recv_request /= MPI_REQUEST_NULL)) print *,'*** ERROR top_recv_request ***',my_prow,my_pcol - if(ANY(bottom_recv_request /= MPI_REQUEST_NULL)) print *,'*** ERROR bottom_recv_request ***',my_prow,my_pcol + if(ANY(top_send_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR top_send_request ***',my_prow,my_pcol + if(ANY(bottom_send_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR bottom_send_request ***',my_prow,my_pcol + if(ANY(top_recv_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR top_recv_request ***',my_prow,my_pcol + if(ANY(bottom_recv_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR bottom_recv_request ***',my_prow,my_pcol if(my_prow == 0) then #ifdef WITH_OPENMP @@ -2219,11 +2226,11 @@ subroutine trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, mpi_comm_rows #endif endif - if(ANY(result_send_request /= MPI_REQUEST_NULL)) print *,'*** ERROR result_send_request ***',my_prow,my_pcol - if(ANY(result_recv_request /= MPI_REQUEST_NULL)) print *,'*** ERROR result_recv_request ***',my_prow,my_pcol + if(ANY(result_send_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR result_send_request ***',my_prow,my_pcol + if(ANY(result_recv_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR result_recv_request ***',my_prow,my_pcol if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print '(" Kernel time:",f10.3," MFlops: ",f10.3)', kernel_time, kernel_flops/kernel_time*1.d-6 + write(error_unit,'(" Kernel time:",f10.3," MFlops: ",f10.3)') kernel_time, kernel_flops/kernel_time*1.d-6 ! deallocate all working space @@ -2656,8 +2663,8 @@ subroutine bandred_complex(na, a, lda, nblk, nbw, mpi_comm_rows, mpi_comm_cols, if(mod(nbw,nblk)/=0) then if(my_prow==0 .and. my_pcol==0) then - print *,'ERROR: nbw=',nbw,', nblk=',nblk - print *,'ELPA2 works only for nbw==n*nblk' + write(error_unit,*) 'ERROR: nbw=',nbw,', nblk=',nblk + write(error_unit,*) 'ELPA2 works only for nbw==n*nblk' call mpi_abort(mpi_comm_world,0,mpierr) endif endif @@ -3814,8 +3821,8 @@ subroutine trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, mpi_comm_r if(mod(nbw,nblk)/=0) then if(my_prow==0 .and. my_pcol==0) then - print *,'ERROR: nbw=',nbw,', nblk=',nblk - print *,'band backtransform works only for nbw==n*nblk' + write(error_unit,*) 'ERROR: nbw=',nbw,', nblk=',nblk + write(error_unit,*) 'band backtransform works only for nbw==n*nblk' call mpi_abort(mpi_comm_world,0,mpierr) endif endif @@ -4430,7 +4437,7 @@ subroutine trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, mpi_comm_r offset = nbw - top_msg_length if(offset<0) then - print *,'internal error, offset for shifting = ',offset + write(error_unit,*) 'internal error, offset for shifting = ',offset call MPI_Abort(MPI_COMM_WORLD, 1, mpierr) endif a_off = a_off + offset @@ -4455,10 +4462,10 @@ subroutine trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, mpi_comm_r enddo ! Just for safety: - if(ANY(top_send_request /= MPI_REQUEST_NULL)) print *,'*** ERROR top_send_request ***',my_prow,my_pcol - if(ANY(bottom_send_request /= MPI_REQUEST_NULL)) print *,'*** ERROR bottom_send_request ***',my_prow,my_pcol - if(ANY(top_recv_request /= MPI_REQUEST_NULL)) print *,'*** ERROR top_recv_request ***',my_prow,my_pcol - if(ANY(bottom_recv_request /= MPI_REQUEST_NULL)) print *,'*** ERROR bottom_recv_request ***',my_prow,my_pcol + if(ANY(top_send_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR top_send_request ***',my_prow,my_pcol + if(ANY(bottom_send_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR bottom_send_request ***',my_prow,my_pcol + if(ANY(top_recv_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR top_recv_request ***',my_prow,my_pcol + if(ANY(bottom_recv_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR bottom_recv_request ***',my_prow,my_pcol if(my_prow == 0) then #ifdef WITH_OPENMP @@ -4470,11 +4477,11 @@ subroutine trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, mpi_comm_r #endif endif - if(ANY(result_send_request /= MPI_REQUEST_NULL)) print *,'*** ERROR result_send_request ***',my_prow,my_pcol - if(ANY(result_recv_request /= MPI_REQUEST_NULL)) print *,'*** ERROR result_recv_request ***',my_prow,my_pcol + if(ANY(result_send_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR result_send_request ***',my_prow,my_pcol + if(ANY(result_recv_request /= MPI_REQUEST_NULL)) write(error_unit,*) '*** ERROR result_recv_request ***',my_prow,my_pcol if(my_prow==0 .and. my_pcol==0 .and. elpa_print_times) & - print '(" Kernel time:",f10.3," MFlops: ",f10.3)', kernel_time, kernel_flops/kernel_time*1.d-6 + write(error_unit,'(" Kernel time:",f10.3," MFlops: ",f10.3)') kernel_time, kernel_flops/kernel_time*1.d-6 ! deallocate all working space