The Omni Compiler, primarily a Japanese effort, was recently updated on GitHub, so I decided to try it on Windows Subysystem for Linux.
What is Omni Compiler ?
Omni Compiler is a compiler for code including XcalableMP, XcalableACC, and OpenACC directives. The base languages supported by Omni Compiler are C language (C99) and Fortran 2008 in XcalableMP, and C language (C99) in XcalableACC and OpenACC.
Omni Compiler is one of source-to-source compilers that translate from code including directives to code including runtime calls. In Omni Compiler, XcodeML is used to analyze code in an intermediate code format of XML expression.
My installation advice for the Omni Compiler on WSL, based on a few failed attempts, is
If java not installed, run sudo apt install default-jre
.
If javac not installed, run sudo apt install default-jdk
.
To avoid an error about a missing parser.h file, run sudo apt-get install libxml2-dev libxml2-doc
(I found this advice at linux - Compiler can't find libxml/parser.h - Stack Overflow)
Then the installation instructions at GitHub worked for me.
I know little about parallel programming. Is the purpose of this compiler to run multiple instances of a program in parallel? I can see the use of that for a Monte Carlo program but not a deterministic one, since the instances should give the same result.
Running the xnegloglik program from another thread, with n = 1000000, niter = 100
I get the folllowing timings. Shown first are the timings with gfortran -O2. The last gives results from 4 different instances, with different random numbers used.
$ time ./gf.out
real 0m4.005s
user 0m4.003s
sys 0m0.000s
$ time mpirun -np 1 ./a.out
real 0m4.323s
user 0m4.044s
sys 0m0.036s
$ time mpirun -np 4 ./a.out
real 0m5.002s
user 0m18.724s
sys 0m0.101s