INFO: No output directory specified (--dir) INFO: Using directory: "Test_Single_crystal_inelastic_20250815_120620" INFO: Regenerating c-file: Test_Single_crystal_inelastic.c DEBUG: CMD: /home/willend/micromamba/bin/mcstas -t -o ./Test_Single_crystal_inelastic.c Test_Single_crystal_inelastic.instr Info: 'Single_crystal_inelastic' is a contributed component. Info: 'E_4PI' is a contributed component. CFLAGS= -DFUNNEL WARNING: The parameter mosaic_AB of sample is initialized using a static {,,,} vector. -> Such static vectors support literal numbers ONLY. -> Any vector use of variables or defines must happen via a DECLARE/INITIALIZE pointer. ----------------------------------------------------------- Generating single GPU kernel or single CPU section layout: ----------------------------------------------------------- Generating GPU/CPU -DFUNNEL layout: Component sample is NOACC, CPUONLY=1 -> FUNNEL mode enabled, SPLIT within buffer. -> CPU section from component sample -> GPU kernel from component monitoE ----------------------------------------------------------- DEBUG: CMD: /home/willend/micromamba/bin/mcstas finished INFO: Linting generated code: ./Test_Single_crystal_inelastic.c DEBUG: CMD: cppcheck ./Test_Single_crystal_inelastic.c --check-level=exhaustive --force -DMCDEFAULT_NCOUNT=1000000 -UMC_PORTABLE -DND_BUFFER=10000000 -UNOABSORB_INF_NAN -UOMPI_MPI_H -DSIGABRT -DSIGBREAK -DSIGBUS -DSIGPE -DSIGHUP -DSIGILL -DSIGINT -DSIGKILL -DSIGUSR1 -DSIGUSR2 -DSIGPIPE -DSIGQUIT -DSIGSEGV -DSIGTRAP -DSIGURG -DSIGFPE -DSIGKILL -DSIGTERM -UTEST -UUSE_OPENCL -UWIN32 -UOPENACC -UGCCOFFLOAD -U_MSC_VER -U_MSC_EXTENSIONS -U_WIN32 -UWIN32 -D__unix__ -UDANSE -UFUNNEL -UMC_ANCIENT_COMPATIBILITY -UMC_POL_COMPAT -UNEUTRONICS -Uisnan -Uisinf Checking Test_Single_crystal_inelastic.c ... Checking Test_Single_crystal_inelastic.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1... Test_Single_crystal_inelastic.c:10485:7: warning: If memory allocation fails, then there is a possible null pointer dereference: id [nullPointerOutOfMemory] id[i] = i; if(Qm>Qmax) Qmax=Qm; if(en>Emax) Emax=en; ^ Test_Single_crystal_inelastic.c:10471:27: note: Assuming allocation function fails int *id = (int*)malloc(size*sizeof(int)); ^ Test_Single_crystal_inelastic.c:10471:15: note: Assignment 'id=(int*)malloc(size*sizeof(int))', assigned value is 0 int *id = (int*)malloc(size*sizeof(int)); ^ Test_Single_crystal_inelastic.c:10485:7: note: Null pointer dereference id[i] = i; if(Qm>Qmax) Qmax=Qm; if(en>Emax) Emax=en; ^ Test_Single_crystal_inelastic.c:10486:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].h = h; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10486:7: note: Null pointer dereference list[i].h = h; ^ Test_Single_crystal_inelastic.c:10487:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].k = k; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10487:7: note: Null pointer dereference list[i].k = k; ^ Test_Single_crystal_inelastic.c:10488:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].l = l; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10488:7: note: Null pointer dereference list[i].l = l; ^ Test_Single_crystal_inelastic.c:10489:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].qx = Qx; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10489:7: note: Null pointer dereference list[i].qx = Qx; ^ Test_Single_crystal_inelastic.c:10490:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].qy = Qy; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10490:7: note: Null pointer dereference list[i].qy = Qy; ^ Test_Single_crystal_inelastic.c:10491:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].qz = Qz; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10491:7: note: Null pointer dereference list[i].qz = Qz; ^ Test_Single_crystal_inelastic.c:10492:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].en = en; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10492:7: note: Null pointer dereference list[i].en = en; ^ Test_Single_crystal_inelastic.c:10493:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].SQW = Table_Index(sTable, i, info->column_order[4]-1); ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10493:7: note: Null pointer dereference list[i].SQW = Table_Index(sTable, i, info->column_order[4]-1); ^ Test_Single_crystal_inelastic.c:10494:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].qmod = Qm; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10494:7: note: Null pointer dereference list[i].qmod = Qm; ^ Test_Single_crystal_inelastic.c:10495:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].chki = (Qm + 0.4825966246*en/Qm)/2.; // |Q|+(2m/hbar^2)*E/|Q| <= 2|ki| to satisfy conservation. ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10495:7: note: Null pointer dereference list[i].chki = (Qm + 0.4825966246*en/Qm)/2.; // |Q|+(2m/hbar^2)*E/|Q| <= 2|ki| to satisfy conservation. ^ Test_Single_crystal_inelastic.c:10496:17: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] if(i>0 && list[i].chkiis_sorted = 0; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10496:17: note: Null pointer dereference if(i>0 && list[i].chkiis_sorted = 0; ^ Test_Single_crystal_inelastic.c:10496:30: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] if(i>0 && list[i].chkiis_sorted = 0; ^ Test_Single_crystal_inelastic.c:10468:36: note: Assuming allocation function fails list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10468:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*)malloc(size*sizeof(struct hkl_data)); ^ Test_Single_crystal_inelastic.c:10496:30: note: Null pointer dereference if(i>0 && list[i].chkiis_sorted = 0; ^ Test_Single_crystal_inelastic.c:10509:35: warning: If resource allocation fails, then there is a possible null pointer dereference: tf [nullPointerOutOfResources] for(i=0; i