Skip to content

OpenMp performs slower on Hikey960 #7

@nhkrishna

Description

@nhkrishna

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions