I am attempting to use mpitune for application specific tuning. It works fine using the total runtime, but I cannot get it to work using the -ar regexp option, which if I understood correctly should take a number from the screen output of my code to optimise on, instead of the total runtime. I am only interested in optimising the main loop, because the code has many initialisations using MPI which are not relevant to the optimisation.
My code outputs a timing to the screen output which inlucdes a line that looks like the following:
"(main loop time): 2.00497388839722"
I run mpitune with any of the following
mpitune -avd min -ar \"main loop time\):[ ]*[0-9]*.[0-9]*" --application \"mpirun -n 32 ./myapp.x\" -of ./dum.conf
mpitune -trf outfile -avd min -ar \"main loop time\):[ ]*[0-9]*.[0-9]*" --application \"mpirun -n 32 ./myapp.x\" -of ./dum.conf
mpitune -trf out -avd min -ar \"main loop time\):\s*\d.\d\" --application \"mpirun -n 32 ./myapp.x\" -of ./dum.conf
Nothing matches, and I always get the message (aside: the English of these outputs and the help page could certainly be cleaned up):
"No value from output of the application was obtained. Please check output of the application and passed regular expression. Comparation mode by execution time is used now."
All of the following match with grep but not inside mpitune:
grep "main loop time):[ ]*[0-9]*.[0-9]*" outfile
grep -E "main loop time\):[ ]*[0-9]*.[0-9]*" outfile
grep -P "main loop time\):\s*\d.\d" outfile
Any ideas what I am doing wrong ? Apologies for what is probably a stupid reg-exp question, but the documentation is not very clear what is happening here. Should I be using BRE or ERE or perl or what ? If it is relevant, I am using the bash shell, which means one has to escape the brackets. But I also tried removing the brackets althogether from the output, and I still can't get it to work.
Any help greatly appreciated: Thanks in advance.