教授

Monte Carlo Pi using Xeon Phi

Hello,

I would like to port the following toy example to the Xeon Phi. Basically it's a Monte Carlo simulation for calculating pi using Intel TBB & MKL random generators in parallel. How would I need to rewrite the example so that the whole Monte-Carlo simulation is offloaded on the Xeon Phi and uses an optimal dynamically determined amount of TBB tasks?

#include "mkl_vsl.h"
#include "tbb/task_scheduler_init.h"
#include "tbb/task_group.h"
#include "tbb/tick_count.h"

Problem with use pragma

Hi there, 

I have a question. I wrote code, but it generate runtime error.

 class A {
public:
 float *x;
 A() {
 x = (float*)malloc(100 * sizeof(float));
 int i;
 for (i = 0; i < 100; i++) {
 x[i] = i + 100;
 }
printf("x[0] %.3fn", x[0]);
 }
 void fA() { 
 #pragma offload target(mic:0) 
 in(x[0:10] : REUSE) 
 {
 x[0] = -1;
 }
 }
 ~A() {
 #pragma offload target (mic:0) 
 out(x : length(100) FREE)
 {
 }
 printf("x[0] %.3fn", x[0]);
 free(x);
 }
};
int main( ) {
A a;
a.fA();
}

Compiling for Phi in the 'Configure' command

Hi,

I'm new to working with Xeon Phi.

I'm trying to build a certain library written in C , with Intel C compiler on Linux (CentOS), 

and I intend to run it on the Phi.

The thing is, I usually build this library with 'configure' and 'make' commands

and with gcc, and now I have to build it with Intel C and with MIC support.

Now , I realize that the -mmic flag is available when compiling directly with icpc/ifort ,

but when I run 'configure' for my library :

"./configure --with-cc=icc ... "

offload region is not bitwise copyable

Hi,

I have two structure defined as - 

typedef struct VECTOR_o {
int x;
int z;
} VECTOR_o;

typedef struct SHOT_INFO_o {
int **recvs;
VECTOR_o shot_location;
VECTOR_o first_receiver;
float *offset;
} SHOT_INFO_o;

A variable of SHOT_INFO_o *shot.

All required memory for shot and shot.recvs has been assigned. I want to send this structure to MIC, i am using "in" directive but it is saying  "variable "shot" used in this offload region is not bitwise copyable" while compiling.

New user in MIC cluster

Hello,

We have a small MIC cluster and we are trying to add a new user to the system without rebooting the mpss service, is it possible? I have done all the steps needed but the user is not able to log in, here is what I do:

host# mkdir -p /home/user
host# sudo -u username ssh-keygen -P ""
host# cat /home/user/.ssh/id_rsa.pub > /home/user/.ssh/authorized_keys
host# chown -R uid.gid /home/user

$PASSWD <- user's /etc/passwd entry in the host
$SHADOW <- user's /etc/shadow entry in the host

Running my first program on Xeon Phi

Hi,

I'm trying to set up my Xeon Phi for the first time,

After seeing that it's actually online using 'service mpss status',

I've copied a 'hello world' F90 program written in Intel Fortran into the Xeon Phi using scp,

and when trying to execute it (after loging in using 'ssh mic0') , I got the error :

/bin/hello_exec: line 1: syntax error: unexpected ")"

What am I missing here? do I have to install Intel Fortran Compiler on the Xeon Phi itself ,

just in order to run a program on it (which was already compiled) ?

Thanks,

Run multiple uOSs on MIC simultaneously

Hello,

           I wonder if I can run multiple uOSs on MIC simutaneously, and each uOS runs on one or more cores of MIC?

          Can I do somethings like allocating some cores of MIC to a uOS instance, and then sending an IPI to the core to load the uOS image?

           So, I want to know if there is a solution for multi-uOS running on MIC? 

          Any help will be appreciated.  Thank you very much!

zenco

Adding vectors with MIC

Hello,

Is the following code sample for adding vectors correct? Can I make it even faster using vectorized operations?

void vectorAdd(float*a, float*b, float* r,int size)
{

   #pragma offload target(mic) in(a:length(size)) in(b:length(size)) inout(r:length(size)) 
   #pragmaopenmp parallel for shared(a,b,r) private(i)
   for(inti=0; i<size; ++i)
   {

      r[i] = a[i]+b[i];

   }

}

OpenCL error

I'm porting an OpenCL application to run on Xeon Phi.  I've encountered what I'm pretty sure is a bug in the compiler or runtime.  With some work, I've narrowed it down to the following minimal test case.  To observe the problem, just launch testKernel() using a single workgroup of 64 work units.  It repeatedly prints out

1 <= 0????

订阅 教授