2 c---------------------------------------------------------------------
3 c---------------------------------------------------------------------
7 c---------------------------------------------------------------------
8 c---------------------------------------------------------------------
15 integer IERROR, fstatus, nnodes
18 c---------------------------------------------------------------------
19 c only root reads the input file
20 c if input file does not exist, it uses defaults
21 c ipr = 1 for detailed progress output
22 c inorm = how often the norm is printed (once every inorm iterations)
23 c itmax = number of pseudo time steps
25 c omega 1 over-relaxation factor for SSOR
26 c tolrsd = steady state residual tolerance levels
27 c nx, ny, nz = number of grid points in x, y, z directions
28 c---------------------------------------------------------------------
30 if (id .eq. ROOT) then
34 open (unit=3,file='inputlu.data',status='old',
35 > access='sequential',form='formatted', iostat=fstatus)
36 if (fstatus .eq. 0) then
38 write(*, *) 'Reading from input file inputlu.data'
54 read (3,*) tolrsd(1),tolrsd(2),tolrsd(3),tolrsd(4),tolrsd(5)
57 read (3,*) nx0, ny0, nz0
65 tolrsd(1) = tolrsd1_def
66 tolrsd(2) = tolrsd2_def
67 tolrsd(3) = tolrsd3_def
68 tolrsd(4) = tolrsd4_def
69 tolrsd(5) = tolrsd5_def
75 c---------------------------------------------------------------------
77 c---------------------------------------------------------------------
78 call MPI_COMM_SIZE(MPI_COMM_WORLD, nnodes, ierror)
79 if (nnodes .ne. nnodes_compiled) then
80 write (*, 2000) nnodes, nnodes_compiled
81 2000 format (5x,'Warning: program is running on',i3,' processors'
82 > /5x,'but was compiled for ', i3)
85 if ( ( nx0 .lt. 4 ) .or.
87 > ( nz0 .lt. 4 ) ) then
90 2001 format (5x,'PROBLEM SIZE IS TOO SMALL - ',
91 > /5x,'SET EACH OF NX, NY AND NZ AT LEAST EQUAL TO 5')
92 CALL MPI_ABORT( MPI_COMM_WORLD, MPI_ERR_OTHER, IERROR )
96 if ( ( nx0 .gt. isiz01 ) .or.
97 > ( ny0 .gt. isiz02 ) .or.
98 > ( nz0 .gt. isiz03 ) ) then
101 2002 format (5x,'PROBLEM SIZE IS TOO LARGE - ',
102 > /5x,'NX, NY AND NZ SHOULD BE LESS THAN OR EQUAL TO ',
103 > /5x,'ISIZ01, ISIZ02 AND ISIZ03 RESPECTIVELY')
104 CALL MPI_ABORT( MPI_COMM_WORLD, MPI_ERR_OTHER, IERROR )
109 write(*, 1001) nx0, ny0, nz0
111 write(*, 1003) nnodes
113 1000 format(//, ' NAS Parallel Benchmarks 3.3 -- LU Benchmark',/)
114 1001 format(' Size: ', i4, 'x', i4, 'x', i4)
115 1002 format(' Iterations: ', i4)
116 1003 format(' Number of processes: ', i5, /)