Hello all!
Just finished getting caf ParallelHello.f90 to run using cafrun -n 50 ./a.out which took me 10hrs from start to finish. Most of that time was googling garbage which had nothing to do with the issues. What was really required can be summed up as this;
Install Windows Subsystem for Linux with the command;
wsl --install
Find the wsl in your start menu and run the Out Of Box Experience setting up your user and password.
Find and run the new Ubuntu app in your start menu. You now have a bash prompt.
This does not come with anything, but pretends that it does. So now you need;
vcxsrv-64.1.20.9.0.installer # for an x-windows environment
To get into the x-windows environment you type;
startxfce4
and then double click the xserver icon on your desktop. The first time through I suggest you chose one large window, leave the -1, start no client, disable access control, and save this config as a desktop icon. You could remove the other icon, or leave it. This now gives you a desktop to hammer away from.
If you get no fun, add this to the end of your .bashrc file like I had to;
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/n\
ull):0
export LIBGL_ALWAYS_INDIRECT=1
This didn't help me much as I like command line but you might like the pretty pictures.
To continue, you need to update and upgrade the current environment;
sudo apt-get update
sudo apt-get upgrade
Now comes the part that should be unelephant;
sudo apt-get gcc
sudo apt-get make
sudo apt-get make-esentials
sudo apt-get cmake
sudo apt-get bison
sudo apt-get flex
sudo apt-get m4
sudo apt-get (missing something here, watch further down for more)
I also wanted my usual text editor;
sudo apt-get emacs
Which works, but only with either the x-windows loaded or with emacs -nw.
At this point you can download the latest OpenCoarrays tar ball from;
Open the tarball with;
tar -zxf OpenCoarrays....tar.gz # Your version numbers may be different.
And now start the make with;
cd OpenCoarrays...
./install.sh
There is no warning that something is wrong! It just dumps back to bash with no blatant warning or help text. You will have to hope that all the apt-get commands previous will work. It SHOULD try to rebuild everything you just apt-get got, and after 40mins on an i7 I finally got an actual "you should do this one last thing" message. So add this next line to the end of your .bashrc file;
source /home/YOURNAMEHERE/OpenCoarrays-2.9.2/prerequisites/installations//opencoarrays/2.9.2/setup.sh
From there emacs -nw ParallelHello.f90
and copy this test;
PROGRAM helloWorld
implicit none
integer :: i_loop[*]
i_loop = this_image()
print *, "hello, world! I am ", i_loop, "!"
END PROGRAM helloWorld
Now test compile and run with;
caf ParallelHello.f90
cafrun -n 50 ./a.out
You should get a bunch of badly formatted text with a bunch of numbers. Congratulations!
Hope that helps someone else!
Frank / Knarfnarf