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

OpenMp performs slower on Hikey960 #7

Open
nhkrishna opened this issue Sep 23, 2019 · 0 comments
Open

OpenMp performs slower on Hikey960 #7

nhkrishna opened this issue Sep 23, 2019 · 0 comments

Comments

@nhkrishna
Copy link

Hi,

I have installed Ubuntu on Hikey960 using instructions at this link and i'm able to get my board up and working fine.

But, I'm facing performance issues while using OpenMP in my application, specifically on Hikey960 board. I have written basic for loop using OpenMP constructs as below

int main(){

    int size = 20000000;

    double milliseconds;
    struct timeval ts1, ts2;

    int* ip1 = (int*)malloc(sizeof(int)*size);
    int* ip2 = (int*)malloc(sizeof(int)*size);
    int* op = (int*)malloc(sizeof(int)*size);
    
    gettimeofday(&ts1, NULL);
#pragma omp parallel for
    for(int i=0;i<size;i++){
        op[i] = ip1[i]*ip2[i];
    }

    gettimeofday(&ts2, NULL);
    milliseconds = (ts2.tv_sec - ts1.tv_sec) * 1000.0;
    (milliseconds) += (ts2.tv_usec - ts1.tv_usec) / 1000.0;
    printf("Time taken:%f", milliseconds);

    return 0;
}

I have observed application using OpenMP performs slower than with out using OpenMP on Hikey960. Same OpenMP application runs faster on other ARM platforms such as Raspberry Pi.

Could you please let us know why OpenMP applications running slower on Hikey960 or is there any thing i need to configure on this board?

Any help would be highly appreciated.

Thanks,
Hari

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

No branches or pull requests

1 participant