File: divide-by-zero-error_fix.patch

package info (click to toggle)
aces3 3.0.8-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 775,180 kB
  • sloc: f90: 5,133,741; fortran: 381,059; ansic: 22,951; pascal: 7,515; cpp: 4,349; makefile: 1,715; csh: 292; sh: 144
file content (17 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: aces3-3.0.8/src/sia/worker/vtdemo_init.F
===================================================================
--- aces3-3.0.8.orig/src/sia/worker/vtdemo_init.F
+++ aces3-3.0.8/src/sia/worker/vtdemo_init.F
@@ -813,7 +813,11 @@ c---------------------------------------
                   next_worker = next_worker + 1
                else
                   next_server = next_server + 1
-                  iproc_company_rank = mod(next_server-1,niocompany)
+                  if (niocompany .ne. 0) then
+                     iproc_company_rank = mod(next_server-1,niocompany)
+                  else
+                     iproc_company_rank = 1
+                  endif
                   block_map_table(c_processor,next) =
      *                           ioproc(iproc_company_rank+1)
                endif