McStasMcXtrace / McCode

The home of the McStas (neutrons) and McXtrace (x-rays) Monte-Carlo ray-tracing instrument simulation codes.
https://github.com/McStasMcXtrace/McCode/wiki
GNU General Public License v3.0
77 stars 54 forks source link

Issue adding PowderN #1485

Open Rohit-Raut opened 1 year ago

Rohit-Raut commented 1 year ago

I am encountering a segmentation fault error while trying to simulate an instrument using the PowderN component in McStas. I have specified the Fe.laz file for the reflections parameter, and the file is located in the same directory as my instrument code (Fe.laz file exist in downloaded /mcstas/data directory as well). Despite this, I am getting a SIGSEGV (Mem Error) when running the simulation. Here is the relevant part of my McStas instrument code: COMPONENT powdern = PowderN( reflections = "Fe.laz", thickness = 0.1, radius = 5, yheight = 10 ) AT (0, 0, 0) RELATIVE arm2 ROTATED (0, 90, 90) RELATIVE arm2 Error Message: The error message I receive is as follows: : [pid 8731] Signal 11 detected SIGSEGV (Mem Error) Simulation: dist (dist2.instr) Breakpoint: [_powdern_trace] component powdern=PowderN() TRACE [/usr/share/mcstas/3.3/tools/Python/mcrun/../mccodelib/../../../samples/PowderN.comp:768] 0.00 % ( 0.0/883715000.0) Date: Thu Aug 23 11:56:33 2023 Started: Thu Aug 23 11:56:26 2023 Last I/O Error: No such file or directory Quit (core dumped)

I tried trouble shooting Steps Taken: Checked that the Fe.laz file and the instrument code exist in given directory. Ensured that the arm2 component is correctly initialized. Validated the format of the Fe.laz file. Despite these steps, the issue persists. I would really appreciate for any help.

willend commented 1 year ago

@Rohit-Raut thank you for reaching out.

Even though the segfault at first glance seems to occur in the PowderN component, it is not guaranteed that this is the actual location of the problem.

To have a chance of helping you out I would need access to

(The easiest is probably to compile a zip-archive and upload in this thread.)

Please also give som details about your installed McStas version and on your operating system etc.

Best, Peter

willend commented 1 year ago

(One thing that comes to mind already is of course that you have a VERY large powder can of radius 5m, height 10, is this intended?)