We are building up a Xeon Phi system with a second hand 31S1P card for testing the advantage it may have on running our simulation software.
Our code is currently a linux C++ program which takes advantage of any number of threads and vectorizes with AVX quite well. So it is a good candidate. Currently the program works as a TCP server and is remotely sent the tasks by a master client (which runs on windows or linux with a GUI).
1) The TCP server code is currently using Qt as the cross platform network API. Is it feasible to compile Qt for the phi? (Core lib only, not the GUI part of course). Did someone manage to do this?
2) If not, what is the most convenient available network API that can be used when compiling for the phi?
3) Is it possible to mount a network drive inside the phi OS? For example to mount a folder shared in NFS or SMB by the host.
If 1) and 3) were feasible, we would have very little work to port our code on the phi I guess.
The OS on the card is Linux. (ssh into it and see...). Mounting an NFS file system should therefore be trivial.
As to building QT, how easy that is will likely depend on how convoluted the build system is. You need to compile all the libraries you need with icc and -mmic to generate K10M object files and shared libraries and you'll be doing that as a cross compilation. That may be painful if the build system doesn't grok how to handle cross-compilation, and insists on running local processes to find out about the system...
Since it is Linux, you can likely answer your own question about other network APIs.
Well, this depends on the options enabled in the linux kernel. So basically, this is a fully featured linux kernel with NFS, and BSD sockets libraries? Any cross-compiled command-line linux application using only STL and BSD sockets will work, then?
If this is a full-featured linux, why isn't it possible to compile on the phi for avoiding cross compilation?
the KNC Xeon Phi kernel is indeed a full-featured Linux 2.6.38 kernel, including BSD sockets. I mount NFS volumes inside the Phi regularly, although TCP/IP (and thus NFS) performance isn't stellar.
As for the need to cross-compile: the host machine is much better at compilation tasks. The KNC (and KNL for that matter) have much lower clockspeeds and are not designed for non-floatingpoint tasks such as compling and linking stuff. On top of that, there is only limited support in gcc for generating KNC code (which is not binary compatible with Intel x86_64). Thus, you'll have to resort to compiling your code using a compiler on the host, such as icc or a patched version of gcc (v6+, IIRC).