refactor: replace non-standard GNU Fortran extensions with standard intrinsics
This commit is contained in:
parent
962704e5f7
commit
2c84fe09d3
3 changed files with 13 additions and 23 deletions
|
|
@ -125,16 +125,15 @@ contains
|
|||
subroutine openmpi_get_command_line
|
||||
implicit none
|
||||
|
||||
character*80 :: tmp_str
|
||||
integer :: iargc
|
||||
character(len=80) :: tmp_str
|
||||
|
||||
! reading the run_name from the command line
|
||||
if(iargc().eq.0) then
|
||||
call getarg(0,tmp_str)
|
||||
if(command_argument_count().eq.0) then
|
||||
call get_command_argument(0,tmp_str)
|
||||
print*, 'Format: ',trim(tmp_str),' (run name) ["split"/"never"]'
|
||||
stop
|
||||
end if
|
||||
call getarg(1,run_name_local)
|
||||
call get_command_argument(1,run_name_local)
|
||||
if(len_trim(run_name_local).ne.10) then
|
||||
print *, 'Run name: "',run_name_local,'"'
|
||||
print *, ' "1234567890"'
|
||||
|
|
@ -143,7 +142,7 @@ contains
|
|||
end if
|
||||
|
||||
! getting the split parameter, if it's there
|
||||
if(iargc().eq.2) call getarg(2,split)
|
||||
if(command_argument_count().eq.2) call get_command_argument(2,split)
|
||||
|
||||
|
||||
end subroutine openmpi_get_command_line
|
||||
|
|
|
|||
|
|
@ -172,14 +172,8 @@ MODULE post
|
|||
real(real64) :: dt,dummyu
|
||||
INTEGER :: ncyc
|
||||
|
||||
integer(8) :: ctime_i
|
||||
character(len=30) :: date
|
||||
|
||||
REAL*4 :: e, t(2)
|
||||
REAL*4 :: e0, t0(2)
|
||||
REAL*4 :: e1, t1(2)
|
||||
|
||||
e0 = etime(t0)
|
||||
integer :: date_values(8)
|
||||
|
||||
OPEN(num,FORM='unformatted',STATUS='unknown')
|
||||
|
||||
|
|
@ -210,18 +204,15 @@ MODULE post
|
|||
|
||||
CLOSE (num)
|
||||
|
||||
e = etime(t)
|
||||
|
||||
ctime_i = time8()
|
||||
call ctime(ctime_i,date)
|
||||
call date_and_time(values=date_values)
|
||||
write(date, '(I4.4,"-",I2.2,"-",I2.2," ",I2.2,":",I2.2,":",I2.2)') &
|
||||
date_values(1), date_values(2), date_values(3), &
|
||||
date_values(5), date_values(6), date_values(7)
|
||||
|
||||
WRITE(*,'(a,a,i2,a,i1,a,i4,a,i4,a,i4)') &
|
||||
date, "PID", myid, "|PASS", ipass, "|fort.", num, &
|
||||
"|", nprogress, "/", endnum-startnum+1
|
||||
|
||||
|
||||
|
||||
|
||||
END SUBROUTINE READ_FILE
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@
|
|||
WRITE(*,*) " -v print version information"
|
||||
WRITE(*,*) " -x print latex equations"
|
||||
ELSE IF(num1char=="-v") THEN
|
||||
WRITE(*,*) input_string(1:lnblnk(input_string))
|
||||
WRITE(*,*) input_string(1:len_trim(input_string))
|
||||
ELSE IF(num1char=="-x") THEN
|
||||
WRITE(*,*) latex_string(1:lnblnk(latex_string))
|
||||
WRITE(*,*) latex_string(1:len_trim(latex_string))
|
||||
ELSE
|
||||
WRITE(*,*) 'ERROR, OPTION NOT SUPPORTED ', num1char
|
||||
END IF
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
CALL m_openmpi_init
|
||||
|
||||
if (iammaster) write(*,*) input_string(1:lnblnk(input_string))
|
||||
if (iammaster) write(*,*) input_string(1:len_trim(input_string))
|
||||
|
||||
CALL main
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue