[erlang-questions] Erlang on Xeon Phi

Jasiek Stypka jasiek.stypka@REDACTED
Tue Sep 15 22:06:38 CEST 2015


Hello everyone,

Does anybody have any experience with running Erlang programs on Intel Xeon Phi coprocessor? I would like to carry out some experiments on this platform concerning multicore computing, however I am struggling to run Erlang VM on that architecture.

It seems to be binary incompatible with x86_64 architectures. When I try to run the normal Erlang VM v17.3 on it, I get:
/home/me/lib/erlang/bin/erl: line 28: /home/me/lib/erlang/erts-6.1/bin/erlexec: cannot execute binary file
/home/me/lib/erlang/bin/erl: line 28: /home/me/lib/erlang/erts-6.1/bin/erlexec: Success

So I figured out that I need to use cross compilation to compile the VM specially for this architecture. After some reading and numerous trials and errors, I ended up compiling the EVM with these commands:

$ ./configure --host=k1om-unknown-linux-gnu --build=x86_64-pc-linux-gnu --without-termcap --prefix=$HOME/lib/my_erlang_compilation-17.3 CC=icc CFLAGS=-mmic
$ make

The first command somehow finishes without any errors, but when running `make` I finally get:

/tmp/iccvaLP3vas_.s: Assembler messages:
/tmp/iccvaLP3vas_.s:25794: Error: `mfence' is not supported on `k1om'
/tmp/iccvaLP3vas_.s:25800: Error: `mfence' is not supported on `k1om'
/tmp/iccvaLP3vas_.s:26388: Error: `mfence' is not supported on `k1om'
/tmp/iccvaLP3vas_.s:26394: Error: `mfence' is not supported on `k1om'
make[3]: *** [obj/k1om-unknown-linux-gnu/opt/smp/erl_alloc_util.o] Error 1

This seem to be connected with memory barrier instructions and looks like it's incompatible. Does this mean that the Erlang VM cannot be run on this architecture?

Thanks in advance for any suggestions,
Jan Stypka





More information about the erlang-questions mailing list