Tue Nov 14 21:57:04 1995 Connection MachineLinking...done. : 2.1 Source Rev: f2100 page: 1 Source Listing File: /scratch2/hanson/pgm.fcm 1 1 0 program laplace 2 2 0 code: LaPlace solver sample program 3 3 0 code: From "getting Started in CM Fortran". 4 4 0 code: Solution of LaPlace's equation on unit square. 5 5 0 code: BC: f(x,1)=1, f(0,y)=f(x,0)=f(1,y)=2, 0<{x,y}<1. 6 6 0 code: Initial interior starting iterate: f(x,y) = 0. 7 7 0 comment: Need to include CMF timer utilities: 8 8 0 include'/usr/include/cm/timer-fort.h' 23 9 0 parameter(maxx=32,maxy=maxx) 24 10 0 real f(maxx,maxy),df(maxx,maxy) 25 11 0 real rms_error,max_error 26 12 0 logical cmask(maxx,maxy) 27 13 0 integer iteration 28 14 0 comment: Clear and start timer 0. 29 15 0 call cm_timer_clear(0) 30 16 0 call cm_timer_start(0) 31 17 0 comment: Initialize the mask for the interior points. 32 18 0 cmask = .false. 33 19 0 cmask(2:maxx-1,2:maxy-1) = .true. 34 20 0 comment: Initialize f 35 21 0 f = 2. 36 22 0 f(:,maxy) = 1. 37 23 0 where (cmask) f = 0. 38 24 0 comment: Set dummy value for max_error. 39 25 0 max_error = 1. 40 26 0 iteration = 0 41 27 0 comment: Iterate until max_error < 1.e-3 stopping criterion. 42 28 0 do while (max_error.gt.1.e-3) 43 29 0 iteration = iteration + 1 44 30 0 comment: Compute df, the change at each iteration, and udate. 45 31 0 df = 0. 46 32 0 where (cmask) 47 33 0 df = 0.25*(cshift(f,1,1) + cshift(f,1,-1) 48 34 0 & + cshift(f,2,1) + cshift(f,2,-1)) - f 49 35 0 f = f + df 50 36 0 endwhere 51 37 0 comment: Compute RMS and Maximum errors. 52 38 0 rms_error = sqrt(sum(df*df)/((maxx-2)*(maxy-2))) 53 39 0 max_error = maxval(df,mask=cmask) 54 40 0 comment: Output errors every 10th iteration 55 41 0 if(mod(iteration,10).eq.0) then 56 42 0 write(6,*) iteration,rms_error,max_error 57 43 0 endif 58 44 0 enddo 59 45 0 comment: Stop and Print timer 60 46 0 call cm_timer_stop(0) 61 47 0 print*,'total CM5 time' 62 48 0 call cm_timer_print(0) 63 49 0 comment: Output final iteration count and errors (stopping criteria). 64 50 0 write(6,*) iteration,rms_error,max_error 65 51 0 stop Tue Nov 14 21:57:04 1995 Connection Machine Fortran Version: 2.1 Source Rev: f2100 page: 2 Symbol Storage Map File: /scratch2/hanson/pgm.fcm ENTRY POINTS Offset Type Name 0 NONE LAPLACE STORAGE BLOCKS Size Block 12300 local 158 constants VARIABLES Offset Size Type Block Name 0 4 INT4 local FE ITERATION 4 4 REAL4 local FE MAX_ERROR 8 4 REAL4 local FE RMS_ERROR --- 0 NONE global FE _cmpe_laplace_0 --- 0 NONE global FE _cmpe_laplace_0_ --- 0 NONE global FE _cmpe_laplace_1 --- 0 NONE global FE _cmpe_laplace_1_ --- 0 NONE global FE _cmpe_laplace_2 --- 0 NONE global FE _cmpe_laplace_2_ --- 0 NONE global FE _cmpe_laplace_3 --- 0 NONE global FE _cmpe_laplace_3_ --- 0 NONE global FE _cmpe_laplace_4 --- 0 NONE global FE _cmpe_laplace_4_ --- 0 NONE not-referenced FE laplace ARRAYS Offset Size Type Block/Class Home Name 8200 4096 LOG4 local CM CMASK 4096 4096 REAL4 local CM DF 0 4096 REAL4 local CM F PARAMETERS (Offset is within Storage Block 'constants') Offset Type Name Value 0 INT4 MAXX 32 0 INT4 MAXY 32 0 INT4 _DOUBLE_ 64 0 INT4 _DOUBLE_COMPLEX_ 64 0 INT4 _DOUBLE_INT_ 64 0 INT4 _SINGLE_ 32 0 INT4 _SINGLE_COMPLEX_ 32 0 INT4 _SINGLE_INT_ 32 INTRINSIC PROCEDURES Name CSHIFT MAXVAL MOD Tue Nov 14 21:57:04 1995 Connection Machine Fortran Version: 2.1 Source Rev: f2100 page: 3 Symbol Storage Map File: /scratch2/hanson/pgm.fcm SQRT SUM STATEMENT FUNCTIONS Type Name EXTERNALS Type Unit_Kind Name INT4 function CM_NUMBER_OF_TIMERS NONE subroutine CM_TIMER_CLEAR NONE subroutine CM_TIMER_PRINT REAL8 function CM_TIMER_READ_CM_BUSY REAL8 function CM_TIMER_READ_CM_IDLE REAL8 function CM_TIMER_READ_ELAPSED INT4 function CM_TIMER_READ_RUN_STATE INT4 function CM_TIMER_READ_STARTS NONE subroutine CM_TIMER_START NONE subroutine CM_TIMER_STOP NAME LISTS Name CONSTRUCT NAMES Name COMMUNICATION ROUTINES Name Line Number (number of times) SUM (into scalar) [<>: 0(2)] MAXVAL (into scalar) 39 CSHIFT 33(4) Tue Nov 14 21:57:04 1995 Connection Machine Fortran Version: 2.1 Source Rev: f2100 page: 4 Source Listing File: /scratch2/hanson/pgm.fcm Tue Nov 14 21:57:04 1995 Connection Machine Fortran Version: 2.1 Source Rev: f2100 page: 5 Utility Stats Input File: /scratch2/hanson/pgm.fcm Base File: pgm COMMAND QUALIFIERS -optimize -dp -list pgm.fcm analysis_data check = (no bounds,overflow,no underflow ) continuations = 19 directives f77 i4 ifconvert level_of_vectorization = 100 list machine_code optimize = (local,global,code_motion ) overlap show = (no dictionary,no include,no map,no preprocessor,no single ) standard = (no syntax,no source,no semantic ) v104 warnings = (no declarations,general,no ultrix,no vaxeln ) postoptimize preoptimize loadstoremotion ucephase uaephase prcphase prsphase ucepost uaepost prcpost prspost cppost complex_lower safety = 0 pnodes = -1 peephole axisreorder loopreversal dp trcback skip_garbage newforall killuselessalloc new_modifies prc2 prs2 redo_modifies defer_modifies comb_cp source_fc source_node const transp cp_last bb_merge meoptimize mecopypropagate memergetemps merepl menullallcntx mesgsize = 10000 merge amode single_complex_opt prover = () peschedule peschalias pe_asm_machine_code pe_asm_comments pe_asm_srclines