Software Archive
Read-only legacy content
17061 Discussions

Using micnativeloadex, how to use args ?

Jeremie_Lagraviere
734 Views

Hi,

I am a very beginner with the Intel Phi, and I am trying to do something that is maybe not possible.

I have this binary file called upcDemo

And I run it this way: upcrun -n 12 upcDemo 

(This will run the program on 12 threads)

I have tried many syntax with micnativeloadex...but I got errors, here is what I tried:

$ micnativeloadex upcc -a "-n 12 upcDemo"
Either the supplied binary isn't a regular file, or its size is zero.
$ micnativeloadex upcc -a "-n 12 ./upcDemo"
Either the supplied binary isn't a regular file, or its size is zero.

 

Note: it is possible that the problem is in the binary file...

Is it the correct syntax ? For info, upcrun, is just like mpirun: it is a program you call to run your program.

Thanks in advance for your help.

0 Kudos
3 Replies
JJK
New Contributor III
734 Views

you're not explaining what "upcc" does ;)

As for arguments, you seem to have the commandline correct, but I am not sure how the mic programm "upcc" would find the program "upcDemo": when you run a program using micnativeloadx it is copied over to a temporary location. A small test program provides more insight:

#include <stdio.h>

int main(int argc, char **argv)
{
	int i;

    printf("arguments = ");
    for (i=0; i<argc; i++) printf("%s ", argv);
    printf("\n");

    return 0;
}

compile it on the host , then run it on the Phi using micnativeloadx:

$ icc -mmic -o args args.c

$ micnativeloadex ./args -a "-n 12 foo bar"
arguments = /tmp/coi_procs/1/5390/args -n 12 foo bar 

Perhaps you can specify an absolute path for the upcDemo program

 

0 Kudos
Frances_R_Intel
Employee
734 Views

The program you are running is in UPC? If I understand what you are saying, you have a demo program in UPC that has been compiled elsewhere and you want to run it on the coprocessor.

In this case, the executable you have would not be a valid executable for the coprocessor. The Intel Xeon processor and the Intel Xeon Phi coprocessor are not binary compatible. You would need a version of the UPC compiler compiled especially for the coprocessor - either a cross compiler that runs on the host or a compiler than runs natively on the coprocessor. Alternately you could use a preprocessor that will turn the UPC code into C code.

Am I right in my understanding or am I completely lost?

 

0 Kudos
Jeremie_Lagraviere
734 Views

Yep you are totally right :)

I have a Intel Phi compatible version of the UPC Compiler from Berkeley.

However it requires some tuning to have it working on the Intel Phi...In other words, so far, I have very limited results with UPC over Intel Phi.

0 Kudos
Reply