relocated spectral_quit() into driver code.

added (dummy) core_quit() for Python damask module.
This commit is contained in:
Philip Eisenlohr 2013-02-19 14:54:34 +00:00
parent 0047c32411
commit 7461e13c1e
3 changed files with 29 additions and 18 deletions

View File

@ -515,4 +515,31 @@ program DAMASK_spectral_Driver
end program DAMASK_spectral_Driver end program DAMASK_spectral_Driver
#include "spectral_quit.f90" !********************************************************************
! quit subroutine to satisfy IO_error
!
!********************************************************************
subroutine quit(stop_id)
use prec, only: &
pInt
implicit none
integer(pInt), intent(in) :: stop_id
integer, dimension(8) :: dateAndTime ! type default integer
call date_and_time(values = dateAndTime)
write(6,'(/,a)') 'DAMASK terminated on:'
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)
if (stop_id == 0_pInt) stop 0 ! normal termination
if (stop_id < 0_pInt) then ! trigger regridding
write(0,'(a,i6)') 'restart at ', stop_id*(-1_pInt)
stop 2
endif
if (stop_id == 3_pInt) stop 3 ! not all steps converged
stop 1 ! error (message from IO_error)
end subroutine

View File

@ -43,21 +43,5 @@ subroutine quit(stop_id)
implicit none implicit none
integer(pInt), intent(in) :: stop_id integer(pInt), intent(in) :: stop_id
integer, dimension(8) :: dateAndTime ! type default integer
call date_and_time(values = dateAndTime)
write(6,'(/,a)') 'DAMASK terminated on:'
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)
if (stop_id == 0_pInt) stop 0 ! normal termination
if (stop_id < 0_pInt) then ! trigger regridding
write(0,'(a,i6)') 'restart at ', stop_id*(-1_pInt)
stop 2
endif
if (stop_id == 3_pInt) stop 3 ! not all steps converged
stop 1 ! error (message from IO_error)
end subroutine end subroutine

View File

@ -99,7 +99,7 @@ execute = { \
' %s'%'math.f90'+\ ' %s'%'math.f90'+\
' %s'%'FEsolving.f90'+\ ' %s'%'FEsolving.f90'+\
' %s'%'mesh.f90'+\ ' %s'%'mesh.f90'+\
' %s'%'spectral_quit.f90'+\ ' %s'%'core_quit.f90'+\
' -L%s/lib -lfftw3'%(damaskEnv.pathInfo['fftw'])+\ ' -L%s/lib -lfftw3'%(damaskEnv.pathInfo['fftw'])+\
' %s'%lib_lapack, ' %s'%lib_lapack,
'mv %s `readlink -f %s`' %(os.path.join(codeDir,'core.so'),os.path.join(damaskEnv.relPath('lib/damask'),'core.so')), 'mv %s `readlink -f %s`' %(os.path.join(codeDir,'core.so'),os.path.join(damaskEnv.relPath('lib/damask'),'core.so')),