INFO: No output directory specified (--dir)
INFO: Using directory: "SEMSANS_instrument_20241206_130906"
INFO: Regenerating c-file: SEMSANS_instrument.c
DEBUG: CMD: /u/data/pkwi/McStas/mcstas/3.x-dev/bin/mcstas-antlr -t -o ./SEMSANS_instrument.c SEMSANS_instrument.instr
Downloading file 'mcstas-comps/contrib/Pol_pi_2_rotator.comp' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/contrib/Pol_pi_2_rotator.comp' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'.
Downloading file 'mcstas-comps/optics/Pol_Bfield.comp' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/optics/Pol_Bfield.comp' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'.
Downloading file 'mcstas-comps/optics/Pol_Bfield_stop.comp' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/optics/Pol_Bfield_stop.comp' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'.
Downloading file 'mcstas-comps/contrib/Pol_triafield.comp' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/contrib/Pol_triafield.comp' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'.
2024-12-06 13:09:11.324 | DEBUG    | mccode_antlr.translators.c:sort_include_hierarchy:41 - sort includes :Pol_Bfield(0):pol-lib :Pol_Bfield_stop(0):pol-lib
2024-12-06 13:09:11.324 | DEBUG    | mccode_antlr.translators.c:sort_include_hierarchy:66 - sorted to pol-lib
2024-12-06 13:09:11.324 | DEBUG    | mccode_antlr.translators.c:sort_include_hierarchy:66 - sorted to pol-lib
2024-12-06 13:09:12.506 | INFO     | mccode_antlr.translators.c:include_source:331 - pol-lib.c requested read_table-lib but is has not been included yet!
2024-12-06 13:09:12.520 | INFO     | mccode_antlr.translators.c:include_source:331 - pol-lib.c requested interpolation-lib but is has not been included yet!
No initialization present?

-----------------------------------------------------------

Generating single GPU kernel or single CPU section layout:

-----------------------------------------------------------

Generating GPU/CPU -DFUNNEL layout:
-> GPU kernel from component Origin
-> GPU kernel from component source
-> GPU kernel from component chop1
-> GPU kernel from component chop2
-> GPU kernel from component polarizer
-> GPU kernel from component slit_1
-> GPU kernel from component vcoil1
-> GPU kernel from component vcoil2
-> GPU kernel from component Guide_field1
-> GPU kernel from component Guide_field1_cp
-> GPU kernel from component triacoil_1
-> GPU kernel from component Guide_field2
-> GPU kernel from component Guide_field2_cp
-> GPU kernel from component vcoil3
-> GPU kernel from component vcoil4
-> GPU kernel from component Guide_field3
-> GPU kernel from component Guide_field3_cp
-> GPU kernel from component triacoil_2
-> GPU kernel from component Guide_field4
-> GPU kernel from component Guide_field4_cp
-> GPU kernel from component vcoil5
-> GPU kernel from component vcoil6
-> GPU kernel from component slit_2
-> GPU kernel from component analyser
-> GPU kernel from component GratingSlit1_1
-> GPU kernel from component GratingSlit1_2
-> GPU kernel from component GratingSlit1_3
-> GPU kernel from component GratingSlit1_4
-> GPU kernel from component GratingSlit1_5
-> GPU kernel from component TOF_det

-----------------------------------------------------------
DEBUG: CMD: /u/data/pkwi/McStas/mcstas/3.x-dev/bin/mcstas-antlr finished
INFO: Recompiling: ./SEMSANS_instrument.out
DEBUG: CMD: nvc -o ./SEMSANS_instrument.out ./SEMSANS_instrument.c -fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC
"./SEMSANS_instrument.c", line 4489: warning: variable "num" was declared but never referenced [declared_but_not_referenced]
          int num = 3;
              ^

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

"/usr/include/math.h", line 30: warning: #warning directive: A macro called log was already defined when <math.h> was included. [warning_directive]
  # warning A macro called log was already defined when <math.h> was included.
    ^

"/usr/include/math.h", line 31: warning: #warning directive: This will cause compilation problems. [warning_directive]
  # warning This will cause compilation problems.
    ^

"./SEMSANS_instrument.c", line 9747: warning: variable "count" was declared but never referenced [declared_but_not_referenced]
      long count=0;
           ^

"./SEMSANS_instrument.c", line 9839: warning: missing return statement at end of non-void function "interpolator_interpolate" [implicit_return_from_non_void_function]
  } // interpolator_interpolate
  ^

