From c8554a5641dc9380593a70166d3b9d1cc518e3b6 Mon Sep 17 00:00:00 2001
From: Pratheek Shanthraj
Date: Fri, 27 Mar 2015 07:17:24 +0000
Subject: [PATCH] corrected alignment of restart output byte offset. restart
test working now
---
code/DAMASK_spectral_driver.f90 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/code/DAMASK_spectral_driver.f90 b/code/DAMASK_spectral_driver.f90
index 10aec519d..010b9e566 100644
--- a/code/DAMASK_spectral_driver.f90
+++ b/code/DAMASK_spectral_driver.f90
@@ -372,6 +372,8 @@ program DAMASK_spectral_Driver
call MPI_File_seek (resUnit,my_offset,MPI_SEEK_SET,ierr)
call MPI_File_write(resUnit, materialpoint_results, size(materialpoint_results), &
MPI_DOUBLE, MPI_STATUS_IGNORE, ierr)
+ my_offset = my_offset + sum(outputSize)
+ call MPI_File_seek (resUnit,my_offset,MPI_SEEK_SET,ierr)
else
call MPI_File_open(PETSC_COMM_WORLD, &
trim(getSolverWorkingDirectoryName())//trim(getSolverJobName())//'.spectralOut', &
@@ -560,10 +562,10 @@ program DAMASK_spectral_Driver
if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0_pInt) then ! at output frequency
if (worldrank == 0) &
write(6,'(1/,a)') ' ... writing results to file ......................................'
- my_offset = my_offset + sum(outputSize)
- call MPI_File_seek (resUnit,my_offset,MPI_SEEK_SET,ierr)
call MPI_File_write(resUnit, materialpoint_results, size(materialpoint_results), &
MPI_DOUBLE, MPI_STATUS_IGNORE, ierr)
+ my_offset = my_offset + sum(outputSize)
+ call MPI_File_seek (resUnit,my_offset,MPI_SEEK_SET,ierr)
endif
if( loadCases(currentLoadCase)%restartFrequency > 0_pInt .and. & ! at frequency of writing restart information set restart parameter for FEsolving
mod(inc,loadCases(currentLoadCase)%restartFrequency) == 0_pInt) then ! first call to CPFEM_general will write?