INFO: No output directory specified (--dir) INFO: Using directory: "Supermirror_thin_substrate_20241206_144659" INFO: Regenerating c-file: Supermirror_thin_substrate.c DEBUG: CMD: /u/data/pkwi/McStas/mcstas/3.x-dev/bin/mcstas-antlr -t -o ./Supermirror_thin_substrate.c Supermirror_thin_substrate.instr Downloading file 'mcstas-comps/contrib/SupermirrorFlat.comp' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/contrib/SupermirrorFlat.comp' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'. Downloading file 'mcstas-comps/contrib/PSD_Pol_monitor.comp' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/contrib/PSD_Pol_monitor.comp' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'. Downloading file 'mcstas-comps/share/supermirror-lib.h' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/share/supermirror-lib.h' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'. Downloading file 'mcstas-comps/share/polyhedron.h' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/share/polyhedron.h' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'. 2024-12-06 14:47:04.422 | DEBUG | mccode_antlr.translators.c:sort_include_hierarchy:41 - sort includes :SupermirrorFlat(0):supermirror-lib :supermirror-lib(0):polyhedron 2024-12-06 14:47:04.422 | DEBUG | mccode_antlr.translators.c:sort_include_hierarchy:66 - sorted to polyhedron supermirror-lib Downloading file 'mcstas-comps/share/polyhedron.c' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/share/polyhedron.c' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'. Downloading file 'mcstas-comps/share/plane.h' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/share/plane.h' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'. 2024-12-06 14:47:07.183 | INFO | mccode_antlr.translators.c:include_source:331 - polyhedron.c requested plane but is has not been included yet! Downloading file 'mcstas-comps/share/plane.c' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/share/plane.c' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'. Downloading file 'mcstas-comps/share/supermirror-lib.c' from 'https://github.com/McStasMcXtrace/McCode/raw/v3.5.14/mcstas-comps/share/supermirror-lib.c' to '/home/nexmap/pkwi/.cache/mcstas/v3.5.14'. The instrument has 22 parameters ----------------------------------------------------------- Generating single GPU kernel or single CPU section layout: ----------------------------------------------------------- Generating GPU/CPU -DFUNNEL layout: -> GPU kernel from component source Component supermirror1 is NOACC, CPUONLY=False ->FUNNEL mode enabled, SPLIT within buffer. -> GPU kernel from component supermirror1 -> GPU kernel from component Move -> GPU kernel from component PSD_after_supermirror_zoom_in -> GPU kernel from component PSD_after_supermirror -> GPU kernel from component PSD_after_supermirror_zoom_out -> GPU kernel from component spectrum -> GPU kernel from component Pol_lambda -> GPU kernel from component Polmap_average -> GPU kernel from component Polmap_zoom_in -> GPU kernel from component Polmap -> GPU kernel from component Polmap_zoom_out ----------------------------------------------------------- DEBUG: CMD: /u/data/pkwi/McStas/mcstas/3.x-dev/bin/mcstas-antlr finished INFO: Recompiling: ./Supermirror_thin_substrate.out DEBUG: CMD: nvc -o ./Supermirror_thin_substrate.out ./Supermirror_thin_substrate.c -fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC "./Supermirror_thin_substrate.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 " "./Supermirror_thin_substrate.c", line 8023: warning: missing return statement at end of non-void function "line_plane_intersect" [implicit_return_from_non_void_function] } ^ "./Supermirror_thin_substrate.c", line 8215: warning: variable "len" was declared but never referenced [declared_but_not_referenced] int i,j,n,*m, skip; double dd,len; Coords *vp, dp1, dp2, dp1_cross_dp2, dp1_dot_dp2; ^ "./Supermirror_thin_substrate.c", line 8215: warning: variable "dp1_cross_dp2" was declared but never referenced [declared_but_not_referenced] int i,j,n,*m, skip; double dd,len; Coords *vp, dp1, dp2, dp1_cross_dp2, dp1_dot_dp2; ^ "./Supermirror_thin_substrate.c", line 8215: warning: variable "dp1_dot_dp2" was declared but never referenced [declared_but_not_referenced] int i,j,n,*m, skip; double dd,len; Coords *vp, dp1, dp2, dp1_cross_dp2, dp1_dot_dp2; ^ "./Supermirror_thin_substrate.c", line 8441: warning: variable "d1" was declared but never referenced [declared_but_not_referenced] double d1,d2,d3,denom; ^ "./Supermirror_thin_substrate.c", line 8441: warning: variable "d2" was declared but never referenced [declared_but_not_referenced] double d1,d2,d3,denom; ^ "./Supermirror_thin_substrate.c", line 8441: warning: variable "d3" was declared but never referenced [declared_but_not_referenced] double d1,d2,d3,denom; ^ "./Supermirror_thin_substrate.c", line 8441: warning: variable "denom" was declared but never referenced [declared_but_not_referenced] double d1,d2,d3,denom; ^ "./Supermirror_thin_substrate.c", line 8603: warning: variable "cosA" was declared but never referenced [declared_but_not_referenced] double l1,l2,cosA; ^ "./Supermirror_thin_substrate.c", line 8738: warning: variable "dtime" was declared but never referenced [declared_but_not_referenced] double dtime[a->nf]; ^ "./Supermirror_thin_substrate.c", line 8739: warning: variable "dpoint" was declared but never referenced [declared_but_not_referenced] Coords dpoint[a->nf]; ^ "./Supermirror_thin_substrate.c", line 8740: warning: variable "time" was declared but never referenced [declared_but_not_referenced] double time[a->nf]; ^ "./Supermirror_thin_substrate.c", line 8741: warning: variable "point" was declared but never referenced [declared_but_not_referenced] Coords point[a->nf]; ^ "./Supermirror_thin_substrate.c", line 8742: warning: variable "plane_number" was declared but never referenced [declared_but_not_referenced] int plane_number[a->nf]; ^ "./Supermirror_thin_substrate.c", line 8743: warning: variable "type" was declared but never referenced [declared_but_not_referenced] int type[a->nf]; ^ "./Supermirror_thin_substrate.c", line 10439: warning: missing return statement at end of non-void function "add_neutron_record" [implicit_return_from_non_void_function] } ^ "./Supermirror_thin_substrate.c", line 10399: warning: variable "j" was declared but never referenced [declared_but_not_referenced] int i,j,i_nr; ^ "./Supermirror_thin_substrate.c", line 10963: warning: variable "dL" was declared but never referenced [declared_but_not_referenced] double dt, dL; ^ "./Supermirror_thin_substrate.c", line 10965: warning: variable "abs" was declared but never referenced [declared_but_not_referenced] AbsorberParameters*abs = &(((sm->mat).abs)[plane]); ^ "./Supermirror_thin_substrate.c", line 11509: warning: variable "fn" was declared but never referenced [declared_but_not_referenced] Coords fn=state->fn; ^ "./Supermirror_thin_substrate.c", line 11510: warning: variable "v" was declared but never referenced [declared_but_not_referenced] Coords v=state->v; ^ "./Supermirror_thin_substrate.c", line 11703: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11726: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11734: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11762: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11788: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11794: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11830: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11849: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11858: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11868: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11878: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11895: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11904: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11937: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11944: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11969: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 11992: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12000: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12048: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12059: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12078: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12086: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12109: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12116: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12124: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12133: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12145: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12156: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 12273: warning: variable "event" was declared but never referenced [declared_but_not_referenced] char location[2][CHAR_BUF_LENGTH], event[CHAR_BUF_LENGTH]; ^ "./Supermirror_thin_substrate.c", line 12202: warning: variable "m" was declared but never referenced [declared_but_not_referenced] int sm_ir_n, m, sm_ir_r; ^ "./Supermirror_thin_substrate.c", line 12695: warning: variable "i" is used before its value is set [used_before_set] MPI_MASTER ( ^ "./Supermirror_thin_substrate.c", line 12846: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //neutron skips module, should have been caught in function IntersectStdSupermirrorFlat(...) ^ "./Supermirror_thin_substrate.c", line 12858: warning: statement is unreachable [code_is_unreachable] return sm_Exited; break; //scattered ^ "./Supermirror_thin_substrate.c", line 12865: warning: statement is unreachable [code_is_unreachable] return sm_Absorbed; break; //absorbed ^ "./Supermirror_thin_substrate.c", line 12870: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 12874: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 12900: warning: statement is unreachable [code_is_unreachable] return sm_Exited; break; //scattered ^ "./Supermirror_thin_substrate.c", line 12907: warning: statement is unreachable [code_is_unreachable] return sm_Absorbed; break; //absorbed ^ "./Supermirror_thin_substrate.c", line 12912: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 12917: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 12939: warning: statement is unreachable [code_is_unreachable] return sm_Exited; break; //scattered ^ "./Supermirror_thin_substrate.c", line 12946: warning: statement is unreachable [code_is_unreachable] return sm_Absorbed; break; //absorbed ^ "./Supermirror_thin_substrate.c", line 12951: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 12956: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 12972: warning: statement is unreachable [code_is_unreachable] break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 12978: warning: statement is unreachable [code_is_unreachable] break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 12997: warning: statement is unreachable [code_is_unreachable] return sm_Exited; break; //scattered ^ "./Supermirror_thin_substrate.c", line 13004: warning: statement is unreachable [code_is_unreachable] return sm_Absorbed; break; //absorbed ^ "./Supermirror_thin_substrate.c", line 13009: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //internal reflection, something's wrong ^ "./Supermirror_thin_substrate.c", line 13014: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 13019: warning: statement is unreachable [code_is_unreachable] return sm_Error; break; //something's wrong ^ "./Supermirror_thin_substrate.c", line 13106: warning: variable "tc2" was set but never used [set_but_not_used] Coords tc1, tc2; ^ "./Supermirror_thin_substrate.c", line 14622: warning: statement is unreachable [code_is_unreachable] break; ^ "./Supermirror_thin_substrate.c", line 16881: warning: variable "t" was declared but never referenced [declared_but_not_referenced] time_t t; ^ "./Supermirror_thin_substrate.c", line 16882: warning: variable "ct" was set but never used [set_but_not_used] clock_t ct; ^ "./Supermirror_thin_substrate.c", line 1498: warning: variable "mcstartdate" was set but never used [set_but_not_used] static long mcstartdate = 0; /* start simulation time */ ^ "./Supermirror_thin_substrate.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_mirror: 4628, Generating implicit acc routine seq 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 point_to_plane_signed_distance: 7981, Generating implicit acc routine seq Generating acc routine seq Generating NVIDIA GPU code line_plane_intersect: 7998, Generating implicit acc routine seq Generating acc routine seq Generating NVIDIA GPU code check_point_with_respect_to_polyhedron: 8200, Generating implicit acc routine seq Generating acc routine seq Generating NVIDIA GPU code line_polyhedron_intersect: 8839, Accelerator restriction: unsupported statement type: opcode=DEALLOC supermirror_flat_inc_prefix: 9418, Generating implicit acc routine seq Generating acc routine seq Generating NVIDIA GPU code supermirror_flat_dec_prefix: 9424, Generating implicit acc routine seq Generating acc routine seq Generating NVIDIA GPU code NVC++-S-1058-Call to variadic function not supported - sprintf (./Supermirror_thin_substrate.c: 9447) NVC++/x86-64 Linux 24.7-0: compilation completed with severe errors INFO: call to nvc failed with Command 'nvc -o ./Supermirror_thin_substrate.out ./Supermirror_thin_substrate.c -fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC' returned non-zero exit status 2. Traceback (most recent call last): File "/u/data/pkwi/McStas/mcstas/3.x-dev/tools/Python/mcrun/mcrun.py", line 595, in main() File "/u/data/pkwi/McStas/mcstas/3.x-dev/tools/Python/mcrun/mcrun.py", line 503, in main mcstas.prepare(options) File "/u/data/pkwi/McStas/mcstas/3.x-dev/tools/Python/mcrun/mccode.py", line 294, in prepare Process(lexer.quote(options.cc)).run(args) File "/u/data/pkwi/McStas/mcstas/3.x-dev/tools/Python/mcrun/mccode.py", line 77, in run raise err File "/u/data/pkwi/McStas/mcstas/3.x-dev/tools/Python/mcrun/mccode.py", line 73, in run proc = run(command, shell=True, check=True, text=True, capture_output=pipe) File "/u/data/pkwi/McStas/mcstas/3.x-dev/miniconda3/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'nvc -o ./Supermirror_thin_substrate.out ./Supermirror_thin_substrate.c -fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC' returned non-zero exit status 2.