"./SEMSANS_instrument.c", line 10400: warning: variable "tc2" was set but never used [set_but_not_used]
      Coords tc1, tc2;
                  ^

"./SEMSANS_instrument.c", line 12045: warning: enumerated type mixed with another type [mixed_enum_type]
    enum field_functions ff=field_type;
                            ^

"./SEMSANS_instrument.c", line 12140: warning: variable "velocity" was declared but never referenced [declared_but_not_referenced]
    double velocity = 0, time = 0;
           ^

"./SEMSANS_instrument.c", line 12140: warning: variable "time" was declared but never referenced [declared_but_not_referenced]
    double velocity = 0, time = 0;
                         ^

"./SEMSANS_instrument.c", line 12398: warning: incompatible redefinition of macro "strcmp" (declared at line 9795) [bad_macro_redef]
  #define strcmp(a,b) str_comp(a,b)
          ^

"./SEMSANS_instrument.c", line 12827: warning: expression has no effect [expr_has_no_effect]
    SCATTERED;
    ^

"./SEMSANS_instrument.c", line 12976: warning: variable "nofield" was declared but never referenced [declared_but_not_referenced]
      int nofield=0;
          ^

"./SEMSANS_instrument.c", line 15502: warning: variable "t" was declared but never referenced [declared_but_not_referenced]
    time_t  t;
            ^

"./SEMSANS_instrument.c", line 15503: warning: variable "ct" was set but never used [set_but_not_used]
    clock_t ct;
            ^

"./SEMSANS_instrument.c", line 1498: warning: variable "mcstartdate" was set but never used [set_but_not_used]
  static   long mcstartdate            = 0; /* start simulation time */
                ^

"./SEMSANS_instrument.c", line 2901: warning: function "strcpy_valid" was declared but never referenced [declared_but_not_referenced]
  static char *strcpy_valid(char *valid, char *original)
               ^

mcgenstate:
     89, Generating acc routine seq
         Generating NVIDIA GPU code
particle_getvar:
    103, Generating acc routine seq
         Generating NVIDIA GPU code
particle_getvar_void:
    136, Generating acc routine seq
         Generating NVIDIA GPU code
particle_setvar_void:
    161, Generating acc routine seq
         Generating NVIDIA GPU code
particle_setvar_void_array:
    184, Generating acc routine seq
         Generating NVIDIA GPU code
particle_restore:
    196, Generating acc routine seq
         Generating NVIDIA GPU code
particle_getuservar_byid:
    205, Generating acc routine seq
         Generating NVIDIA GPU code
particle_uservar_init:
    216, Generating acc routine seq
         Generating NVIDIA GPU code
noprintf:
   1545, Generating acc routine seq
         Generating NVIDIA GPU code
str_comp:
   1549, Generating acc routine seq
         Generating NVIDIA GPU code
str_len:
   1558, Generating acc routine seq
         Generating NVIDIA GPU code
mcget_ncount:
   4110, Generating acc routine seq
         Generating NVIDIA GPU code
coords_set:
   4541, Generating acc routine seq
         Generating NVIDIA GPU code
coords_get:
   4552, Generating acc routine seq
         Generating NVIDIA GPU code
coords_add:
   4561, Generating acc routine seq
         Generating NVIDIA GPU code
coords_sub:
   4573, Generating acc routine seq
         Generating NVIDIA GPU code
coords_neg:
   4585, Generating acc routine seq
         Generating NVIDIA GPU code
coords_scale:
   4595, Generating acc routine seq
         Generating NVIDIA GPU code
coords_sp:
   4605, Generating acc routine seq
         Generating NVIDIA GPU code
coords_xp:
   4613, Generating acc routine seq
         Generating NVIDIA GPU code
coords_len:
   4623, Generating acc routine seq
         Generating NVIDIA GPU code
coords_print:
   4645, Generating acc routine seq
         Generating NVIDIA GPU code
coords_norm:
   4652, Generating acc routine seq
         Generating NVIDIA GPU code
rot_set_rotation:
   4698, Generating acc routine seq
         Generating NVIDIA GPU code
rot_test_identity:
   4733, Generating acc routine seq
         Generating NVIDIA GPU code
rot_mul:
   4744, Generating acc routine seq
         Generating NVIDIA GPU code
rot_copy:
   4761, Generating acc routine seq
         Generating NVIDIA GPU code
rot_transpose:
   4772, Generating acc routine seq
         Generating NVIDIA GPU code
rot_apply:
   4788, Generating acc routine seq
         Generating NVIDIA GPU code
