Merge branch 'avoid_data_copy_restart_MPI' into spring-cleaning
This commit is contained in:
commit
4cc0dedf9f
|
@ -235,10 +235,18 @@ subroutine grid_mechanical_FEM_init
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_read(groupHandle,P_aim, 'P_aim')
|
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
|
||||||
call HDF5_read(groupHandle,F_aim, 'F_aim')
|
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
if(ierr /=0) error stop 'MPI error'
|
||||||
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot')
|
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
|
||||||
|
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||||
|
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||||
|
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
call HDF5_read(groupHandle,F, 'F')
|
call HDF5_read(groupHandle,F, 'F')
|
||||||
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
call HDF5_read(groupHandle,u_current, 'u')
|
call HDF5_read(groupHandle,u_current, 'u')
|
||||||
|
@ -261,8 +269,12 @@ subroutine grid_mechanical_FEM_init
|
||||||
|
|
||||||
restartRead2: if (interface_restartInc > 0) then
|
restartRead2: if (interface_restartInc > 0) then
|
||||||
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
||||||
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg')
|
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||||
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||||
|
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
|
||||||
call HDF5_closeGroup(groupHandle)
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
@ -431,17 +443,17 @@ subroutine grid_mechanical_FEM_restartWrite
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
||||||
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_write(groupHandle,P_aim, 'P_aim')
|
call HDF5_write(groupHandle,P_aim, 'P_aim',.false.)
|
||||||
call HDF5_write(groupHandle,F_aim, 'F_aim')
|
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
|
||||||
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||||
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot')
|
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||||
call HDF5_write(groupHandle,F, 'F')
|
call HDF5_write(groupHandle,F, 'F')
|
||||||
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
call HDF5_write(groupHandle,u_current, 'u')
|
call HDF5_write(groupHandle,u_current, 'u')
|
||||||
call HDF5_write(groupHandle,u_lastInc, 'u_lastInc')
|
call HDF5_write(groupHandle,u_lastInc, 'u_lastInc')
|
||||||
|
|
||||||
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg')
|
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||||
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||||
|
|
||||||
call HDF5_closeGroup(groupHandle)
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
|
@ -183,10 +183,18 @@ subroutine grid_mechanical_spectral_basic_init
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_read(groupHandle,P_aim, 'P_aim')
|
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
|
||||||
call HDF5_read(groupHandle,F_aim, 'F_aim')
|
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
if(ierr /=0) error stop 'MPI error'
|
||||||
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot')
|
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
|
||||||
|
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||||
|
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||||
|
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
call HDF5_read(groupHandle,F, 'F')
|
call HDF5_read(groupHandle,F, 'F')
|
||||||
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
|
|
||||||
|
@ -204,8 +212,12 @@ subroutine grid_mechanical_spectral_basic_init
|
||||||
|
|
||||||
restartRead2: if (interface_restartInc > 0) then
|
restartRead2: if (interface_restartInc > 0) then
|
||||||
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
||||||
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg')
|
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||||
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||||
|
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
|
||||||
call HDF5_closeGroup(groupHandle)
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
@ -370,16 +382,16 @@ subroutine grid_mechanical_spectral_basic_restartWrite
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
||||||
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_write(groupHandle,P_aim, 'P_aim')
|
call HDF5_write(groupHandle,P_aim, 'P_aim',.false.)
|
||||||
call HDF5_write(groupHandle,F_aim, 'F_aim')
|
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
|
||||||
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||||
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot')
|
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||||
call HDF5_write(groupHandle,F, 'F')
|
call HDF5_write(groupHandle,F, 'F')
|
||||||
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
|
|
||||||
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg')
|
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||||
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||||
call HDF5_write(groupHandle,C_minMaxAvg, 'C_minMaxAvg')
|
call HDF5_write(groupHandle,C_minMaxAvg, 'C_minMaxAvg',.false.)
|
||||||
|
|
||||||
call HDF5_closeGroup(groupHandle)
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
|
@ -205,10 +205,18 @@ subroutine grid_mechanical_spectral_polarisation_init
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
|
||||||
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
groupHandle = HDF5_openGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_read(groupHandle,P_aim, 'P_aim')
|
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
|
||||||
call HDF5_read(groupHandle,F_aim, 'F_aim')
|
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
if(ierr /=0) error stop 'MPI error'
|
||||||
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot')
|
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
|
||||||
|
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||||
|
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||||
|
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
call HDF5_read(groupHandle,F, 'F')
|
call HDF5_read(groupHandle,F, 'F')
|
||||||
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
call HDF5_read(groupHandle,F_tau, 'F_tau')
|
call HDF5_read(groupHandle,F_tau, 'F_tau')
|
||||||
|
@ -230,8 +238,12 @@ subroutine grid_mechanical_spectral_polarisation_init
|
||||||
|
|
||||||
restartRead2: if (interface_restartInc > 0) then
|
restartRead2: if (interface_restartInc > 0) then
|
||||||
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
|
||||||
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg')
|
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||||
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||||
|
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
|
if(ierr /=0) error stop 'MPI error'
|
||||||
|
|
||||||
call HDF5_closeGroup(groupHandle)
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
@ -426,17 +438,17 @@ subroutine grid_mechanical_spectral_polarisation_restartWrite
|
||||||
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
|
||||||
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
groupHandle = HDF5_addGroup(fileHandle,'solver')
|
||||||
|
|
||||||
call HDF5_write(groupHandle,F_aim, 'P_aim')
|
call HDF5_write(groupHandle,F_aim, 'P_aim',.false.)
|
||||||
call HDF5_write(groupHandle,F_aim, 'F_aim')
|
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
|
||||||
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc')
|
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
|
||||||
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot')
|
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
|
||||||
call HDF5_write(groupHandle,F, 'F')
|
call HDF5_write(groupHandle,F, 'F')
|
||||||
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
|
||||||
call HDF5_write(groupHandle,F_tau, 'F_tau')
|
call HDF5_write(groupHandle,F_tau, 'F_tau')
|
||||||
call HDF5_write(groupHandle,F_tau_lastInc,'F_tau_lastInc')
|
call HDF5_write(groupHandle,F_tau_lastInc,'F_tau_lastInc')
|
||||||
|
|
||||||
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg')
|
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
|
||||||
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc')
|
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
|
||||||
|
|
||||||
call HDF5_closeGroup(groupHandle)
|
call HDF5_closeGroup(groupHandle)
|
||||||
call HDF5_closeFile(fileHandle)
|
call HDF5_closeFile(fileHandle)
|
||||||
|
|
Loading…
Reference in New Issue