From 4b9f4f4636ab0b0fe22f026b10159b360afe46cf Mon Sep 17 00:00:00 2001 From: suvarchal Date: Sun, 27 Aug 2023 02:35:53 +0200 Subject: [PATCH] remove unnecessary / in raw restarts that forces us to use ResultPath in the namelist.config, otherwise suing ResultPath= will crash at restart. --- src/io_restart.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/io_restart.F90 b/src/io_restart.F90 index 6475655f2..33fcdb0d4 100644 --- a/src/io_restart.F90 +++ b/src/io_restart.F90 @@ -187,12 +187,12 @@ subroutine restart(istep, nstart, ntotal, l_read, which_readr, ice, dynamics, tr ! initialize directory for core dump restart if(.not. initialized_raw) then initialized_raw = .true. - raw_restart_dirpath = trim(ResultPath)//"/fesom_raw_restart/np"//int_to_txt(partit%npes) - raw_restart_infopath = trim(ResultPath)//"/fesom_raw_restart/np"//int_to_txt(partit%npes)//".info" + raw_restart_dirpath = trim(ResultPath)//"fesom_raw_restart/np"//int_to_txt(partit%npes) + raw_restart_infopath = trim(ResultPath)//"fesom_raw_restart/np"//int_to_txt(partit%npes)//".info" if(raw_restart_length_unit /= "off") then if(partit%mype == RAW_RESTART_METADATA_RANK) then ! execute_command_line with mkdir sometimes fails, use a custom implementation around mkdir from C instead - call mkdir(trim(ResultPath)//"/fesom_raw_restart") ! we have no mkdir -p, create the intermediate dirs separately + call mkdir(trim(ResultPath)//"fesom_raw_restart") ! we have no mkdir -p, create the intermediate dirs separately call mkdir(raw_restart_dirpath) end if call MPI_Barrier(partit%MPI_COMM_FESOM, mpierr) ! make sure the dir has been created before we continue... @@ -203,12 +203,12 @@ subroutine restart(istep, nstart, ntotal, l_read, which_readr, ice, dynamics, tr ! initialize directory for derived type binary restart if(.not. initialized_bin) then initialized_bin = .true. - bin_restart_dirpath = trim(ResultPath)//"/fesom_bin_restart/np"//int_to_txt(partit%npes) - bin_restart_infopath = trim(ResultPath)//"/fesom_bin_restart/np"//int_to_txt(partit%npes)//".info" + bin_restart_dirpath = trim(ResultPath)//"fesom_bin_restart/np"//int_to_txt(partit%npes) + bin_restart_infopath = trim(ResultPath)//"fesom_bin_restart/np"//int_to_txt(partit%npes)//".info" if(bin_restart_length_unit /= "off") then if(partit%mype == RAW_RESTART_METADATA_RANK) then ! execute_command_line with mkdir sometimes fails, use a custom implementation around mkdir from C instead - call mkdir(trim(ResultPath)//"/fesom_bin_restart") ! we have no mkdir -p, create the intermediate dirs separately + call mkdir(trim(ResultPath)//"fesom_bin_restart") ! we have no mkdir -p, create the intermediate dirs separately call mkdir(bin_restart_dirpath) end if call MPI_Barrier(partit%MPI_COMM_FESOM, mpierr) ! make sure the dir has been created before we continue...