mirror of https://gitlab.com/QEF/q-e.git
When executing several instances of any code in the same directory one or more of them could crash while trying to delete the CRASH file (even if they have different outdir and/or prefix). Fix: if CRASH file is not deleted just print a remark.
LP git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8157 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
c1806a87c8
commit
7bf16c5699
|
@ -39,6 +39,7 @@ CONTAINS
|
|||
LOGICAL :: exst, debug = .false.
|
||||
CHARACTER(LEN=80) :: code_version, uname
|
||||
CHARACTER(LEN=6), EXTERNAL :: int_to_char
|
||||
INTEGER :: iost
|
||||
|
||||
! ... Intel compilers v .ge.8 allocate a lot of stack space
|
||||
! ... Stack limit is often small, thus causing SIGSEGV and crash
|
||||
|
@ -67,8 +68,9 @@ CONTAINS
|
|||
|
||||
INQUIRE( FILE=TRIM(crash_file), EXIST=exst )
|
||||
IF( exst ) THEN
|
||||
OPEN( UNIT=crashunit, FILE=TRIM(crash_file), STATUS='OLD' )
|
||||
CLOSE( UNIT=crashunit, STATUS='DELETE' )
|
||||
OPEN( UNIT=crashunit, FILE=TRIM(crash_file), STATUS='OLD',IOSTAT=iost )
|
||||
IF(iost==0) CLOSE( UNIT=crashunit, STATUS='DELETE', IOSTAT=iost )
|
||||
IF(iost/=0) WRITE(stdout,'(5x,"Remark: CRASH file could not ne deleted")')
|
||||
END IF
|
||||
|
||||
ELSE
|
||||
|
|
Loading…
Reference in New Issue