[cig-commits] commit: added parallel benchmark scripts

Mercurial hg at geodynamics.org
Thu May 29 15:57:40 PDT 2008


changeset:   135:d016870dcb70
tag:         tip
user:        Marc Spiegelman <mspieg at ldeo.columbia.edu>
date:        Thu May 29 18:57:28 2008 -0400
files:       Benchmarks/ParallelPerformance/commonOptions_FieldSplit.options Benchmarks/ParallelPerformance/createParallelBenchmarkInputs.m Benchmarks/ParallelPerformance/runStrongScalingBenchmark matlab/sincSolitaryWaves/writeSolitaryWave2DInputFile.m
description:
added parallel benchmark scripts


diff -r 8bd7f2c080c7 -r d016870dcb70 Benchmarks/ParallelPerformance/commonOptions_FieldSplit.options
--- a/Benchmarks/ParallelPerformance/commonOptions_FieldSplit.options	Thu May 29 14:21:23 2008 -0400
+++ b/Benchmarks/ParallelPerformance/commonOptions_FieldSplit.options	Thu May 29 18:57:28 2008 -0400
@@ -1,5 +1,8 @@
+# Use periodic vertical Boundary conditions
+-zBCFlag 0
+
 # set runtime and output time 
--t_max 11
+-t_max 100
 -t_output 1
 -cfl 2
 
@@ -7,8 +10,8 @@
 #-output_file binaryOutput/FieldSplitOutput
 
 # General convergence parameters
--snes_atol 1.e-8
--ksp_rtol 5.e-3
+-snes_atol 1.e-10
+-ksp_rtol 1.e-3
 
 # turn on FieldSplit preconditioner for Multiplicative Multi-grid/Jacobi
 -useFieldSplitPC 
diff -r 8bd7f2c080c7 -r d016870dcb70 Benchmarks/ParallelPerformance/createParallelBenchmarkInputs.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Benchmarks/ParallelPerformance/createParallelBenchmarkInputs.m	Thu May 29 18:57:28 2008 -0400
@@ -0,0 +1,74 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% matlab script to generate the initial conditions and input files
+% for the StrongScaling benchmarks
+%
+% principal adjustable parameters are:
+%     amp: size of slab
+%     zBounds: height of slab
+%     mglevels: number of multi-grid levels controls finest grid spacing
+%          mglevels = 4 is a 64x64 grid
+%
+% mspieg: 19 Oct 2007 12:01:31
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+doVis = true;
+
+
+% set domain size
+
+width = 128;
+height = 256;
+xzRange = [ width height ];
+
+% multi-grid course grid parameters (with mglevels =4 yields a 64x64 mesh
+ni_coarse = 4;
+nj_coarse = 8;
+zBCFlag = false; % use dirichlet in Z
+if zBCFlag
+    nj_coarse = nj_coarse + 1;
+end
+nCoarse = [ ni_coarse nj_coarse ];
+
+% slab position parameters
+z0 = 30;
+z1 = 100;
+zBounds = [z0 z1];
+
+
+% Benchmark parameters
+
+% wavespeed
+amp=3;
+waveSpeed=8;
+sigma=8;
+eps = 1.e-3; % bit of white noise
+
+% multigrid levels (controls finest grid resolution)
+mglevels = [ 6:9  ];
+
+bcFlags=[ 0 0 ];  % periodic x, dirichlet z
+
+gridPointsPerCompactionLength = ni_coarse*2.^(mglevels-1)/width;
+
+%%%%%%%%%%%%%%%%%%
+%  create input files
+%%%%%%%%%%%%%%%%%%
+
+for i = 1:length(waveSpeed)
+    c = waveSpeed(i);
+    for j = 1:length(mglevels)
+        resolution = gridPointsPerCompactionLength(j);
+        dirName = sprintf('ParallelScaling2DSlab_nPerDelta=%d',resolution);
+        mkdir(dirName);
+        cd(dirName);
+        filename = sprintf('init_%s',dirName);
+        [phi, x, z] = writeSolitaryWave2DInputFile(filename,@(x,z) initPhi1DSlab(x,z,amp,zBounds,sigma,eps),c,xzRange,mglevels(j),nCoarse,bcFlags);
+        cd ..
+        if doVis
+            figure;
+            imagesc(x,z,phi);
+            axis image; axis xy;
+            title(filename);
+        end
+    end
+end
+
diff -r 8bd7f2c080c7 -r d016870dcb70 Benchmarks/ParallelPerformance/runStrongScalingBenchmark
--- a/Benchmarks/ParallelPerformance/runStrongScalingBenchmark	Thu May 29 14:21:23 2008 -0400
+++ b/Benchmarks/ParallelPerformance/runStrongScalingBenchmark	Thu May 29 18:57:28 2008 -0400
@@ -15,7 +15,9 @@ INPUT="-options_file ../commonOptions_Fi
 
 cd $DIR
 
-for nProcs in 1 2 4 # loop over processors
+nProcessors="1 2 4"
+nProcessors="1"
+for nProcs in $nProcessors # loop over processors
 do
     PDIR=np_${nProcs}
     if [ -d $PDIR ]; then
diff -r 8bd7f2c080c7 -r d016870dcb70 matlab/sincSolitaryWaves/writeSolitaryWave2DInputFile.m
--- a/matlab/sincSolitaryWaves/writeSolitaryWave2DInputFile.m	Thu May 29 14:21:23 2008 -0400
+++ b/matlab/sincSolitaryWaves/writeSolitaryWave2DInputFile.m	Thu May 29 18:57:28 2008 -0400
@@ -56,6 +56,7 @@ function [phi,x,y]=writeSolitaryWave2DIn
    % matlab to Petsc memory order transform
    
    T = @(A) A(end:-1:1,:)';   % (flip and transpose to get Fortran order into C order)
+   T = @(A) A(:,:)';   % (flip and transpose to get Fortran order into C order)
    
    field.C = zeros(size(T(phi)));
    field.phi=T(phi);



More information about the cig-commits mailing list