We consider the computation of the coexistence pressure of the liquid-solid transition of a system
of hard spheres from direct simulation of the inhomogeneous system formed from liquid and solid
phases separated by an interface. Monte Carlo simulations of the interfacial system are performed
in three different ensembles. In a first approach, a series of simulations is carried out in the
isothermal-isobaric ensemble, where the solid is allowed to relax to its equilibrium crystalline
structure, thus avoiding the appearance of artificial stress in the system. Here, the total volume of the
system fluctuates due to changes in the three dimensions of the simulation box. In a second
approach, we consider simulations of the inhomogeneous system in an isothermal-isobaric ensemble
where the normal pressure, as well as the area of the planar fluid-solid interface, are kept constant.
Now, the total volume of the system fluctuates due to changes in the longitudinal dimension of the
simulation box. In both approaches, the coexistence pressure is estimated by monitoring the
evolution of the density along several simulations carried out at different pressures. Both routes are
seen to provide consistent values of the fluid-solid coexistence pressure, p=11.54 4 kBT/ 3, which
indicates that the error introduced by the use of the standard constant-pressure ensemble for this
particular problem is small, provided the systems are sufficiently large. An additional simulation of
the interfacial system is conducted in a canonical ensemble where the dimensions of the simulation
box are allowed to change subject to the constraint that the total volume is kept fixed. In this
approach, the coexistence pressure corresponds to the normal component of the pressure tensor,
which can be computed as an appropriate ensemble average in a single simulation. This route yields
a value of p=11.54 4 kBT/ 3. We conclude that the results obtained for the coexistence pressure
from direct simulations of the liquid and solid phases in coexistence using different ensembles are
mutually consistent and are in excellent agreement with the values obtained from free energy
calculations.