vec_prod_func:
   4817, Generating acc routine seq
         Generating NVIDIA GPU code
scalar_prod:
   4828, Generating acc routine seq
         Generating NVIDIA GPU code
norm_func:
   4832, Generating acc routine seq
         Generating NVIDIA GPU code
mccoordschange:
   5009, Generating acc routine seq
         Generating NVIDIA GPU code
mccoordschange_polarisation:
   5040, Generating acc routine seq
         Generating NVIDIA GPU code
normal_vec:
   5057, Generating acc routine seq
         Generating NVIDIA GPU code
solve_2nd_order:
   5156, Generating acc routine seq
         Generating NVIDIA GPU code
_randvec_target_circle:
   5240, Generating acc routine seq
         Generating NVIDIA GPU code
_randvec_target_rect_angular:
   5306, Generating acc routine seq
         Generating NVIDIA GPU code
_randvec_target_rect_real:
   5383, Generating acc routine seq
         Generating NVIDIA GPU code
kiss_srandom:
   5655, Generating acc routine seq
         Generating NVIDIA GPU code
kiss_random:
   5665, Generating acc routine seq
         Generating NVIDIA GPU code
_hash:
   5691, Generating acc routine seq
         Generating NVIDIA GPU code
_randnorm2:
   5732, Generating acc routine seq
         Generating NVIDIA GPU code
_randtriangle:
   5743, Generating acc routine seq
         Generating NVIDIA GPU code
_rand01:
   5748, Generating acc routine seq
         Generating NVIDIA GPU code
_randpm1:
   5756, Generating acc routine seq
         Generating NVIDIA GPU code
_rand0max:
   5764, Generating acc routine seq
         Generating NVIDIA GPU code
_randminmax:
   5771, Generating acc routine seq
         Generating NVIDIA GPU code
mcsetstate:
   6428, Generating acc routine seq
         Generating NVIDIA GPU code
inside_rectangle:
   6524, Generating acc routine seq
         Generating NVIDIA GPU code
box_intersect:
   6541, Generating acc routine seq
         Generating NVIDIA GPU code
cylinder_intersect:
   6656, Generating acc routine seq
         Generating NVIDIA GPU code
sphere_intersect:
   6711, Generating acc routine seq
         Generating NVIDIA GPU code
IntersectWall:
   7030, Generating implicit acc routine seq
         Generating acc routine seq
         Generating NVIDIA GPU code
Table_Index:
   8389, Generating acc routine seq
         Generating NVIDIA GPU code
Table_Value:
   8457, Generating acc routine seq
         Generating NVIDIA GPU code
Table_Value2d:
   8536, Generating acc routine seq
         Generating NVIDIA GPU code
Table_Interp1d:
   9004, Generating acc routine seq
         Generating NVIDIA GPU code
Table_Interp1d_nearest:
   9020, Generating acc routine seq
         Generating NVIDIA GPU code
Table_Interp2d:
   9038, Generating acc routine seq
         Generating NVIDIA GPU code
kdtree_squaredDistance:
   9292, Generating acc routine seq
         Generating NVIDIA GPU code
kdtree_borderCheck:
   9309, Generating acc routine seq
         Generating NVIDIA GPU code
kdtree_partition:
   9343, Generating acc routine seq
         Generating NVIDIA GPU code
kdtree_nearestNeighbour_helper:
   9419, Generating acc routine seq
         Generating NVIDIA GPU code
kdtree_nearestNeighbour:
   9457, Generating acc routine seq
         Generating NVIDIA GPU code
interpolator_offset:
   9527, Generating acc routine seq
         Generating NVIDIA GPU code
interpolator_load:
   9731, Generating copyin(array[:prod]) [if not already present]
interpolator_interpolate:
   9792, Generating acc routine seq
         Generating NVIDIA GPU code
interpolator_interpolate3_3:
   9851, Generating acc routine seq
         Generating NVIDIA GPU code
magnetic_field_dispatcher:
   9938, Generating acc routine seq
         Generating NVIDIA GPU code
mcmagnet_get_field:
   9977, Generating acc routine seq
         Generating NVIDIA GPU code
mcmagnet_push:
  10018, Generating acc routine seq
         Generating NVIDIA GPU code
mcmagnet_pop:
  10051, Generating acc routine seq
         Generating NVIDIA GPU code
const_magnetic_field:
  10076, Generating acc routine seq
         Generating NVIDIA GPU code
rot_magnetic_field:
  10086, Generating acc routine seq
         Generating NVIDIA GPU code
