Quoted from PaulLaidler
On the face of it, it is possible that one could use FTN95 with Open MPI. If anyone has tried then please report back on your experience.
If someone has spare time they can play with MPI initially with Intel and Gfortran and then try if FTN95 will also work.
Here is an example where anyone can easily learn the major things of MPI. Just one example and you will already in the theme. (By the way i learned Clearwin and OpenGL on Salford Examples only. Just the few examples and you are mostly done without reading any boring manuals. The Clearwin and OpenGL examples are still supplied with the compiler by the different name and unfortunately in the inconvenient place)
PROGRAM hello_world_mpi
include 'mpif.h'
integer process_Rank, size_Of_Cluster, ierror, tag
call MPI_INIT(ierror)
call MPI_COMM_SIZE(MPI_COMM_WORLD, size_Of_Cluster, ierror)
call MPI_COMM_RANK(MPI_COMM_WORLD, process_Rank, ierror)
print *, 'Hello World from process: ', process_Rank, 'of ', size_Of_Cluster
call MPI_FINALIZE(ierror)
END PROGRAM
Now the code is complete and ready to be compiled. Because this is an MPI program, we have to use a specialized compiler. The compilation command will be one of the following:
GNU Fortran Compiler
mpif90 hello_world_mpi.f90 -o hello_world_mpi.exe
Intel Fortran Compiler
mpiifort hello_world_mpi.f90 -o hello_world_mpi.exe
This will produce an executable we can pass to as a batch job in special queue for many users waiting their timeshare or execute MPI compiled code from your keyboard. In both case a special command must be used:
mpirun -np 4 ./hello_world_mpi.exe
The flag -np specifies the number of processor that are to be utilized in execution of the program (that command was for Linux obviously, they all start run by that dumb way: ./a.exe )
Our output file should look something like this (note the order of ranks isn’t necessarily sequential):
Hello World from process 3 of 4
Hello World from process 2 of 4
Hello World from process 1 of 4
Hello World from process 0 of 4
That is already 90% of what most of people will need because it shows how it works. One more such example in ref below and it will be 99%. See Reference on this text https://curc.readthedocs.io/en/latest/programming/MPI-Fortran.html#setup-and-hello-world
In the source code example above I do not immediately know how to supply mpif.h for FTN95 to become MPI capable, this is probably for more experienced guys than me.
And to install Linux i recommend VirtualBox. This way you will run Linux simultaneously with Windows, Linux will be just one more window on your screen, they will communicate with each other, commonly use files, queues, clipboard etc. Super cool and easy like 2+2. See great Youtube video by ProgrammingKnowledge 'How to install Ubuntu 22.04 LTS on VirtualBox in Windows 11' (works with Windows 10 too, like it is in my case). You will need to allow virtualization in BIOS if installation of VirtualBox fail. Thanks to Youtube the never user-friendly Linux because very useful and convenient. And in some cases even more user-friendly than Windows. For example if you try to compile and there is no compiler or some other program needed, it will ask you if you like that it will install it for you.