Index: trunk/LMDZ.COMMON/libf/misc/job_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/job.F90	(revision 4138)
+++ trunk/LMDZ.COMMON/libf/misc/job_mod.F90	(revision 4139)
@@ -1,10 +1,10 @@
-MODULE job
+MODULE job_mod
 
 !-----------------------------------------------------------------------
 ! NAME
-!     job
+!     job_mod
 !
 ! DESCRIPTION
-!     Management of memory throughout the modules of the code.
+!     Tools to retieve job information of the program.
 !
 ! AUTHORS & DATE
@@ -15,8 +15,4 @@
 !-----------------------------------------------------------------------
 
-! DEPENDENCIES
-! ------------
-use numerics, only: dp, di, k4
-
 ! DECLARATION
 ! -----------
@@ -25,7 +21,7 @@
 ! PARAMETERS
 ! ----------
-real(dp)            :: timelimit = 86400._dp ! Time limit for the job: 86400 s = 24 h by default
-real(dp), parameter :: antetime  = 3600._dp  ! Anticipation time to prevent reaching the job time limit: 3600 s = 1 h by default
-logical(k4)         :: timewall = .false.    ! Flag to enable the program self-termination before timeout
+real            :: timelimit = 86400. ! Time limit for the job: 86400 s = 24 h by default
+real, parameter :: antetime  = 3600.  ! Anticipation time to prevent reaching the job time limit: 3600 s = 1 h by default
+logical         :: timewall = .false. ! Flag to enable the program self-termination before timeout
 
 contains
@@ -48,8 +44,4 @@
 !-----------------------------------------------------------------------
 
-! DEPENDENCIES
-! ------------
-use stoppage, only: stop_clean
-
 ! DECLARATION
 ! -----------
@@ -62,5 +54,5 @@
 ! LOCAL VARIABLES
 ! ---------------
-integer(di)    :: sts
+integer        :: sts
 character(256) :: tmp
 
@@ -82,5 +74,5 @@
 endif
 
-call stop_clean(__FILE__,__LINE__,"neither SLURM_JOB_ID nor PBS_JOBID found in environment!",1)
+error stop 'Error: neither SLURM_JOB_ID nor PBS_JOBID found in environment!'
 
 END SUBROUTINE get_job_id
@@ -104,8 +96,4 @@
 !-----------------------------------------------------------------------
 
-! DEPENDENCIES
-! ------------
-use stoppage, only: stop_clean
-
 ! DECLARATION
 ! -----------
@@ -118,7 +106,7 @@
 ! LOCAL VARIABLES
 ! ---------------
-logical(k4)    :: num_str
+logical        :: num_str
 character(256) :: chtimelimit ! Time limit for the job outputted by the SLURM or PBS/TORQUE command
-integer(di)    :: i, ierr, funit, cstat, days, hours, minutes, seconds
+integer        :: i, ierr, funit, cstat, days, hours, minutes, seconds
 character(1)   :: sep
 
@@ -133,5 +121,5 @@
     endif
 enddo
-if (.not. num_str) call stop_clean(__FILE__,__LINE__,"job ID must be numeric!",1)
+if (.not. num_str) error stop "Error: job ID must be numeric!"
 
 ! Try SLURM (squeue)
@@ -141,7 +129,7 @@
     call execute_command_line('qstat -f '//trim(adjustl(jobid))//' | grep "Walltime" | awk ''{print $3}'' > tmp_timelimit.txt',cmdstat = cstat)
     if (cstat > 0) then
-        call stop_clean(__FILE__,__LINE__,'command execution failed!',1)
+        error stop 'Error: command execution failed!'
     else if (cstat < 0) then
-        call stop_clean(__FILE__,__LINE__,'command execution not supported (neither SLURM nor PBS/TORQUE is installed)!',1)
+        error stop 'Error: command execution not supported (neither SLURM nor PBS/TORQUE is installed)!'
     endif
 endif
@@ -149,5 +137,5 @@
 ! Read the output
 open(newunit = funit,file = 'tmp_timelimit.txt',status = 'old',form = 'formatted',action = 'read',iostat = ierr)
-if (ierr /= 0) call stop_clean(__FILE__,__LINE__,'error opening file "tmp_timelimit.txt"!',ierr)
+if (ierr /= 0) error stop 'Error: error opening file "tmp_timelimit.txt"!'
 read(funit,'(a)') chtimelimit
 close(funit)
@@ -157,7 +145,7 @@
 call execute_command_line('rm tmp_timelimit.txt',cmdstat = cstat)
 if (cstat > 0) then
-    call stop_clean(__FILE__,__LINE__,'command execution failed!',1)
+    error stop 'Error: command execution failed!'
 else if (cstat < 0) then
-    call stop_clean(__FILE__,__LINE__,'command execution not supported!',1)
+    error stop 'Error: command execution not supported!'
 endif
 
@@ -165,11 +153,11 @@
 if (index(chtimelimit,'-') > 0) then ! Format "D-HH:MM:SS"
     read(chtimelimit,'(i1,a1,i2,a1,i2,a1,i2)') days, sep, hours, sep, minutes, sep, seconds
-    timelimit = real(days,dp)*86400._dp + real(hours,dp)*3600._dp + real(minutes,dp)*60._dp + real(seconds,dp)
+    timelimit = real(days)*86400. + real(hours)*3600. + real(minutes)*60. + real(seconds)
 else if (index(chtimelimit,':') > 0 .and. len_trim(chtimelimit) > 5) then ! Format "HH:MM:SS"
     read(chtimelimit,'(i2,a1,i2,a1,i2)') hours, sep, minutes, sep, seconds
-    timelimit = real(hours,dp)*3600._dp + real(minutes,dp)*60._dp + real(seconds,dp)
+    timelimit = real(hours)*3600. + real(minutes)*60. + real(seconds)
 else ! Format "MM:SS"
     read(chtimelimit,'(i2,a1,i2)') minutes, sep, seconds
-    timelimit = real(minutes,dp)*60._dp + real(seconds,dp)
+    timelimit = real(minutes)*60. + real(seconds)
 endif
 
@@ -179,3 +167,3 @@
 !=======================================================================
 
-END MODULE job
+END MODULE job_mod
