This is an archive of the discontinued LLVM Phabricator instance.

[zorg] Refactor Libiomp5Builder to OpenMPBuilder
ClosedPublic

Authored by Hahnfeld on Oct 18 2017, 2:18 PM.

Details

Summary

Background: We also want to test libomptarget which is the runtime
library for OpenMP offloading and part of the OpenMP repository.

This patch does the following:

  • Rename builders from libomp-* to openmp-*.
  • Rename Libiomp5Builder to OpenMPBuilder and the function getLibompCMakeBuildFactory to getOpenMPCMakeBuildFactory.
  • Cleanup, properly indent function and add support for building and testing libomptarget.
  • Build fresh Clang on openmp-clang-ppc64le-linux-debian so that the libomptarget tests have a chance of passing.

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld created this revision.Oct 18 2017, 2:18 PM
gkistanova requested changes to this revision.Oct 26 2017, 8:55 AM

Hi Jonas,

The patch looks Ok, with a small issue to address before committing.

buildbot/osuosl/master/config/builders.py
1179 ↗(On Diff #119523)

This change is not relevant to this patch, is it?

zorg/buildbot/builders/OpenMPBuilder.py
18 ↗(On Diff #119523)

Please do not use mutable default arguments. The usual pattern to default to None and then handle it accordingly.
See http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments for more details.

This revision now requires changes to proceed.Oct 26 2017, 8:55 AM
Hahnfeld updated this revision to Diff 120435.Oct 26 2017, 9:09 AM
Hahnfeld edited edge metadata.
Hahnfeld marked 2 inline comments as done.

Avoid mutable default argument.

buildbot/osuosl/master/config/builders.py
1179 ↗(On Diff #119523)

I think my editor removed a trailing whitespace. I can put it back in if you prefer...

zorg/buildbot/builders/OpenMPBuilder.py
18 ↗(On Diff #119523)

I think it would be fine here because we don't change env but merge it into merged_env. Nevertheless I agree that we should avoid problems even before they can happen.

I copied this one from getLLVMCMakeFactory, so I'll change that in a follow-up commit if you agree.

gkistanova accepted this revision.Oct 26 2017, 9:27 AM

Let's keep only the changes relevant to this patch. Feel free to make a separate cosmetic NFC patch if you'd like.
Please feel free to commit, assuming you would roll that leading whitespace back.

This revision is now accepted and ready to land.Oct 26 2017, 9:27 AM
This revision was automatically updated to reflect the committed changes.

Let's keep only the changes relevant to this patch. Feel free to make a separate cosmetic NFC patch if you'd like.
Please feel free to commit, assuming you would roll that leading whitespace back.

I've committed this patch and two small follow-ups. Can you give me a ping once you restarted the master to pick up the new configuration?

Hahnfeld added inline comments.Oct 28 2017, 4:42 AM
zorg/trunk/zorg/buildbot/builders/OpenMPBuilder.py
142

Looks like this doesn't work for ninja, we have to pass it to CMake. I'm on travel this weekend, will submit a patch next week...

Hahnfeld marked an inline comment as done.Oct 30 2017, 6:47 AM

Could you kindly reconfigure the master to pick up the change?

Thanks
Jonas

zorg/trunk/zorg/buildbot/builders/OpenMPBuilder.py
142

I just committed rL316901 that should fix the problem.

Hahnfeld marked an inline comment as done.Nov 3 2017, 6:13 AM

@gkistanova Could you reconfigure the master so that rL316901 becomes active?

zorg/trunk/buildbot/osuosl/master/config/builders.py