Skip to content

Commit 93ed269

Browse files
author
Peter Willendrup
committed
Adapt TOF_train4 model to new, global adaptive_N counters
1 parent 372f564 commit 93ed269

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mcstas-comps/examples/Prototypes/ODIN_TOF_train4/ODIN_TOF_train4.instr

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,13 @@ double fo3_phase = 0; // Phase of fo3 chopper at t=0 center for smallest gap
103103
double fo4_phase = 0; // Phase of fo4 chopper at t=0 center for smallest gap
104104
double fo5_phase = 0; // Phase of fo5 chopper at t=0 center for smallest gap
105105

106-
int adaptive_N;
106+
/*int adaptive_N;
107107
long total_arrived;
108108
long total_N_sent;
109109
long total_rays_sent;
110110
#pragma acc declare create(adaptive_N,total_arrived,total_N_sent,total_rays_sent)
111+
NOW IN COGEN
112+
*/
111113
%}
112114

113115
USERVARS
@@ -137,13 +139,14 @@ fo4_phase = fo4_phase_offset;
137139
fo4_phase += 111.700;
138140
fo5_phase = fo5_phase_offset;
139141
fo5_phase += -81.105;
140-
142+
/*
141143
adaptive_N=NTOF;
142144
total_arrived=0;
143145
total_N_sent=0;
144146
total_rays_sent=0;
145147
#pragma acc update device(adaptive_N,total_arrived,total_N_sent,total_rays_sent)
146-
148+
NOW IN COGEN
149+
*/
147150
// Don't measure time on windows, CLOCK_REALTIME
148151
// macro is unknown...
149152
// It is indicated in this oagehttps://learn.microsoft.com/en-us/answers/questions/2147256/clock-realtime-is-undefined-in-visual-studio-but-c that it might work to add a high enough _POSIX_C_SOURCE define, i.e.

0 commit comments

Comments
 (0)