on the web,<br><a href="http://course1.winona.edu/nmoore/clouds_example_OpenMP_f90.html">http://course1.winona.edu/nmoore/clouds_example_OpenMP_f90.html</a><br><br><br><div class="gmail_quote">On Wed, Nov 26, 2008 at 1:22 PM, Bill Broadley <span dir="ltr">&lt;<a href="mailto:bill@cse.ucdavis.edu">bill@cse.ucdavis.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;d be happy to take a look, but email formatting of f90 sometimes seems to<br>
cause issues. &nbsp;Could you send it as an attachment or put it on a webpage?<br>
<div><div></div><div class="Wj3C7c"><br>
Nathan Moore wrote:<br>
&gt; After the help last week on openmp, I got inspired and bought a dual-quad<br>
&gt; opteron machine for the department to show 8-way scaling for my students<br>
&gt; (&quot;Hey, its much cheaper than something new in the optics lab&quot;, my dept.<br>
&gt; chair laughed).<br>
&gt;<br>
&gt; I&#39;ve been working on said machine over the past few days and found something<br>
&gt; really weird in an OpenMP example program I descrobed to the list.<br>
&gt;<br>
&gt; The machine is a dual-proc AMD Opteron 2350, Tyan n3600T (S2937) mainboard,<br>
&gt; w/ 8GB ram. &nbsp;Initially, I installed the i386 version of Scientific Linux<br>
&gt; 5.2, but then realized that only half of the RAM was usable, and<br>
&gt; re-installed SL5.2 x86_64 this morning.<br>
&gt;<br>
&gt; The example program is appended to the end of this email. &nbsp;Again, it is a<br>
&gt; 2-d finite-difference solution to the laplace equation (the context being to<br>
&gt; &quot;predict&quot; lightning strikes based on the potential between the ground and<br>
&gt; some clouds overhead).<br>
&gt;<br>
&gt; The program scales beautifully up to OMP_NUM_THREADS~6 or 7, but when I set<br>
&gt; the number of threads to 8, something weird happens, and instead of taking<br>
&gt; the normal 241 iterations to converge, the program converges after 1 step.<br>
&gt; This reeks of numerical instability to me, but my programming experience in<br>
&gt; x86_64 is very limited.<br>
&gt;<br>
&gt; I&#39;m using gfortran, with the simple compile string,<br>
&gt; &nbsp; &nbsp; &nbsp;gfortran clouds_example_OpenMP.f90 -m64 -fopenmp<br>
&gt;<br>
&gt; Any insight into what obvious mistake I&#39;m making would be wonderful!<br>
&gt;<br>
&gt; The stability of the output seems erratic to me. &nbsp;Sometimes when<br>
&gt; OMP_NUM_THREADS=7 the result converges normally after 241 iterations and at<br>
&gt; other times, the result converges after 1 iteration (indicating some sort of<br>
&gt; problem with hardware???)<br>
&gt;<br>
&gt; This didn&#39;t occur yesterday when the machine was running SL5.2, i386.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Simulation Output:<br>
&gt;<br>
&gt; [nmoore@aykroyd clouds]$ OMP_NUM_THREADS=1<br>
&gt; [nmoore@aykroyd clouds]$ export OMP_NUM_THREADS<br>
&gt; [nmoore@aykroyd clouds]$ ./a.out<br>
&gt; &nbsp;Hello World from thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0<br>
&gt; &nbsp;There are &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 threads<br>
&gt; ...<br>
&gt; convergence criteria is \Delta V &lt; &nbsp; 0.250000003725290<br>
&gt; &nbsp; iterations necessary, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;241<br>
&gt; &nbsp; initialization time, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br>
&gt; &nbsp; simulation time, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 57<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; [nmoore@aykroyd clouds]$ OMP_NUM_THREADS=2<br>
&gt; [nmoore@aykroyd clouds]$ export OMP_NUM_THREADS<br>
&gt; [nmoore@aykroyd clouds]$ ./a.out<br>
&gt; &nbsp;Hello World from thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0<br>
&gt; &nbsp;Hello World from thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br>
&gt; &nbsp;There are &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2 threads<br>
&gt; &nbsp;...<br>
&gt; convergence criteria is \Delta V &lt; &nbsp; 0.250000003725290<br>
&gt; &nbsp; iterations necessary, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;241<br>
&gt; &nbsp; initialization time, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br>
&gt; &nbsp; simulation time, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 28<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; [nmoore@aykroyd clouds]$ OMP_NUM_THREADS=4<br>
&gt; [nmoore@aykroyd clouds]$ export OMP_NUM_THREADS<br>
&gt; [nmoore@aykroyd clouds]$ ./a.out<br>
&gt; &nbsp;Hello World from thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3<br>
&gt; &nbsp;Hello World from thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br>
&gt; &nbsp;Hello World from thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0<br>
&gt; &nbsp;Hello World from thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2<br>
&gt; &nbsp;There are &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4 threads<br>
&gt; &nbsp;...<br>
&gt; convergence criteria is \Delta V &lt; &nbsp; 0.250000003725290<br>
&gt; &nbsp; iterations necessary, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;241<br>
&gt; &nbsp; initialization time, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br>
&gt; &nbsp; simulation time, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 14<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; [nmoore@aykroyd clouds]$ OMP_NUM_THREADS=8<br>
&gt; [nmoore@aykroyd clouds]$ export OMP_NUM_THREADS<br>
&gt; [nmoore@aykroyd clouds]$ ./a.out<br>
&gt; &nbsp;Hello World from thread &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2<br>
&gt; &nbsp;...<br>
&gt; convergence criteria is \Delta V &lt; &nbsp; 0.250000003725290<br>
&gt; &nbsp; iterations necessary, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1<br>
&gt; &nbsp; initialization time, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br>
&gt; &nbsp; simulation time, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br>
&gt;<br>
&gt; Code listing:<br>
&gt;<br>
&gt; nmoore@aykroyd clouds]$ cat clouds_example_OpenMP.f90<br>
&gt; !<br>
&gt; !<br>
&gt; use omp_lib<br>
&gt; !<br>
&gt; IMPLICIT NONE<br>
&gt; integer,parameter::Nx=2000<br>
&gt; integer,parameter::Ny=2000<br>
&gt; real*8 v(Nx,Ny), dv(Nx,Ny)<br>
&gt; integer boundary(Nx,Ny)<br>
&gt; integer i,j,converged,i1,i2<br>
&gt; integer t0,t1,t2<br>
&gt; real*8 convergence_v, v_cloud, v_ground, max_dv<br>
&gt; real*8 bump_P,old_v<br>
&gt; real*8 Lx,Ly,dx,dy,v_y<br>
&gt; !<br>
&gt; real*8 lightning_rod_center, lightning_rod_height<br>
&gt; !<br>
&gt; real*8 house_center, house_height, house_width<br>
&gt; integer num_iterations<br>
&gt; !<br>
&gt; integer:: id, nthreads<br>
&gt; !$omp parallel private(id)<br>
&gt; id = omp_get_thread_num()<br>
&gt; write (*,*) &#39;Hello World from thread&#39;, id<br>
&gt; !$omp barrier<br>
&gt; if ( id == 0 ) then<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; nthreads = omp_get_num_threads()<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; write (*,*) &#39;There are&#39;, nthreads, &#39;threads&#39;<br>
&gt; end if<br>
&gt; !$omp end parallel<br>
&gt;<br>
&gt; ! initial time<br>
&gt; t0 = secnds(0.0)<br>
&gt;<br>
&gt; dx =0.1d0 ! differential lengths, m<br>
&gt; dy =0.1d0<br>
&gt; Lx = Nx*dx ! system sizes, m<br>
&gt; Ly = Ny*dy<br>
&gt;<br>
&gt; print *,&quot;\nSimulation has bounds:\n\tX: 0,&quot;,Lx,&quot;\n\tY: 0,&quot;,Ly<br>
&gt; print *,&quot;\tNx = &quot;,Nx,&quot;\n\tNy = &quot;,Ny<br>
&gt; print *,&quot;\tdx = &quot;,dx,&quot;\n\tdy = &quot;,dy<br>
&gt;<br>
&gt; v_cloud = -10000.d0 &nbsp; &nbsp; ! volts<br>
&gt; v_ground = 0.d0<br>
&gt;<br>
&gt; ! initialize the the boundary conditions<br>
&gt; !<br>
&gt; ! first, set the solution function (v), to look like a<br>
&gt; ! parallel-plate capacitor<br>
&gt; !<br>
&gt; ! &nbsp; &nbsp; &nbsp; note that there is one large parallel section and several<br>
&gt; ! &nbsp; &nbsp; &nbsp; parallel do&#39;s inside that region<br>
&gt; !$OMP PARALLEL<br>
&gt; !<br>
&gt; !$OMP DO<br>
&gt; !$OMP&amp; SHARED(Nx,Ny,boundary,v_cloud,v_ground,Ly,dy,v)<br>
&gt; !$OMP&amp; PRIVATE(i,j)<br>
&gt; do j=1,Ny<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; do i=1,Nx<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boundary(i,j)=0<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v(i,j) = v_ground + (v_cloud-v_ground)*(j*dy/Ly)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; end do<br>
&gt; end do<br>
&gt; !$OMP END DO<br>
&gt; !<br>
&gt; !$OMP DO<br>
&gt; !$OMP&amp; SHARED(Nx,Ny,boundary)<br>
&gt; !$OMP&amp; PRIVATE(i)<br>
&gt; do i=1,Nx<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; boundary(i,1)=1 &nbsp; &nbsp; &nbsp; &nbsp; ! we need to ensure that the edges of<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; boundary(i,Ny)=1 &nbsp; &nbsp; &nbsp; &nbsp;! the domain are held as boundary<br>
&gt; end do<br>
&gt; !$OMP END DO<br>
&gt; !<br>
&gt; !$OMP DO<br>
&gt; !$OMP&amp; SHARED(boundary,Nx)<br>
&gt; !$OMP&amp; PRIVATE(j)<br>
&gt; do j=1,Ny<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; boundary(1,j)=1<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; boundary(Nx,j)=1<br>
&gt; end do<br>
&gt; !$OMP END DO<br>
&gt; !$OMP END PARALLEL<br>
&gt;<br>
&gt;<br>
&gt; ! set up an interesting feature on the lower boundary<br>
&gt; ! &nbsp; &nbsp; &nbsp; do this in parallel with SECTIONS directive<br>
&gt; !<br>
&gt; !$OMP PARALLEL<br>
&gt; !$OMP&amp; SHARED(v,boundary,Nx,Ny,dx,dy,Lx,Ly,lightning_rod_height)<br>
&gt; !$OMP&amp; PRIVATE(lightning_rod_center,house_center,house_height,house_width))<br>
&gt; !$OMP SECTIONS<br>
&gt;<br>
&gt; !$OMP &nbsp;SECTION<br>
&gt; ! Lightning_rod<br>
&gt; lightning_rod_center = Lx*0.6d0<br>
&gt; lightning_rod_height = 5.0d0<br>
&gt; call<br>
&gt; create_lightning_rod(v_ground,lightning_rod_center,lightning_rod_height,dx,dy,Nx,Ny,v,boundary)<br>
&gt;<br>
&gt; !$OMP &nbsp;SECTION<br>
&gt; lightning_rod_center = Lx*0.5d0<br>
&gt; call<br>
&gt; create_lightning_rod(v_ground,lightning_rod_center,lightning_rod_height,dx,dy,Nx,Ny,v,boundary)<br>
&gt;<br>
&gt; !$OMP &nbsp;SECTION<br>
&gt; lightning_rod_center = Lx*0.7d0<br>
&gt; call<br>
&gt; create_lightning_rod(v_ground,lightning_rod_center,lightning_rod_height,dx,dy,Nx,Ny,v,boundary)<br>
&gt;<br>
&gt; !$OMP &nbsp;SECTION<br>
&gt; ! house<br>
&gt; house_center = 0.4d0*Lx<br>
&gt; house_height = 5.0d0<br>
&gt; house_width = 5.0d0<br>
&gt; call<br>
&gt; create_house(v_ground,house_center,house_height,house_width,dx,dy,Nx,Ny,v,boundary)<br>
&gt;<br>
&gt; !$OMP END SECTIONS<br>
&gt; !$OMP END PARALLEL<br>
&gt;<br>
&gt; ! initialization done<br>
&gt; t1 = secnds(0.0)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ! main solution iteration<br>
&gt; !<br>
&gt; ! repeat the recursion relation until the maximum change<br>
&gt; ! from update to update is less than a convergence epsilon,<br>
&gt; convergence_v = (0.05)*dabs(v_ground-v_cloud)/(1.d0*Ny)<br>
&gt; print *,&quot;\nconvergence criteria is \Delta V &lt; &quot;,convergence_v<br>
&gt; num_iterations = 0<br>
&gt;<br>
&gt; !<br>
&gt; ! iteration implemented with a goto &nbsp;or a do-while<br>
&gt; converged=0<br>
&gt; do while( converged .eq. 0)<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; converged = 1<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; num_iterations = num_iterations + 1<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP PARALLEL<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP DO<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP&amp; PRIVATE(i,j)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP&amp; SHARED(Ny,Nx,dv,v,boundary))<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; do j=2,(Ny-1)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do i=2,(Nx-1)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dv(i,j) =<br>
&gt; 0.25d0*(v(i-1,j)+v(i+1,j)+v(i,j+1)+v(i,j-1)) - v(i,j)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dv(i,j) = dv(i,j)*(1.d0-DFLOAT(boundary(i,j)))<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end do<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; end do<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP END DO<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; max_dv = 0.d0<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP DO<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP&amp; PRIVATE(i,j)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP&amp; SHARED(NX,NY,dv,v))<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP&amp; REDUCTION(MAX:max_dv)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; do j=2,(Ny-1)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do i=2,(Nx-1)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v(i,j) = v(i,j) + dv(i,j)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(dv(i,j) .gt. max_dv) then<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; max_dv = dv(i,j)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; endif<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end do<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; end do<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP END DO<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !$OMP END PARALLEL<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; if(max_dv .ge. convergence_v) then<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; converged = 0<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; endif<br>
&gt;<br>
&gt; end do<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ! simulation finished<br>
&gt; t2 = secnds(0.0)<br>
&gt;<br>
&gt; print *,&quot; iterations necessary, &quot;,num_iterations<br>
&gt; print *,&quot; initialization time, &quot;,t1-t0<br>
&gt; print *,&quot; simulation time, &quot;,t2-t1<br>
&gt;<br>
&gt;<br>
&gt; open(unit=10,file=&quot;v_output.dat&quot;)<br>
&gt; write(10,*) &quot;# x\ty\tv(x,y)&quot;<br>
&gt; do j=1,Ny<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !do i=1,Nx<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ! skipping the full array print to save execution time<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ! the printed data file is normally sent to gnuplot w/ splot<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; i=10<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; write (10,*) i*dx,j*dy,v(i,j)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; !enddo<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; write (10,*)&quot; &quot;<br>
&gt; end do<br>
&gt; close(10)<br>
&gt;<br>
&gt;<br>
&gt; stop<br>
&gt; end<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; subroutine<br>
&gt; create_lightning_rod(v_ground,lightning_rod_center,lightning_rod_height,dx,dy,Nx,Ny,v,boundary)<br>
&gt; IMPLICIT NONE<br>
&gt; integer Nx, Ny,j,boundary(Nx,Ny)<br>
&gt; integer j_limit<br>
&gt; integer index_lightning_rod_center<br>
&gt; real*8 v(Nx,Ny)<br>
&gt; real*8 lightning_rod_center,lightning_rod_height<br>
&gt; real*8 dx, dy, v_ground<br>
&gt;<br>
&gt; index_lightning_rod_center = lightning_rod_center/dx<br>
&gt; j_limit = lightning_rod_height/dy<br>
&gt; do j=1,j_limit<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; v(index_lightning_rod_center,j) = v_ground<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; boundary(index_lightning_rod_center,j) = 1<br>
&gt; end do<br>
&gt;<br>
&gt; print *,&quot;Created a lightning rod of height &quot;,lightning_rod_height<br>
&gt; print *,&quot;\ty_index &quot;,j_limit<br>
&gt; print *,&quot;\tx-position &quot;,lightning_rod_center<br>
&gt; print *,&quot;\tx_index &quot;,index_lightning_rod_center<br>
&gt;<br>
&gt;<br>
&gt; end subroutine<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; subroutine<br>
&gt; create_house(v_ground,house_center,house_height,house_width,dx,dy,Nx,Ny,v,boundary)<br>
&gt; IMPLICIT NONE<br>
&gt; integer Nx, Ny, boundary(Nx,Ny)<br>
&gt; real*8 v(Nx,Ny)<br>
&gt; real*8 v_ground, dx, dy<br>
&gt; integer i,j,i_limit,j_limit, index_house_center<br>
&gt; real*8 house_center,house_height,house_width<br>
&gt;<br>
&gt; index_house_center = house_center/dx<br>
&gt; i_limit = 0.5d0*house_width/dx<br>
&gt; j_limit = house_height/dy<br>
&gt; do j=1,j_limit<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; do i=(index_house_center-i_limit),(index_house_center+i_limit)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v(i,j) = v_ground<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boundary(i,j) = 1<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; end do<br>
&gt; end do<br>
&gt;<br>
&gt; print *,&quot;Created a house of height &quot;,house_height<br>
&gt; print *,&quot;\ty_index &quot;,j_limit<br>
&gt; print *,&quot;\twidth &quot;,house_width<br>
&gt; print *,&quot;\thouse bounds:<br>
&gt; &quot;,index_house_center-i_limit,index_house_center+i_limit<br>
&gt;<br>
&gt; end subroutine<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Beowulf mailing list, <a href="mailto:Beowulf@beowulf.org">Beowulf@beowulf.org</a><br>
&gt; To change your subscription (digest mode or unsubscribe) visit <a href="http://www.beowulf.org/mailman/listinfo/beowulf" target="_blank">http://www.beowulf.org/mailman/listinfo/beowulf</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>- - - - - - - &nbsp; - - - - - - - &nbsp; - - - - - - - <br>Nathan Moore<br>Assistant Professor, Physics<br>Winona State University<br>AIM: nmoorewsu <br>- - - - - - - &nbsp; - - - - - - - &nbsp; - - - - - - -<br>

<br />-- 
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.