Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /tests/vis15-bugs/gst2c.diderot
ViewVC logotype

Annotation of /tests/vis15-bugs/gst2c.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (view) (download)

1 : glk 4640 #version 2
2 :    
3 :     /*
4 :     Compiling the attached program with vis15 r4464, it seems at the "iter += 1;" in the global update is not getting executed.
5 :     The per-strand print statements show that iter is stuck at 0.
6 :     */
7 :     /*const*/ int N = 10;
8 :     real target = 0.0;
9 :     int iter = 0;
10 :    
11 :     strand S (int i) {
12 :     output real e = i;
13 :    
14 :     update {
15 :     real delta = (target - e)/2 + iter;
16 :     print (i, "(", iter, "): e = ", e, ", delta = ", delta, "\n");
17 :     if (|delta| < 0.001) {
18 :     stabilize;
19 :     } else {
20 :     e += delta;
21 :     }
22 :     }
23 :    
24 :     }
25 :    
26 :     start {
27 :     target = mean { p.e | p in S.all };
28 :     print("initially: target = ", target, "\n");
29 :     }
30 :    
31 :     update {
32 :     iter += 1;
33 :     target = sum { p.e | p in S.all } / N;
34 :     print("update: target = ", target, "\n");
35 :     }
36 :    
37 :     create_collection { S(i) | i in 1..N }

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0