Can use NUMBER_OF_PROCESSORS intrinsic in initialisation expressions for portability,
!HPF$ PROCESSORS P1(NUMBER_OF_PROCESSORS()) !HPF$ PROCESSORS P2(4,4,NUMBER_OF_PROCESSORS()/16) !HPF$ PROCESSORS P3(0:NUMBER_OF_PROCESSORS(1)-1, & !HPF$ 0:NUMBER_OF_PROCESSORS(2)-1)
NUMBER_OF_PROCESSORS returns information about physical processors.
Can obtain physical shape using PROCESSORS_SHAPE intrinsic, for example,
PRINT*, PROCESSORS_SHAPE()
on a 2048 processor hypercube gives
2 2 2 2 2 2 2 2 2 2 2
For more information, click here