Visual C/C++ OpenMP

Hello!

Visual C/C++ compiler team in Microsoft (see Cc list) is working on updating our support for OpenMP.

Currently Visual C/C++ compiler supports OpenMP standard 2.0, with some exclusions. We started the work to support the newer standards.

As the first step we took LLVM OpenMP runtime library (libomp) and switched the Visual C/C++ compiler to generate code for OpenMP 2.0 for libomp, currently only for x64. The feature is in ‘experimental’ (or ‘beta’) state; should be available in the next release, Visual Studio version 16.9 preview 3, early next year. It’ll be available under a separate switch (-openmp:llvm), so people can try it out.

With this update we’ve fixed a nasty bug for shared variables (was present in Visual C/C++ compiler) and added unsigned induction variables for for loops (was not supported previously). We’ve also added some initial limited support for tasks; that one is under additional -openmp:experimental switch (not ‘beta’ quality yet, and only a minimal set of clauses is supported). There will be a more detailed announcement at the time of the release.

As it’s beta, we don’t have yet full quality assessment. Our internal compiler tests passed, libomp runtime tests show that we don’t have a lot of features yet (which is expected), and there are some issues with tasks which we still need to look at. We plan to try https://www.epcc.ed.ac.uk/research/computing/performance-characterisation-and-benchmarking/epcc-openmp-micro-benchmark-suiterun next. I am doing performance measurements now.

We’ve done several changes to libomp (additional functions), and if the performance will be good, we’d like to upstream the changes.

Natalia Glagoleva, MSVC

This sounds exciting. Do you also plan to support OpenMP offloading,
as an alternative to C++AMP?

The OpenMP contributors have a weekly phone call where implementation
questions are discussed. You might be interested to join. Details at
https://docs.google.com/document/d/1Tz8WFN13n7yJ-SCE0Qjqf9LmjGUw0dWO9Ts1ss4YOdg/edit?usp=sharing

Michael

Do you also plan to support OpenMP offloading, as an alternative to C++AMP?

Yes. Given the current state It'll take time though.

Thank you for invitation, we'll start attending - but I am not sure yet how that will work. You are way ahead, discussing 4.5 & 5.1 features - and we are finishing with 2.0 and starting to look at 3.1.

Natalia