majorana_magnetic_field:
  10100, Generating acc routine seq
         Generating NVIDIA GPU code
gradient_magnetic_field:
  10116, Generating acc routine seq
         Generating NVIDIA GPU code
GetMonoPolFNFM:
  10143, Generating acc routine seq
         Generating NVIDIA GPU code
GetMonoPolRefProb:
  10172, Generating acc routine seq
         Generating NVIDIA GPU code
SetMonoPolRefOut:
  10196, Generating acc routine seq
         Generating NVIDIA GPU code
SetMonoPolTransOut:
  10223, Generating acc routine seq
         Generating NVIDIA GPU code
SimpleNumMagnetPrecession:
  10243, Generating acc routine seq
         Generating NVIDIA GPU code
  10276, Reference argument passing prevents parallelization: BzTemp
         Reference argument passing prevents parallelization: ByTemp
         Reference argument passing prevents parallelization: BxTemp
GetConstantField:
  10338, Generating acc routine seq
         Generating NVIDIA GPU code
init:
  12368, Generating update device(_Guide_field4_var,_slit_2_var,_analyser_var,_chop1_var,_instrument_var,_polarizer_var,_triacoil_2_var,_vcoil1_var,_Guide_field1_cp_var,_GratingSlit1_5_var,_source_var,_Guide_field2_cp_var,_Guide_field1_var,_vcoil2_var,_vcoil3_var,_Guide_field3_cp_var,_Guide_field2_var,_triacoil_1_var,_Guide_field4_cp_var,_Guide_field3_var,_vcoil4_var,_vcoil6_var,_vcoil5_var,_slit_1_var,_TOF_det_var,_GratingSlit1_1_var,_GratingSlit1_2_var,_GratingSlit1_3_var,_GratingSlit1_4_var,_Origin_var,_chop2_var)
class_Progress_bar_trace:
  12409, Generating acc routine seq
         Generating NVIDIA GPU code
class_Source_simple_trace:
  12499, Generating acc routine seq
         Generating NVIDIA GPU code
class_DiskChopper_trace:
  12602, Generating acc routine seq
         Generating NVIDIA GPU code
class_Set_pol_trace:
  12692, Generating acc routine seq
         Generating NVIDIA GPU code
class_Slit_trace:
  12753, Generating acc routine seq
         Generating NVIDIA GPU code
class_Pol_pi_2_rotator_trace:
  12797, Generating acc routine seq
         Generating NVIDIA GPU code
class_Pol_Bfield_trace:
  12854, Generating acc routine seq
         Generating NVIDIA GPU code
class_Pol_Bfield_stop_trace:
  12965, Generating acc routine seq
         Generating NVIDIA GPU code
class_Pol_triafield_trace:
  13026, Generating acc routine seq
         Generating NVIDIA GPU code
class_PolAnalyser_ideal_trace:
  13115, Generating acc routine seq
         Generating NVIDIA GPU code
class_TOF_monitor_trace:
  13157, Generating acc routine seq
         Generating NVIDIA GPU code
raytrace:
  13244, Generating acc routine seq
         Generating NVIDIA GPU code
raytrace_all:
  13948, Generating implicit firstprivate(gpu_innerloop)
         Generating NVIDIA GPU code
      13962, #pragma acc loop gang(numgangs), vector(vecsize) /* blockIdx.x threadIdx.x */
  13948, Local memory used for .inl_particle_25999,particleN,.inl_.inl_mcneutron_0_26014,.inl_.X2055_26016,.inl_.inl_.X2255_15_26015
  13962, Generating implicit firstprivate(seed,_particle)
finally:
  14794, Generating update self(_Guide_field4_var,_slit_2_var,_analyser_var,_chop1_var,_instrument_var,_polarizer_var,_triacoil_2_var,_vcoil1_var,_Guide_field1_cp_var,_GratingSlit1_5_var,_source_var,_Guide_field2_cp_var,_Guide_field1_var,_vcoil2_var,_vcoil3_var,_Guide_field3_cp_var,_Guide_field2_var,_triacoil_1_var,_Guide_field4_cp_var,_Guide_field3_var,_vcoil4_var,_vcoil6_var,_vcoil5_var,_slit_1_var,_TOF_det_var,_GratingSlit1_1_var,_GratingSlit1_2_var,_GratingSlit1_3_var,_GratingSlit1_4_var,_Origin_var,_chop2_var)
mcenabletrace:
   5890, Generating update device(mcdotrace)
DEBUG: CMD: nvc finished
INFO: ===