pgi-accelerator

how to solve pgcc&openacc linker error “__pgi_uacc_multicorestart”, “__pgi_uacc_multicoreend”

末鹿安然 提交于 2019-12-24 18:16:18
问题 I am trying to parallelize my program in C with OpenACC 2.5 on Ubuntu 16.04 LTS. After a simple modification which is just adding one line, I can compile all my .c files to .o files. In the linking step, pgcc compiler shows undefined reference to `__pgi_uacc_multicorestart' and undefined reference to `__pgi_uacc_multicoreend' . Google search shows nothing related to these error message. Please help me on this problem. Here is the information and source code related to my system and program. I

c - Linking a PGI OpenACC-enabled library with gcc

泪湿孤枕 提交于 2019-12-11 05:18:29
问题 Briefly speaking , my question relies in between compiling/building files (using libraries) with two different compilers while exploiting OpenACC constructs in source files. I have a C source file that has an OpenACC construct. It has only a simple function that computes total sum of an array: #include <stdio.h> #include <stdlib.h> #include <openacc.h> double calculate_sum(int n, double *a) { double sum = 0; int i; printf("Num devices: %d\n", acc_get_num_devices(acc_device_nvidia)); #pragma