fix HierarchicalMNS for CUDA with iccifort, push comp_versions definition out of for loop

Visual review looks good.
I add @georgets also in the loop, who started working on CUDA and certainly will walk this path;
if I may ask, which application perhaps motivated this PR? (is it GROMACS, is it something else?)