disabling stdout for MPIrank>0 now working for ifort:
This commit is contained in:
parent
fbf67de37a
commit
39c9c18ade
|
@ -130,21 +130,9 @@ subroutine prec_init
|
||||||
iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt) :: worldrank = 0_pInt
|
|
||||||
#ifdef PETSc
|
|
||||||
#include <petsc/finclude/petscsys.h>
|
|
||||||
PetscErrorCode :: ierr
|
|
||||||
#endif
|
|
||||||
external :: &
|
external :: &
|
||||||
quit, &
|
quit
|
||||||
MPI_Comm_rank, &
|
|
||||||
MPI_Abort
|
|
||||||
|
|
||||||
#ifdef PETSc
|
|
||||||
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mainProcess: if (worldrank == 0) then
|
|
||||||
write(6,'(/,a)') ' <<<+- prec init -+>>>'
|
write(6,'(/,a)') ' <<<+- prec init -+>>>'
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
||||||
|
@ -153,7 +141,6 @@ subroutine prec_init
|
||||||
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
||||||
write(6,'(a,l3)') ' NaN != NaN: ',DAMASK_NaN /= DAMASK_NaN
|
write(6,'(a,l3)') ' NaN != NaN: ',DAMASK_NaN /= DAMASK_NaN
|
||||||
write(6,'(a,l3,/)') ' NaN check passed ',prec_isNAN(DAMASK_NaN)
|
write(6,'(a,l3,/)') ' NaN check passed ',prec_isNAN(DAMASK_NaN)
|
||||||
endif mainProcess
|
|
||||||
|
|
||||||
if ((.not. prec_isNaN(DAMASK_NaN)) .or. (DAMASK_NaN == DAMASK_NaN)) call quit(9000)
|
if ((.not. prec_isNaN(DAMASK_NaN)) .or. (DAMASK_NaN == DAMASK_NaN)) call quit(9000)
|
||||||
realloc_lhs_test = [1_pInt,2_pInt]
|
realloc_lhs_test = [1_pInt,2_pInt]
|
||||||
|
|
|
@ -77,6 +77,8 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
||||||
MPI_Init_Thread, &
|
MPI_Init_Thread, &
|
||||||
MPI_abort
|
MPI_abort
|
||||||
|
|
||||||
|
open(6, encoding='UTF-8') ! for special characters in output
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! PETSc Init
|
! PETSc Init
|
||||||
#ifdef PETSc
|
#ifdef PETSc
|
||||||
|
@ -91,12 +93,17 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
||||||
CHKERRQ(ierr) ! this is a macro definition, it is case sensitive
|
CHKERRQ(ierr) ! this is a macro definition, it is case sensitive
|
||||||
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
|
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mainProcess: if (worldrank == 0) then
|
mainProcess: if (worldrank == 0) then
|
||||||
if (output_unit /= 6) then
|
if (output_unit /= 6) then
|
||||||
write(output_unit,'(a)') 'STDOUT != 6'
|
write(output_unit,'(a)') 'STDOUT != 6'
|
||||||
call quit(1_pInt)
|
call quit(1_pInt)
|
||||||
endif
|
endif
|
||||||
open(6, encoding='UTF-8')
|
else mainProcess
|
||||||
|
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)
|
call date_and_time(values = dateAndTime)
|
||||||
write(6,'(/,a)') ' <<<+- DAMASK_spectral -+>>>'
|
write(6,'(/,a)') ' <<<+- DAMASK_spectral -+>>>'
|
||||||
write(6,'(/,a)') ' Version: '//DAMASKVERSION
|
write(6,'(/,a)') ' Version: '//DAMASKVERSION
|
||||||
|
@ -108,9 +115,7 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
|
||||||
dateAndTime(7)
|
dateAndTime(7)
|
||||||
write(6,'(/,a)') ' <<<+- DAMASK_interface init -+>>>'
|
write(6,'(/,a)') ' <<<+- DAMASK_interface init -+>>>'
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
else mainProcess
|
|
||||||
close(6)
|
|
||||||
endif mainProcess
|
|
||||||
if ( present(loadcaseParameterIn) .and. present(geometryParameterIn)) then ! both mandatory parameters given in function call
|
if ( present(loadcaseParameterIn) .and. present(geometryParameterIn)) then ! both mandatory parameters given in function call
|
||||||
geometryArg = geometryParameterIn
|
geometryArg = geometryParameterIn
|
||||||
loadcaseArg = loadcaseParameterIn
|
loadcaseArg = loadcaseParameterIn
|
||||||
|
|
Loading…
Reference in New Issue