Skip to content

Commit a1d37dc

Browse files
authored
Merge pull request #2335 from willend/main
McStas Isotropic_Sqw: fix misplaced MPI_MASTER( … ); brackets
2 parents 5d11656 + 84b58c5 commit a1d37dc

2 files changed

Lines changed: 14 additions & 15 deletions

File tree

mcstas-comps/examples/ILL/ILL_IN5_Spots/ILL_IN5_Spots.instr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* with angle restriction (neutrons that scatter in Fe in front of a tube and
2020
* enter a different tube are absorbed). This model does not include the H16 guide.
2121
*
22-
* %Example: lambda=4.5 Detector: Detector_Sqw_I=8.5E4
22+
* %Example: lambda=4.5 Detector: Detector_Sqw_I=8.5E5
2323
*
2424
* %Parameters
2525
* lambda: [AA] mean incident wavelength

mcstas-comps/samples/Isotropic_Sqw.comp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,11 +1596,11 @@ SHARE
15961596
if (T > 3000)
15971597
T = 0; /* unrealistic */
15981598
if (!T_file && T) {
1599-
MPI_MASTER(
1600-
if (Sqw->verbose_output > 0) {
1601-
printf ("Isotropic_Sqw: %s: Temperature computed from S(q,w) data from %s is T=%g [K].\n", Sqw->compname, file, T);
1599+
MPI_MASTER (
1600+
if (Sqw->verbose_output > 0) {
1601+
printf ("Isotropic_Sqw: %s: Temperature computed from S(q,w) data from %s is T=%g [K].\n", Sqw->compname, file, T);
1602+
}
16021603
);
1603-
}
16041604
}
16051605

16061606
if (Sqw->Temperature == 0) {
@@ -2801,7 +2801,7 @@ FINALLY
28012801
mc_MPI_Sum (&VarSqw.multi, 1);
28022802
}
28032803
#endif
2804-
MPI_MASTER(
2804+
MPI_MASTER(
28052805
if (VarSqw.neutron_removed)
28062806
printf("Isotropic_Sqw: %s: %li neutron events (out of %li) that should have\n"
28072807
" scattered were transmitted because scattering conditions\n"
@@ -2814,16 +2814,15 @@ FINALLY
28142814
NAME_CURRENT_COMP, VarSqw.neutron_pmult, VarSqw.neutron_exit);
28152815

28162816
if (VarSqw.verbose_output >= 1 && VarSqw.psum_scatt > 0) {
2817-
printf ("Isotropic_Sqw: %s: Scattering fraction=%g of incoming intensity\n"
2818-
" Absorption fraction =%g\n",
2819-
NAME_CURRENT_COMP, VarSqw.mean_scatt / VarSqw.psum_scatt, VarSqw.mean_abs / VarSqw.psum_scatt);
2820-
printf (" Single scattering intensity =%g (coh=%g inc=%g)\n"
2821-
" Multiple scattering intensity =%g\n",
2822-
VarSqw.single_coh + VarSqw.single_inc, VarSqw.single_coh, VarSqw.single_inc, VarSqw.multi);
2823-
);
2817+
printf ("Isotropic_Sqw: %s: Scattering fraction=%g of incoming intensity\n"
2818+
" Absorption fraction =%g\n",
2819+
NAME_CURRENT_COMP, VarSqw.mean_scatt / VarSqw.psum_scatt, VarSqw.mean_abs / VarSqw.psum_scatt);
2820+
printf (" Single scattering intensity =%g (coh=%g inc=%g)\n"
2821+
" Multiple scattering intensity =%g\n",
2822+
VarSqw.single_coh + VarSqw.single_inc, VarSqw.single_coh, VarSqw.single_inc, VarSqw.multi);
28242823
}
2825-
2826-
/* end FINALLY */
2824+
);
2825+
/* end FINALLY */
28272826
%}
28282827
/*****************************************************************************/
28292828
/*****************************************************************************/

0 commit comments

Comments
 (0)