This should be fine assuming you don't mind the mismatch in CPU speeds. Unless the codes are super sensitive to topology things should be okay as modern IB is wicked fast.
In our environment here we have a variety of different hardware types all networked together on the same IB fabric. That said we create partitions for different hardware types and we don't have a queue that schedules across both, though we do have a backfill serial queue that underlies everything. All of that though is scheduled via a single scheduler with a single topology.conf governing it all. We also have all our internode IP comms going over our IB fabric and it works fine.
-Paul Edmon-
#SBATCH --partition rack1,rack2