Skip to content
error.F90 1.1 KiB
Newer Older
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
!***********************************************************************
!
!
                       SUBROUTINE error(message)
!
!
!***********************************************************************
!
!
!     Subroutine to terminate the program as the result of a fatal
!     error, close the output files, and dump timing information.
!
!
!=======================================================================

	 USE fly_h 
	 implicit none
        
	INTEGER IZERO
!   Declaration of local variables.
!   -------------------------------

        CHARACTER*(*) message
	
!=======================================================================
!
!   Write error message to the log file.
!   ------------------------------------
         
	 WRITE(uterm,40)
 40     FORMAT(/,1x,72('*'))

        WRITE(uterm,*) 'pe = ',me,' ',message

!-----------------------------------------------------------------------
!   Stop :  terminate the
!   simulation.
!-----------------------------------------------------------------------
        
	ierror=1/pos_cell(1,nc_loc)  !force abort to the run and core dump
        
	STOP
        END