Unchanged box size after using fix box/relax?

Cooling down a simulated thin film (partially filled box with periodic b.c in x,y) stresses it as it can only shrink in z direction.
Sought to cure that using: fix 100 all box/relax x 0.0 y 0.0 couple xy
That should allow x and y box sizes to relax to eliminate internal stress that builds up as the film is cooled.
However, an atom data file (from write_data) printed after cooling lists box dimensions as originally set — no change.
Am I missing something in either the box/relax or the write_data commands?
Help appreciated.

Are you using the box/relax in combination with energy minimisation? If not, its normal that the box dimensions dont change.

I alternately cool down and relax a box containing two particle populations - one of which is rigid.
Here is a sample:

#-- (1) cool
print         "*****************************************"
print         "Starting cool 1 from ${film_temp} to ${film_tmp1} "
print         "*****************************************"
fix           tmp_add addatoms nvt                        temp ${film_temp} ${film_tmp1} ${temp_damp}
fix           tmp_sub subatoms rigid/nvt group 1 subatoms temp ${film_temp} ${film_tmp1} ${temp_damp}

run           ${cyclesteps}

unfix         tmp_sub
unfix         tmp_add

#-- (1) relax
print         "*****************************************"
print         "Starting relax box 1 at T = ${film_tmp1} "
print         "*****************************************"
fix           tmp_add addatoms nvt                        temp ${film_tmp1} ${film_tmp1} ${temp_damp}
fix           tmp_sub subatoms rigid/nvt group 1 subatoms temp ${film_tmp1} ${film_tmp1} ${temp_damp}
fix 	      w_relax all      box/relax x 0.0 y 0.0 couple xy

run           ${cyclesteps}
write_data ${outatom_file}1 nofix pair ij

From the fix box/relax documentation (the first line!):

Description

Apply an external pressure or stress tensor to the simulation box during an energy minimization.

You are running an MD, so the command has no effect.

Instead you would need to use fix npt instead of fix nvt or use fix press/berendsen in addition to fix nvt to have the box adjusted during an MD run.

Thanks for the help