[cig-commits] commit:
Mercurial
hg at geodynamics.org
Mon Nov 24 11:59:43 PST 2008
changeset: 175:6755a2e170a1
user: John Mansour <john.mansour at maths.monash.edu.au>
date: Mon Nov 10 13:21:37 2008 +1100
files: Swarm/src/FileParticleLayout.c
description:
use long integer division so that checkpointing plays nice with big files
diff -r ad4f7b00e065 -r 6755a2e170a1 Swarm/src/FileParticleLayout.c
--- a/Swarm/src/FileParticleLayout.c Wed Nov 05 14:46:34 2008 +1100
+++ b/Swarm/src/FileParticleLayout.c Mon Nov 10 13:21:37 2008 +1100
@@ -224,7 +224,7 @@ void _FileParticleLayout_SetInitialCount
int openResult;
MPI_Offset bytesCount;
SizeT particleSize = swarm->particleExtensionMgr->finalSize;
- div_t division;
+ ldiv_t division;
#endif
Journal_DPrintf( self->debug, "In %s(): for ParticleLayout \"%s\", of type %s\n",
@@ -285,8 +285,8 @@ void _FileParticleLayout_SetInitialCount
Journal_DPrintf( self->debug, "...calculated bytes total of %u.\n", bytesCount );
/* Divide by particle size to get number of particles */
- division = div( bytesCount, particleSize );
- self->totalInitialParticles = division.quot;
+ division = ldiv( bytesCount, (long) particleSize );
+ self->totalInitialParticles = (unsigned int) division.quot;
Journal_DPrintf( self->debug, "given bytes total %u / particle size %u ->\n"
"\ttotalInitialParticles = %u.\n", bytesCount, (unsigned int)particleSize,
More information about the CIG-COMMITS
mailing list