Segmentation fault after changing the number of threads

GROMACS version: Gromacs 2020.4
GROMACS modification: No
I was running my NPT simulation of DNA and nanotube in explicit water using CHARMM FF and PME to account for electrostatics.
My workstation has 32 logical Intel Xenon CPU @ 2.6GHz (No GPU); 64bit Linux ubuntu 20.04.2 LTS.
All was going well before I decided to free up some cores by changing the number of threads (-nt 16). After that my system only runs with 16 cpu and I cannot resume the simulation with 32 OpenMP threads as I was using before.
The following message comes up if I want to use any values of -nt greater than 16:
“step 16492159: One or more water molecules can not be settled.
Check for bad contacts and/or reduce the timestep if appropriate.
[…] Segmentation fault (core dumped)”
Any ideas as to how I can fix this?

Update: I have to use option -ntomp 32 not -nt 32;
Omission of -ntomp 32 results in the same error, although GMX detects 32 OpenMP threads automatically.
I was having this issue for several days and literally fixed this right after this post.