Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statically linked Intel binary crashes on WSL #1373

Closed
Oeffner opened this issue Nov 16, 2016 · 6 comments
Closed

Statically linked Intel binary crashes on WSL #1373

Oeffner opened this issue Nov 16, 2016 · 6 comments
Assignees

Comments

@Oeffner
Copy link

Oeffner commented Nov 16, 2016

A statically linked program using OpenMP and built with Intel's C++ compiler on a native Linux system crashes on WSL. If the same source is compiled with g++ it runs fine.

I installed a version of "Intel Parallel Studio XE 2017 Update 1" on a native Ubuntu 14 Linux PC. This PC already has the GNU compilers installed. On that PC I compile the source file OpenMPtest.cpp both with the Intel compiler and with the GNU compiler using the following command lines:

g++ -fopenmp -static -g -O3 OpenMPtest.cpp -oOpenMPtest.gnu.X

and

 
icpc -qopenmp -fast -static -debug all OpenMPtest.cpp -oOpenMPtest.intel.X

Both of the executables, OpenMPtest.gnu.X and OpenMPtest.intel.X run fine on a native Linux PC.
When these binaries are copied to the Windows 10 PC and executed under WSL only the OpenMPtest.gnu.X binary runs fine. The OpenMPtest.intel.X binary crashes (after accepting stdin) with the following output:

root@PAULI:~/LinuxTest/TestBuildTools/testIntel/OpenMPtest# ./OpenMPtest.intel.X
Enter number of OpenMP threads to use for this calculation: 4
This program is the slow Pi calculator, a small OpenMP test for your system.
OMP: Error #100: Fatal system error detected.
OMP: System error #22: Invalid argument
Aborted (core dumped)
root@PAULI:~/LinuxTest/TestBuildTools/testIntel/OpenMPtest#

My Windows build number is:
Windows 10 version 1607, OS build 14393.447

To reproduce the crash install Intel Parallel Studio XE 2017 Update 1 on a native Ubuntu 14 Linux PC ( I haven't tested other flavours of Linux). Then build the source file, OpenMPtest.cpp, with the command lines as above. Then copy the binaries to the Windows 10 PC and run them from the Bash shell.

OpenMPtest.zip contains the source code together with the two binaries from building with Intel and gnu compilers.

Fixing this bug would be quite a milestone for making Windows 10 with WSL a serious alternative to a native Linux PC.

@fpqc
Copy link

fpqc commented Nov 16, 2016

Please rerun your program with

strace -ff ./OpenMPtest.intel.X &> ~\stracelog.txt

and upload the strace to github by dragging (github requires an extension of .txt to drag for some reason).

This will show which, if any, syscalls, sockopts, or other kernel features are not implemented.

@Oeffner
Copy link
Author

Oeffner commented Nov 16, 2016

Right, here is the tracelog:
tracelog.txt

@stehufntdev
Copy link
Collaborator

Looks like the failure is coming from sched_getaffinity:

sched_getaffinity(0, 4, 0x7f599c0d7d80) = -1 EINVAL (Invalid argument) write(2, "OMP: Error #100: Fatal system er"..., 86OMP: Error #100: Fatal system error detected.

@misenesi, can you check if this is fixed by the recent sched affinity improvements?

!

@misenesi
Copy link

@Oeffner, I have successfully run both intel and gnu versions from your zip file on the latest build. Marking as closed.

@Oeffner
Copy link
Author

Oeffner commented Nov 28, 2016

That is very good news. Any idea of when this insiderbuild will come out as a Windows update?

@benhillis
Copy link
Member

@Oeffner - Updates will come in the next release of Windows, which is slated for early 2017.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants