summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2006-01-31 21:09:37 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2006-01-31 21:09:37 (GMT)
commit42d4edcb4a531ab7d890e1e74c92191477697f4c (patch)
tree92e93d1317bc22715e6ef6c868fea563dd530dc7 /testpar
parentfa00ad762d9241cca65bc205e902bb2dd408abe0 (diff)
downloadhdf5-42d4edcb4a531ab7d890e1e74c92191477697f4c.zip
hdf5-42d4edcb4a531ab7d890e1e74c92191477697f4c.tar.gz
hdf5-42d4edcb4a531ab7d890e1e74c92191477697f4c.tar.bz2
[svn-r11915] Purpose:
Attempt to ensure that the parallel cache test runs at a reasonable speed with large numbers of processors. Description: In some cases, the number of random locks and unlocks was a multiple of the MPI rank. Solution: Use rank % 4 instead of simply rank. Platforms tested: copper Misc. update:
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_cache.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index c1b52c5..5e969a8 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -2834,7 +2834,9 @@ smoke_check_2(void)
*
* Modifications:
*
- * None.
+ * Added code intended to ensure correct operation with large
+ * numbers of processors.
+ * JRM - 1/31/06
*
*****************************************************************************/
@@ -2921,6 +2923,10 @@ smoke_check_3(void)
min_idx = 0;
max_idx = ((NUM_DATA_ENTRIES / 10) /
((file_mpi_rank + 1) * (file_mpi_rank + 1))) - 1;
+ if ( max_idx <= min_idx ) {
+
+ max_idx = min_idx + 10;
+ }
for ( i = (NUM_DATA_ENTRIES / 2) - 1; i >= 0; i-=2 )
{
@@ -2933,6 +2939,10 @@ smoke_check_3(void)
min_idx = 0;
max_idx = ((NUM_DATA_ENTRIES / 10) /
((file_mpi_rank + 3) * (file_mpi_rank + 3))) - 1;
+ if ( max_idx <= min_idx ) {
+
+ max_idx = min_idx + 10;
+ }
for ( i = 0; i < (NUM_DATA_ENTRIES / 2); i+=2 )
{
@@ -2998,7 +3008,7 @@ smoke_check_3(void)
}
}
- /* verify that all instance of datum are back where the started
+ /* verify that all instances of datum are back where the started
* and are clean.
*/
@@ -3076,7 +3086,9 @@ smoke_check_3(void)
*
* Modifications:
*
- * None.
+ * Added code intended to insure correct operation with large
+ * numbers of processors.
+ * JRM - 1/31/06
*
*****************************************************************************/
@@ -3130,7 +3142,7 @@ smoke_check_4(void)
}
- min_count = 100 * file_mpi_rank;
+ min_count = 100 * (file_mpi_rank % 4);
max_count = min_count + 50;
for ( i = 0; i < (NUM_DATA_ENTRIES / 4); i++ )
@@ -3145,7 +3157,7 @@ smoke_check_4(void)
}
}
- min_count = 10 * file_mpi_rank;
+ min_count = 10 * (file_mpi_rank % 4);
max_count = min_count + 100;
for ( i = (NUM_DATA_ENTRIES / 4); i < (NUM_DATA_ENTRIES / 2); i++ )
@@ -3184,7 +3196,7 @@ smoke_check_4(void)
min_idx, max_idx, 0, 100);
}
- min_count = 10 * file_mpi_rank;
+ min_count = 10 * (file_mpi_rank % 4);
max_count = min_count + 100;
/* rename the first half of the entries... */
@@ -3212,7 +3224,7 @@ smoke_check_4(void)
/* finally, do some dirty lock/unlocks while we give the cache
* a chance t reduce its size.
*/
- min_count = 100 * file_mpi_rank;
+ min_count = 100 * (file_mpi_rank % 4);
max_count = min_count + 100;
for ( i = 0; i < (NUM_DATA_ENTRIES / 2); i+=2 )