Download User Manual - Rencurel ESS workshop
Transcript
. . . . 24 25 25 26 5 Running McStas 5.1 Brief introduction to the graphical user interface . . . . . . . . . . . . . . . 5.1.1 New releases of McStas . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Running the instrument compiler . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Code generation options . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 Specifying the location of files . . . . . . . . . . . . . . . . . . . . . . 5.2.3 Embedding the generated simulations in other programs . . . . . . . 5.2.4 Running the C compiler . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Running the simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.1 Choosing an output data file format . . . . . . . . . . . . . . . . . . 5.3.2 Basic import and plot of results . . . . . . . . . . . . . . . . . . . . . 5.3.3 Interacting with a running simulation . . . . . . . . . . . . . . . . . 5.3.4 Optimizing simulations . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Using simulation front-ends . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.1 The graphical user interface (mcgui) . . . . . . . . . . . . . . . . . . 5.4.2 Running simulations with automatic compilation (mcrun) . . . . . . 5.4.3 Graphical display of simulations (mcdisplay) . . . . . . . . . . . . . 5.4.4 Plotting the results of a simulation (mcplot) . . . . . . . . . . . . . . 5.4.5 Plotting resolution functions (mcresplot) . . . . . . . . . . . . . . . . 5.4.6 Creating and viewing the library and component/instrument help (mcdoc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.7 Translating McStas components for Vitess (mcstas2vitess) . . . . . . 5.4.8 Translating McStas results files between Matlab and Scilab formats 5.5 Analyzing and visualizing the simulation results . . . . . . . . . . . . . . . . 5.6 Using computer Grids and Clusters . . . . . . . . . . . . . . . . . . . . . . . 5.6.1 Distribute mcrun scans (grid) - Unix only . . . . . . . . . . . . . . . 5.6.2 Parallel computing (MPI) . . . . . . . . . . . . . . . . . . . . . . . . 5.6.3 McRun script with MPI support . . . . . . . . . . . . . . . . . . . . 5.6.4 McStas/MPI Performance . . . . . . . . . . . . . . . . . . . . . . . . 5.6.5 McStas/MPI Bugs and limitations . . . . . . . . . . . . . . . . . . . 27 27 30 31 32 32 33 33 34 35 36 36 39 40 41 46 47 49 50 6 The 6.1 6.2 6.3 59 59 60 62 63 63 64 64 67 67 4.3 4.4 4 4.2.1 Statistical errors of non-integer counts . . . . . . . . Weight factor transformations during a Monte Carlo choice 4.3.1 Direction focusing . . . . . . . . . . . . . . . . . . . Adaptive sampling . . . . . . . . . . . . . . . . . . . . . . . McStas kernel and meta-language Notational conventions . . . . . . . . . Syntaxical conventions . . . . . . . . . Writing instrument definitions . . . . . 6.3.1 The instrument definition head 6.3.2 The DECLARE section . . . . . . 6.3.3 The INITIALIZE section . . . . 6.3.4 The TRACE section . . . . . . . 6.3.5 The SAVE section . . . . . . . . 6.3.6 The FINALLY section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 51 52 52 54 55 55 56 57 58 Risø–R–1416(EN)