A three-dimensional numerical study using vorticity-vector potential formulations based on the finite-volume method has been performed to investigate double-diffusive convection in a stack of cubic enclosures submitted to horizontal gradients of temperature and concentration. The flow is driven by conditions of constant temperature and concentration imposed along the two vertical side walls of each cubic enclosure, while the horizontal walls are diffusive in heat and mass. This numerical study is conducted for fixed Prandtl, Rayleigh, and Lewis numbers, Pr ¼ 10, Ra ¼ 10 5 and Le ¼ 10, buoyancy ratio N in the range [À2, 0], and for a range of heat and mass transfer diffusion coefficients. The results show that the effect of heat and mass diffusive walls differs between the case of thermally dominated flow and the compositionally dominated one. For thermally dominated flow, considering heat and mass diffusive walls results in a change from a structure with one inner core to a multicore structure and reduces the transverse velocity. On the other hand, for solutally dominated flow, an ''inverse transition'' from a multicell pattern to a unicellular one occurs, and the transverse velocity increases considerably.