Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

[LibOS/regression] Add OpenMP simple for-loop test #749

Merged
merged 1 commit into from
Jul 1, 2019

Conversation

dimakuv
Copy link

@dimakuv dimakuv commented Jun 13, 2019

Affected components

  • README and global configuration
  • Linux PAL
  • SGX PAL
  • FreeBSD PAL
  • Common PAL code
  • Library OS (i.e., SHIM), including GLIBC

Description of the changes

Previously, OpenMP apps failed to run under Graphene-SGX because it did
not support raw system calls (used inside of OpenMP lib, in particular
the futex() syscall). Since recently, Graphene-SGX has support for raw
syscall execution. This commit adds a test showing that OpenMP works.

Fixes #567.

How to test this PR?

This PR adds LibOS regression test openmp.


This change is Reviewable

Copy link
Contributor

@chiache chiache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @dimakuv)

a discussion (no related file):
Should this be in the app directory?


Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @chiache)

a discussion (no related file):

Previously, chiache (Chia-Che Tsai) wrote…

Should this be in the app directory?

I find it useful to have a simple OpenMP test (indirect test of threading, raw syscalls, and whatever OpenMP uses underneath). But I would be also fine with moving it to apps. Let's see if anyone else has an opinion on this.


Copy link
Contributor

@donporter donporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @chiache and @dimakuv)

a discussion (no related file):

Previously, dimakuv (Dmitrii Kuvaiskii) wrote…

I find it useful to have a simple OpenMP test (indirect test of threading, raw syscalls, and whatever OpenMP uses underneath). But I would be also fine with moving it to apps. Let's see if anyone else has an opinion on this.

For a simple test, I'm ok with it being in regression.



LibOS/shim/test/regression/00_openmp.py, line 4 at r1 (raw file):

from regression import Regression

loader = sys.argv[1]

Does this actually work on Linux, or just issue host system calls it shouldn't?

If this only goes through graphene on SGX, I might add something to the regression script to only run on sgx.

Perhaps better to hoist this check for sgx up to the makefile?

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @donporter)


LibOS/shim/test/regression/00_openmp.py, line 4 at r1 (raw file):

Previously, donporter (Don Porter) wrote…

Does this actually work on Linux, or just issue host system calls it shouldn't?

If this only goes through graphene on SGX, I might add something to the regression script to only run on sgx.

Perhaps better to hoist this check for sgx up to the makefile?

Done. It works on Linux by issuing a host syscall (i.e., bypassing LibOS). Since we don't install a seccomp, this raw syscall works. I agree that this the scope of this test is Linux-SGX, so I added this limitation.

It turned out to be hard/confusing to add this check to the Makefile so I put it in the Python script.

@dimakuv
Copy link
Author

dimakuv commented Jun 13, 2019

Retest Jenkins please

donporter
donporter previously approved these changes Jun 14, 2019
Copy link
Contributor

@donporter donporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (1 more required)

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 5 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dimakuv)


Jenkinsfiles/ubuntu-16.04.dockerfile, line 24 at r2 (raw file):

       texinfo \
       wget \
       libomp-dev \

Please remove the last \


LibOS/shim/test/regression/Makefile, line 46 at r2 (raw file):

openmp: %: %.c
	@echo [ $@ ]

This collides with changes from #732, whichever PR will get merged later will need to be fixed up.


LibOS/shim/test/regression/openmp.manifest.template, line 21 at r2 (raw file):

net.rules.1 = 127.0.0.1:8000:0.0.0.0:0-65535
# allow to connect to port 8000
net.rules.2 = 0.0.0.0:0-65535:127.0.0.1:8000

Leftovers from some other manifest?

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 5 files reviewed, 3 unresolved discussions, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @donporter and @mkow)


Jenkinsfiles/ubuntu-16.04.dockerfile, line 24 at r2 (raw file):

Previously, mkow (Michał Kowalczyk) wrote…

Please remove the last \

Done.


LibOS/shim/test/regression/Makefile, line 46 at r2 (raw file):

Previously, mkow (Michał Kowalczyk) wrote…

This collides with changes from #732, whichever PR will get merged later will need to be fixed up.

Done.


LibOS/shim/test/regression/openmp.manifest.template, line 21 at r2 (raw file):

Previously, mkow (Michał Kowalczyk) wrote…

Leftovers from some other manifest?

Done.

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 4 of 5 files reviewed, 3 unresolved discussions, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @donporter and @mkow)


Jenkinsfiles/ubuntu-16.04.dockerfile, line 24 at r2 (raw file):

Previously, dimakuv (Dmitrii Kuvaiskii) wrote…

Done.

Actually, removing \ was wrong (Jenkins builds failed). The issue is that the next line && groupadd ... is actually a continuation of this huge command. So \ was important.

donporter
donporter previously approved these changes Jun 19, 2019
Copy link
Contributor

@donporter donporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @mkow)

@dimakuv
Copy link
Author

dimakuv commented Jun 19, 2019

Retest Jenkins-SGX please

mkow
mkow previously approved these changes Jun 26, 2019
Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@mkow
Copy link
Member

mkow commented Jun 26, 2019

Retest Jenkins-SGX please

Previously, OpenMP apps failed to run under Graphene-SGX because it did
not support raw system calls (used inside of OpenMP lib, in particular
the futex() syscall). Since recently, Graphene-SGX has support for raw
syscall execution. This commit adds a test showing that OpenMP works.
@mkow mkow dismissed stale reviews from donporter and themself via 84ec50a June 30, 2019 21:39
mkow
mkow previously approved these changes Jun 30, 2019
Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@dimakuv
Copy link
Author

dimakuv commented Jul 1, 2019

Retest Jenkins-SGX please (trying to hit a bug/timeout on OpenMP test)

1 similar comment
@dimakuv
Copy link
Author

dimakuv commented Jul 1, 2019

Retest Jenkins-SGX please (trying to hit a bug/timeout on OpenMP test)

@dimakuv
Copy link
Author

dimakuv commented Jul 1, 2019

Retest Jenkins-Debug please

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@mkow mkow merged commit 84ec50a into master Jul 1, 2019
@mkow mkow deleted the dimakuv/openmp-test branch July 1, 2019 11:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenMP apps are not supported because libgomp.so executes a raw syscall instruction
4 participants