Hello!
Might I suggest that you move to Open Co-Arrays! It installs just as easy but the compile and run were easier for me:
CAF task.f90
CAFRUN -n 8 a.out
Not a lot of funny business in those calls!
Edit: also you don’t have to call anything specific to get it to compile but you get the thread number functions and synchronization calls for free.
this_image()
num_images()
sync all
Knarfnarf