<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Hello,
<div><br>
</div>
<div>It looks like you are porting a McStas 2.x instrument to 3.x, but this is hard to fully judge just from the error messages. :-)</div>
<div><br>
</div>
<div>Please first check that you have followed all recommendations for the process by consulting</div>
<div><a href="https://github.com/McStasMcXtrace/McCode/wiki/HOWTO%3A-Modifying-a-McStas-2-instrument-for-use-under-McStas-3">https://github.com/McStasMcXtrace/McCode/wiki/HOWTO%3A-Modifying-a-McStas-2-instrument-for-use-under-McStas-3</a></div>
<div><br>
</div>
<div>If this is not enough to make the instrument run, please send along your .instr file plus any needed local .comp file and/or datafiles.</div>
<div><br>
</div>
<div>Best</div>
<div>Peter Willendrup</div>
<div><br>
</div>
<div><br>
<br>
<div>
<div><br>
Peter Kjær Willendrup<br>
Forskningsingeniør, Specialkonsulent<br>
<br>
DTU Physics<br>
</div>
<span><br class="Apple-interchange-newline">
<span></span></span><span></span><span><img alt="image001.gif" src="cid:b6339554-7f28-441d-9f31-5944f811397c@win.dtu.dk"></span><br>
<br>
<br>
Technical University of Denmark<br>
<br>
<br>
<span><span></span></span><span></span><span><img alt="image002.gif" src="cid:e108e480-fcab-46e2-9531-b38165079572@win.dtu.dk"></span><br class="Apple-interchange-newline">
<br>
<br>
Department of Physics<br>
Fysikvej<br>
Building 307<br>
DK-2800 Kongens Lyngby
<div><br>
</div>
<div>Main office at </div>
<div>ESS DMSC</div>
<div>COBIS, Ole Maaløes vej 3, 2200 København N, Denmark</div>
<div><br>
Direct +45 2125 4612<br>
Mobil +45 2125 4612<br>
Fax +45 4593 2399<br>
pkwi@fysik.dtu.dk</div>
<div><br>
</div>
</div>
</div>
<div>
<div><br>
<blockquote type="cite">
<div>On 12 May 2023, at 11.17, 曾智蓉 <zengzr@ihep.ac.cn> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<p>Hi, </p>
<p><br>
</p>
<p>I reinstalled the McStas with the version of 3.2. But the instrument file can't be compiled properly. The files was created by saving another old file which was previously run properly.In addition, if I make any change to the old file and save it, the new
file was not run properly too. May I ask for some help? Thanks very much! </p>
<p><br>
</p>
<p>PS: the information for the error was as following: </p>
<p>" </p>
<p style="margin-bottom:0px;">loading system configuration </p>
<p style="margin-bottom:0px;">INFO: No output directory specified (--dir) </p>
<p style="margin-bottom:0px;">INFO: Using directory: "#beamline82_20230512_165013"
</p>
<p style="margin-bottom:0px;">INFO: Regenerating c-file: #beamline82.c </p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">-----------------------------------------------------------
</p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">Generating single GPU kernel or single CPU section layout:
</p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">-----------------------------------------------------------
</p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">Generating GPU/CPU -DFUNNEL layout: </p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">-----------------------------------------------------------
</p>
<p style="margin-bottom:0px;">Info: 'Al_window' is a contributed component. </p>
<p style="margin-bottom:0px;">Warning: DECLARE block contains 101 assignments (= sign).
</p>
<p style="margin-bottom:0px;">Move them into an INITIALIZE section. May fail at compile.
</p>
<p style="margin-bottom:0px;">CFLAGS= </p>
<p style="margin-bottom:0px;">INFO: Recompiling: #beamline82.exe </p>
<p style="margin-bottom:0px;">#beamline82.c: In function 'mcuse_dir': </p>
<p style="margin-bottom:0px;">#beamline82.c:3629:8: warning: implicit declaration of function 'mkdir' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">if(mkdir(dirname, 0777)) { </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c: In function 'sighandler': </p>
<p style="margin-bottom:0px;">#beamline82.c:5535:64: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">printf("\n# " MCCODE_STRING ": [pid %i] Signal %i detected", getpid(), sig);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c: At top level: </p>
<p style="margin-bottom:0px;">#beamline82.c:8215:3: error: expected specifier-qualifier-list before 'return'
</p>
<p style="margin-bottom:0px;">return vecy[idx]; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c: In function 'class_SNS_source2_init':
</p>
<p style="margin-bottom:0px;">#beamline82.c:12169:20: error: expected ')' before '->' token
</p>
<p style="margin-bottom:0px;">#define fp (_comp->_parameters.fp) </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12185:9: note: in expansion of macro 'fp'
</p>
<p style="margin-bottom:0px;">FILE *fp; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12190:3: error: 'Pvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Pvec=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12190:3: note: each undeclared identifier is reported only once for each function it appears in
</p>
<p style="margin-bottom:0px;">#beamline82.c:12191:3: error: 'inxvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">inxvec=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12192:3: error: 'inyvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">inyvec=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12193:3: error: 'tcol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tcol=malloc(200*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12194:3: error: 'Ecol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Ecol=malloc(200*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12195:3: error: 'tyval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tyval=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12196:3: error: 'txval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">txval=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12209:45: error: 'filename' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">printf("%s%s\n","Loading moderator file ",filename);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12210:4: warning: implicit declaration of function 'SNS_source2_load' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">SNS_source2_load(filename,inxvec,inyvec,0,2,&xylength,tcol,Ecol,Imat,&ntvals,&nEvals);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12210:74: error: 'ntvals' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">SNS_source2_load(filename,inxvec,inyvec,0,2,&xylength,tcol,Ecol,Imat,&ntvals,&nEvals);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12210:82: error: 'nEvals' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">SNS_source2_load(filename,inxvec,inyvec,0,2,&xylength,tcol,Ecol,Imat,&ntvals,&nEvals);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12216:2: error: 'INorm2' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">INorm2=integ1(xonly,Emin/1000.0,Emax/1000.0,0.001);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12216:9: warning: implicit declaration of function 'integ1' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">INorm2=integ1(xonly,Emin/1000.0,Emax/1000.0,0.001);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12216:16: error: 'xonly' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">INorm2=integ1(xonly,Emin/1000.0,Emax/1000.0,0.001);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12217:3: warning: implicit declaration of function 'Pcalc' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">Pcalc(xonly,llim,hlim,inxvec,Pvec,xylength,&idxstart,&idxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12217:47: error: 'idxstart' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Pcalc(xonly,llim,hlim,inxvec,Pvec,xylength,&idxstart,&idxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12217:57: error: 'idxstop' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Pcalc(xonly,llim,hlim,inxvec,Pvec,xylength,&idxstart,&idxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12228:7: warning: implicit declaration of function 'tPcalc' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">tPcalc(txonly,ltlim,htlim,tcol,tPvec,ntvals,&tidxstart,&tidxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12228:14: error: 'txonly' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tPcalc(txonly,ltlim,htlim,tcol,tPvec,ntvals,&tidxstart,&tidxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12228:52: error: 'tidxstart' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tPcalc(txonly,ltlim,htlim,tcol,tPvec,ntvals,&tidxstart,&tidxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12228:63: error: 'tidxstop' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tPcalc(txonly,ltlim,htlim,tcol,tPvec,ntvals,&tidxstart,&tidxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12235:4: error: 'EPmax' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">EPmax=quadfuncint(Emax/1000.0,xylength,inxvec,Pvec);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12235:10: warning: implicit declaration of function 'quadfuncint' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">EPmax=quadfuncint(Emax/1000.0,xylength,inxvec,Pvec);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:12236:4: error: 'EPmin' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">EPmin=quadfuncint(Emin/1000.0,xylength,inxvec,Pvec);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c: In function 'class_SNS_source2_trace':
</p>
<p style="margin-bottom:0px;">#beamline82.c:13067:3: error: 'hdiv' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">hdiv=theta; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13068:3: error: 'vdiv' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">vdiv=phi; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13072:11: error: 'EPmin' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">randp=EPmin+rand01()*(EPmax-EPmin); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13072:27: error: 'EPmax' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">randp=EPmin+rand01()*(EPmax-EPmin); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13074:10: warning: implicit declaration of function 'zero_find' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13074:20: error: 'Pfunc' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13074:32: error: 'inxvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13074:39: error: 'idxstart' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13074:56: error: 'idxstop' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13078:16: error: 'nEvals' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">while((idx1<nEvals)&&(Ecol[idx1]<Eval)){ </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13078:26: error: 'Ecol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">while((idx1<nEvals)&&(Ecol[idx1]<Eval)){ </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13084:21: error: 'ntvals' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">for (idx3=0;idx3<ntvals;idx3++){ </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13085:6: error: 'tyval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tyval[idx3]=linint(Eval,Ecol[Eidxl],Ecol[Eidxh],Ptmat[idx3][Eidxl],Ptmat[idx3][Eidxh]);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13085:18: warning: implicit declaration of function 'linint' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">tyval[idx3]=linint(Eval,Ecol[Eidxl],Ecol[Eidxh],Ptmat[idx3][Eidxl],Ptmat[idx3][Eidxh]);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13086:6: error: 'txval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">txval[idx3]=tcol[idx3]; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13086:18: error: 'tcol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">txval[idx3]=tcol[idx3]; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13088:16: error: 'tidxstart' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">randp=tyval[tidxstart]+rand01()*(tyval[tidxstop-1]-tyval[tidxstart]);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13088:43: error: 'tidxstop' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">randp=tyval[tidxstart]+rand01()*(tyval[tidxstop-1]-tyval[tidxstart]);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13090:22: error: 'tPfunc' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tval=zero_find(tPfunc,randp,txval[tidxstart],txval[tidxstop-1],1e-5);}
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:13101:33: error: 'INorm2' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">p*=(xwidth*yheight/(0.1*0.1))*INorm2/mcget_ncount();
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c: In function 'class_SNS_source2_finally':
</p>
<p style="margin-bottom:0px;">#beamline82.c:16207:8: error: 'txval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(txval);free(tyval);free(tPvec); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:16207:20: error: 'tyval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(txval);free(tyval);free(tPvec); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:16208:8: error: 'inxvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:16208:21: error: 'inyvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:16208:34: error: 'Pvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:16208:45: error: 'tcol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:16208:56: error: 'Ecol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c: In function 'class_SNS_source2_display':
</p>
<p style="margin-bottom:0px;">#beamline82.c:16567:0: warning: "line" redefined </p>
<p style="margin-bottom:0px;">#define line (_comp->_parameters.line) </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c:16517:0: note: this is the location of the previous definition
</p>
<p style="margin-bottom:0px;">#define line mcdis_line </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline82.c: In function 'class_Arm_display': </p>
<p style="margin-bottom:0px;">#beamline82.c:16618:3: warning: implicit declaration of function 'line' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">line(0,0,0,0.2,0,0); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">start mcrun #beamline82.instr -d C:\mcstas-3.2\source_test\#beamline82_20230512_165017 -n 1000000
</p>
<p style="margin-bottom:0px;">Instrument opened: #beamline8.instr </p>
<p style="margin-bottom:0px;">loading system configuration </p>
<p style="margin-bottom:0px;">INFO: No output directory specified (--dir) </p>
<p style="margin-bottom:0px;">INFO: Using directory: "#beamline8_20230512_170946"
</p>
<p style="margin-bottom:0px;">INFO: Using existing c-file: #beamline8.c </p>
<p style="margin-bottom:0px;">INFO: Using existing binary: #beamline8.exe </p>
<p style="margin-bottom:0px;">INFO: === </p>
<p style="margin-bottom:0px;">begin instrument: CSNS_img </p>
<p style="margin-bottom:0px;">Creator: McStas 2.7.1 - Oct. 04, 2021 </p>
<p style="margin-bottom:0px;">Source: #beamline8.instr </p>
<p style="margin-bottom:0px;">Parameters: Lmin(double) Lmax(double) source_size(double) dist(double) moderator(string)
</p>
<p style="margin-bottom:0px;">Trace_enabled: yes </p>
<p style="margin-bottom:0px;">Default_main: yes </p>
<p style="margin-bottom:0px;">Embedded_runtime: yes </p>
<p style="margin-bottom:0px;">end instrument </p>
<p style="margin-bottom:0px;">begin simulation: . </p>
<p style="margin-bottom:0px;">Format: McCode with text headers </p>
<p style="margin-bottom:0px;">URL: http://www.mccode.org </p>
<p style="margin-bottom:0px;">Creator: McStas 2.7.1 - Oct. 04, 2021 </p>
<p style="margin-bottom:0px;">Instrument: #beamline8.instr </p>
<p style="margin-bottom:0px;">Ncount: 1000000 </p>
<p style="margin-bottom:0px;">Trace: no </p>
<p style="margin-bottom:0px;">Gravitation: no </p>
<p style="margin-bottom:0px;">Seed: 1683886311 </p>
<p style="margin-bottom:0px;">Directory: . </p>
<p style="margin-bottom:0px;">Param: Lmin=0.005 </p>
<p style="margin-bottom:0px;">Param: Lmax=40 </p>
<p style="margin-bottom:0px;">Param: source_size=0.1 </p>
<p style="margin-bottom:0px;">Param: dist=2.32 </p>
<p style="margin-bottom:0px;">Param: moderator=MCSTAS-DPHM-BL8.dat </p>
<p style="margin-bottom:0px;">end simulation </p>
<p style="margin-bottom:0px;">start mcrun #beamline8.instr -d C:\mcstas-3.2\source_test\#beamline8_20230512_170948 -n 1000000 Lmin=0.005 Lmax=40 source_size=0.1 dist=2.32 moderator=MCSTAS-DPHM-BL8.dat
</p>
<p style="margin-bottom:0px;">loading system configuration </p>
<p style="margin-bottom:0px;">INFO: No output directory specified (--dir) </p>
<p style="margin-bottom:0px;">INFO: Using directory: "#beamline8_20230512_171041"
</p>
<p style="margin-bottom:0px;">INFO: Regenerating c-file: #beamline8.c </p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">-----------------------------------------------------------
</p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">Generating single GPU kernel or single CPU section layout:
</p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">-----------------------------------------------------------
</p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">Generating GPU/CPU -DFUNNEL layout: </p>
<p style="margin-bottom:0px;color:#008000;"><br>
</p>
<p style="margin-bottom:0px;">-----------------------------------------------------------
</p>
<p style="margin-bottom:0px;">Info: 'Al_window' is a contributed component. </p>
<p style="margin-bottom:0px;">Warning: DECLARE block contains 101 assignments (= sign).
</p>
<p style="margin-bottom:0px;">Move them into an INITIALIZE section. May fail at compile.
</p>
<p style="margin-bottom:0px;">CFLAGS= </p>
<p style="margin-bottom:0px;">INFO: Recompiling: #beamline8.exe </p>
<p style="margin-bottom:0px;">#beamline8.c: In function 'mcuse_dir': </p>
<p style="margin-bottom:0px;">#beamline8.c:3629:8: warning: implicit declaration of function 'mkdir' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">if(mkdir(dirname, 0777)) { </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c: In function 'sighandler': </p>
<p style="margin-bottom:0px;">#beamline8.c:5535:64: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">printf("\n# " MCCODE_STRING ": [pid %i] Signal %i detected", getpid(), sig);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c: At top level: </p>
<p style="margin-bottom:0px;">#beamline8.c:7992:3: error: expected specifier-qualifier-list before 'return'
</p>
<p style="margin-bottom:0px;">return vecy[idx]; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c: In function 'class_SNS_source2_init':
</p>
<p style="margin-bottom:0px;">#beamline8.c:8582:20: error: expected ')' before '->' token
</p>
<p style="margin-bottom:0px;">#define fp (_comp->_parameters.fp) </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8598:9: note: in expansion of macro 'fp'
</p>
<p style="margin-bottom:0px;">FILE *fp; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8603:3: error: 'Pvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Pvec=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8603:3: note: each undeclared identifier is reported only once for each function it appears in
</p>
<p style="margin-bottom:0px;">#beamline8.c:8604:3: error: 'inxvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">inxvec=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8605:3: error: 'inyvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">inyvec=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8606:3: error: 'tcol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tcol=malloc(200*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8607:3: error: 'Ecol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Ecol=malloc(200*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8608:3: error: 'tyval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tyval=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8609:3: error: 'txval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">txval=malloc(500*sizeof(double)); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8622:45: error: 'filename' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">printf("%s%s\n","Loading moderator file ",filename);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8623:4: warning: implicit declaration of function 'SNS_source2_load' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">SNS_source2_load(filename,inxvec,inyvec,0,2,&xylength,tcol,Ecol,Imat,&ntvals,&nEvals);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8623:74: error: 'ntvals' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">SNS_source2_load(filename,inxvec,inyvec,0,2,&xylength,tcol,Ecol,Imat,&ntvals,&nEvals);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8623:82: error: 'nEvals' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">SNS_source2_load(filename,inxvec,inyvec,0,2,&xylength,tcol,Ecol,Imat,&ntvals,&nEvals);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8629:2: error: 'INorm2' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">INorm2=integ1(xonly,Emin/1000.0,Emax/1000.0,0.001);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8629:9: warning: implicit declaration of function 'integ1' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">INorm2=integ1(xonly,Emin/1000.0,Emax/1000.0,0.001);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8629:16: error: 'xonly' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">INorm2=integ1(xonly,Emin/1000.0,Emax/1000.0,0.001);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8630:3: warning: implicit declaration of function 'Pcalc' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">Pcalc(xonly,llim,hlim,inxvec,Pvec,xylength,&idxstart,&idxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8630:47: error: 'idxstart' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Pcalc(xonly,llim,hlim,inxvec,Pvec,xylength,&idxstart,&idxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8630:57: error: 'idxstop' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Pcalc(xonly,llim,hlim,inxvec,Pvec,xylength,&idxstart,&idxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8641:7: warning: implicit declaration of function 'tPcalc' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">tPcalc(txonly,ltlim,htlim,tcol,tPvec,ntvals,&tidxstart,&tidxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8641:14: error: 'txonly' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tPcalc(txonly,ltlim,htlim,tcol,tPvec,ntvals,&tidxstart,&tidxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8641:52: error: 'tidxstart' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tPcalc(txonly,ltlim,htlim,tcol,tPvec,ntvals,&tidxstart,&tidxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8641:63: error: 'tidxstop' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tPcalc(txonly,ltlim,htlim,tcol,tPvec,ntvals,&tidxstart,&tidxstop);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8648:4: error: 'EPmax' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">EPmax=quadfuncint(Emax/1000.0,xylength,inxvec,Pvec);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8648:10: warning: implicit declaration of function 'quadfuncint' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">EPmax=quadfuncint(Emax/1000.0,xylength,inxvec,Pvec);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:8649:4: error: 'EPmin' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">EPmin=quadfuncint(Emin/1000.0,xylength,inxvec,Pvec);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c: In function 'class_SNS_source2_trace':
</p>
<p style="margin-bottom:0px;">#beamline8.c:9041:3: error: 'hdiv' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">hdiv=theta; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9042:3: error: 'vdiv' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">vdiv=phi; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9046:11: error: 'EPmin' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">randp=EPmin+rand01()*(EPmax-EPmin); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9046:27: error: 'EPmax' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">randp=EPmin+rand01()*(EPmax-EPmin); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9048:10: warning: implicit declaration of function 'zero_find' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9048:20: error: 'Pfunc' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9048:32: error: 'inxvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9048:39: error: 'idxstart' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9048:56: error: 'idxstop' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">Eval=zero_find(Pfunc,randp,inxvec[idxstart],inxvec[idxstop],1e-5);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9052:16: error: 'nEvals' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">while((idx1<nEvals)&&(Ecol[idx1]<Eval)){ </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9052:26: error: 'Ecol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">while((idx1<nEvals)&&(Ecol[idx1]<Eval)){ </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9058:21: error: 'ntvals' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">for (idx3=0;idx3<ntvals;idx3++){ </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9059:6: error: 'tyval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tyval[idx3]=linint(Eval,Ecol[Eidxl],Ecol[Eidxh],Ptmat[idx3][Eidxl],Ptmat[idx3][Eidxh]);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9059:18: warning: implicit declaration of function 'linint' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">tyval[idx3]=linint(Eval,Ecol[Eidxl],Ecol[Eidxh],Ptmat[idx3][Eidxl],Ptmat[idx3][Eidxh]);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9060:6: error: 'txval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">txval[idx3]=tcol[idx3]; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9060:18: error: 'tcol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">txval[idx3]=tcol[idx3]; </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9062:16: error: 'tidxstart' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">randp=tyval[tidxstart]+rand01()*(tyval[tidxstop-1]-tyval[tidxstart]);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9062:43: error: 'tidxstop' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">randp=tyval[tidxstart]+rand01()*(tyval[tidxstop-1]-tyval[tidxstart]);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9064:22: error: 'tPfunc' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">tval=zero_find(tPfunc,randp,txval[tidxstart],txval[tidxstop-1],1e-5);}
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:9075:33: error: 'INorm2' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">p*=(xwidth*yheight/(0.1*0.1))*INorm2/mcget_ncount();
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c: In function 'class_SNS_source2_finally':
</p>
<p style="margin-bottom:0px;">#beamline8.c:10043:8: error: 'txval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(txval);free(tyval);free(tPvec); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:10043:20: error: 'tyval' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(txval);free(tyval);free(tPvec); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:10044:8: error: 'inxvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:10044:21: error: 'inyvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:10044:34: error: 'Pvec' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:10044:45: error: 'tcol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:10044:56: error: 'Ecol' undeclared (first use in this function)
</p>
<p style="margin-bottom:0px;">free(inxvec);free(inyvec);free(Pvec);free(tcol);free(Ecol);
</p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c: In function 'class_SNS_source2_display':
</p>
<p style="margin-bottom:0px;">#beamline8.c:10206:0: warning: "line" redefined </p>
<p style="margin-bottom:0px;">#define line (_comp->_parameters.line) </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c:10156:0: note: this is the location of the previous definition
</p>
<p style="margin-bottom:0px;">#define line mcdis_line </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">#beamline8.c: In function 'class_Arm_display': </p>
<p style="margin-bottom:0px;">#beamline8.c:10257:3: warning: implicit declaration of function 'line' [-Wimplicit-function-declaration]
</p>
<p style="margin-bottom:0px;">line(0,0,0,0.2,0,0); </p>
<p style="margin-bottom:0px;">^ </p>
<p style="margin-bottom:0px;">start mcrun #beamline8.instr -d C:\mcstas-3.2\source_test\#beamline8_20230512_171044 -n 1000000
</p>
" _______________________________________________<br>
mcstas-users mailing list<br>
mcstas-users@mcstas.org<br>
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users<br>
</div>
</blockquote>
</div>
<br>
</div>
<br>
</body>
</html>