We investigate the thermodynamical stability of the interaction between two clusters at thermal equilibrium using classical molecular-dynamics (MD) and Monte Carlo (MC) simulations. The intercluster distance Z is fixed as a parameter in the microcanonical and canonical ensembles. We use and develop several techniques to calculate the fundamental quantities of interest in these ensembles, namely, the density of states Omega(E,Z) and the partition function Q(T,Z), yielding respectively, the microcanonical entropy S(E,Z) and the Helmholtz free energy F(T,Z). The multiple histogram method is used to estimate the variations of S with E and of F with T, both extracted from either constant energy MD or constant-temperature MC simulations. The thermodynamic perturbation and the displacement-vector methods are used to provide the variations of the free energy along the Z coordinate. These methods are applied to the interaction of Ar-13+Ar-13 and Na-8+Na-8 clusters. The Lennard-Jones (Ar-13)(2) cluster dimer has a locally mechanically stable structure at 2=8.6 Angstrom, which appears to remain thermodynamically stable until T similar or equal to 25 K. The temperature effects also stabilize two intermediate compact configurations, near Z=5 and 6.6 Angstrom. On the other hand, the interaction between Na-8+Na-8, modeled by a distance-dependent tight-binding Hamiltonian, does not exhibit a stable structure except in its compact shape Na-16. The entropic effects, favored by the thermal phenomena, do not occur to induce any thermodynamical local stability for a dimerized (Na-8)(2). Ln other terms, the stability of Na-16 does not seem to be governed by the underlying two Nas magic-number units.