Mcstas example programs
Kristian Nielsen
kristian.nielsen at risoe.dk
Mon Feb 15 10:05:40 CET 1999
Hi Stuart,
Ok, I was able to reproduce the problem on out alpha machine, and find
the cause. I assume that your problem was similar.
The problem is that, by default, the Digital Unix C compiler 'cc' is not
fully ANSI-C compliant. McStas simulations require an ANSI-C compiler.
Unfortunately, 'cc' by default is close enought to ANSI-C so that no
compilation errors occur, it just generates bad code!
To enable full ANSI-C support, the Digital Unix compiler requires the
'-std1' flag. Thus, when I compiled the prisma2 simulation using the
command
cc -std1 -o prisma2.out prisma2.c -lm
the simulation produced the correct results. Probably this will solve
your problem also.
Anyway, it is good that you pointed out this problem; it is clearly
something that we need to address in future releases of McStas.
- Kristian.
More information about the mcstas-users
mailing list