SUBROUTINE local_tremain( remaining_time ) !------------------------------------------------------------------------------! ! Actual revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Id: local_tremain.f90 4 2007-02-13 11:33:16Z letzel $ ! RCS Log replace by Id keyword, revision history cleaned up ! ! Revision 1.14 2006/06/02 15:20:33 raasch ! Extended to TIT Sun Fire X4600 System (lctit) ! ! Revision 1.1 1998/03/18 20:14:47 raasch ! Initial revision ! ! ! Description: ! ------------ ! For different operating systems get the remaining cpu-time of the job !------------------------------------------------------------------------------! USE control_parameters USE cpulog USE pegrid IMPLICIT NONE REAL :: remaining_time !#if defined( __vpp ) ! REAL :: cpu_time_used, rdum !#endif #if defined( __ibm ) INTEGER(8) :: IRTC REAL :: actual_wallclock_time #elif defined( __lctit ) INTEGER :: count, count_rate REAL :: actual_wallclock_time #endif #if defined( __t3eh ) || defined( __t3eb ) || defined( __t3ej2 ) || defined( __t3ej5 ) CALL MPP_TREMAIN( remaining_time ) !#elif defined( __vpp ) ! ! CALL CLOCKV( rdum, cpu_time_used, 0, 2 ) ! remaining_time = maximum_cpu_time_allowed - cpu_time_used #elif defined( __ibm ) ! CALL SYSTEM_CLOCK( count, count_rate ) ! actual_wallclock_time = REAL( count ) / REAL( count_rate ) actual_wallclock_time = IRTC( ) * 1E-9 remaining_time = maximum_cpu_time_allowed - & ( actual_wallclock_time - initial_wallclock_time ) #elif defined( __lctit ) CALL SYSTEM_CLOCK( count, count_rate ) actual_wallclock_time = REAL( count ) / REAL( count_rate ) remaining_time = maximum_cpu_time_allowed - & ( actual_wallclock_time - initial_wallclock_time ) #elif defined( __nec ) CALL TREMAIN( remaining_time ) remaining_time = remaining_time / tasks_per_node #else ! !-- No stop due to running out of cpu-time on other machines remaining_time = 9999999.9 #endif END SUBROUTINE local_tremain