disabling stdout for MPIrank>0 now working for ifort:
This commit is contained in:
parent
fbf67de37a
commit
39c9c18ade
|
@ -130,30 +130,17 @@ subroutine prec_init
|
|||
iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||
|
||||
implicit none
|
||||
integer(pInt) :: worldrank = 0_pInt
|
||||
#ifdef PETSc
|
||||
#include <petsc/finclude/petscsys.h>
|
||||
PetscErrorCode :: ierr
|
||||
#endif
|
||||
external :: &
|
||||
quit, &
|
||||
MPI_Comm_rank, &
|
||||
MPI_Abort
|
||||
|
||||
#ifdef PETSc
|
||||
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
|
||||
#endif
|
||||
quit
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- prec init -+>>>'
|
||||
write(6,'(/,a)') ' <<<+- prec init -+>>>'
|
||||
#include "compilation_info.f90"
|
||||
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
||||
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
|
||||
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
|
||||
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
||||
write(6,'(a,l3)') ' NaN != NaN: ',DAMASK_NaN /= DAMASK_NaN
|
||||
write(6,'(a,l3,/)') ' NaN check passed ',prec_isNAN(DAMASK_NaN)
|
||||
endif mainProcess
|
||||
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
||||
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
|
||||
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
|
||||
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
||||
write(6,'(a,l3)') ' NaN != NaN: ',DAMASK_NaN /= DAMASK_NaN
|
||||
write(6,'(a,l3,/)') ' NaN check passed ',prec_isNAN(DAMASK_NaN)
|
||||
|
||||
if ((.not. prec_isNaN(DAMASK_NaN)) .or. (DAMASK_NaN == DAMASK_NaN)) call quit(9000)
|
||||
realloc_lhs_test = [1_pInt,2_pInt]
|
||||
|
|
|
@ -77,6 +77,8 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
|||
MPI_Init_Thread, &
|
||||
MPI_abort
|
||||
|
||||
open(6, encoding='UTF-8') ! for special characters in output
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! PETSc Init
|
||||
#ifdef PETSc
|
||||
|
@ -91,26 +93,29 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
|||
CHKERRQ(ierr) ! this is a macro definition, it is case sensitive
|
||||
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
|
||||
#endif
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
if (output_unit /= 6) then
|
||||
write(output_unit,'(a)') 'STDOUT != 6'
|
||||
call quit(1_pInt)
|
||||
endif
|
||||
open(6, encoding='UTF-8')
|
||||
call date_and_time(values = dateAndTime)
|
||||
write(6,'(/,a)') ' <<<+- DAMASK_spectral -+>>>'
|
||||
write(6,'(/,a)') ' Version: '//DAMASKVERSION
|
||||
write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',&
|
||||
dateAndTime(2),'/',&
|
||||
dateAndTime(1)
|
||||
write(6,'(a,2(i2.2,a),i2.2)') ' Time: ',dateAndTime(5),':',&
|
||||
dateAndTime(6),':',&
|
||||
dateAndTime(7)
|
||||
write(6,'(/,a)') ' <<<+- DAMASK_interface init -+>>>'
|
||||
#include "compilation_info.f90"
|
||||
else mainProcess
|
||||
close(6)
|
||||
close(6) ! disable output for non-master processes (open 6 to rank specific file for debug)
|
||||
open(6,file='/dev/null',status='replace') ! close(6) alone will leave some temp files in cwd
|
||||
endif mainProcess
|
||||
|
||||
call date_and_time(values = dateAndTime)
|
||||
write(6,'(/,a)') ' <<<+- DAMASK_spectral -+>>>'
|
||||
write(6,'(/,a)') ' Version: '//DAMASKVERSION
|
||||
write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',&
|
||||
dateAndTime(2),'/',&
|
||||
dateAndTime(1)
|
||||
write(6,'(a,2(i2.2,a),i2.2)') ' Time: ',dateAndTime(5),':',&
|
||||
dateAndTime(6),':',&
|
||||
dateAndTime(7)
|
||||
write(6,'(/,a)') ' <<<+- DAMASK_interface init -+>>>'
|
||||
#include "compilation_info.f90"
|
||||
|
||||
if ( present(loadcaseParameterIn) .and. present(geometryParameterIn)) then ! both mandatory parameters given in function call
|
||||
geometryArg = geometryParameterIn
|
||||
loadcaseArg = loadcaseParameterIn
|
||||
|
|
Loading…
Reference in New Issue