This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OpenMP Error CCS V5

Other Parts Discussed in Thread: TMS320C6678

Hi,


my Name is Samed Topal an i have a problem using OpenMP with CCS V5. I have a simple Hello World project and i want to test OpenMP. My EVM is the TMS320C6678. I get this errors:


#10010 errors encountered during linking: OpenMP_V1.out not built
#10234-D unresolved symbols remain
unresolved symbol omp_get_num_threads, first refereced in ./main.obj
unresolved symbol omp_get_thread_num, first referenced in ./main.obj

- compiler version TI v8.1.0

Here my simple code:

#include <stdio.h>
#include <omp.h>

int main(void)
{
    int nthreads, tid;

    // Fork a team of threads giving them their own copies of variables
    #pragma omp parallel private(nthreads, tid)
      {

      // Obtain thread number
          tid = omp_get_thread_num();
          printf("Hello World from thread = %d\n", tid);

      // Only master thread does this
         if (tid == 0)
         {
             nthreads = omp_get_num_threads();
             printf("Number of threads = %d\n", nthreads);
         }

      }  // All threads join master thread and disband
}

what is wrong? Without using OpenMP, a simple Hello World with printf works.

  • Hi Samed Topal,

    #10010 errors encountered during linking: OpenMP_V1.out not built
    #10234-D unresolved symbols remain
    unresolved symbol omp_get_num_threads, first refereced in ./main.obj
    unresolved symbol omp_get_thread_num, first referenced in ./main.obj


    Please make sure that you have added the openMP library into your project.

    Example:
    C:\ti\openmp_dsp_2_01_17_01\packages\examples\hello

    Required library:
    C:\ti\openmp_dsp_2_01_17_01\packages\ti\runtime\openmp\lib
  • Hi Shankari G,

    i don't have "openmp_dsp_2_01_17_01. Why?
    I have only omp_1_01_03_02. How can i get the right one?

    Thank you
  • OpenMp runtime 1.x is not supported anymore. Please port openmp 2.x for keystone 1 devices, refer below wiki link.

    Thank you.

  • Hi Samed Topal,
    If you are using the "omp_1_01_03_02" then try to use the following library into your CCS project settings.

    C:\ti\omp_1_01_03_02\packages\ti\omp\lib\debug\ti.omp.ae66
  • Hi Raja,

    thank you for the answer.

    But how schould i do this step:

    Rebuild OpenMP 2.x for KeyStone 1

    - Install the MCSDK-HPC package downloaded above onto a Linux machine
    Locate the openmp_dsp_2_01_16_02 folder inside the directory where the MCSDK-HPC package was installed and copy this folder to
    your Windows machine
    These are the only two steps that will require a Linux machine for the Windows version of these steps

    i don't have a linux machine.

    Or do you mean i don't have to "rebuild" OpenMP 2.x?

    Thank you
  • Hi Shankari,

    thank you for the answer. But it dint't work. I have still the problems. Nothing changed
  • Hi Samed Topal,
    Could you please attach the your complete project ?
    Let me try to build for you.
  • Hi Shankari,

    thank you for your help. Here my project. It is only the simple OpenMP project.


    Thank you

    OpenMP.zip

  • Hi Samed Topal,

    I'm able to build your project and out file is created.

    Can you attach your CCS build log ?

    Here is the build log:

    **** Clean-only build of configuration Debug for project OpenMP_2 ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k clean

    DEL /F  "OpenMP_2.out"

    Could Not Find C:\Users\10607926\Downloads\OpenMP\OpenMP_2\Debug\OpenMP_2.out

    DEL /F "main.pp"

    Could Not Find C:\Users\10607926\Downloads\OpenMP\OpenMP_2\Debug\main.pp

    DEL /F "main.obj"

    Could Not Find C:\Users\10607926\Downloads\OpenMP\OpenMP_2\Debug\main.obj

    'Finished clean'

    ' '

    **** Build Finished ****

    **** Build of configuration Debug for project OpenMP_2 ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all

    'Building file: ../main.c'

    'Invoking: C6000 Compiler'

    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/bin/cl6x" -mv6600 --abi=eabi --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include" --include_path="C:/ti/omp_1_01_03_02/packages/ti/omp" -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.pp"  "../main.c"

    'Finished building: ../main.c'

    ' '

    'Building target: OpenMP_2.out'

    'Invoking: C6000 Linker'

    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/bin/cl6x" -mv6600 --abi=eabi -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"OpenMP_2.map" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="OpenMP_2_linkInfo.xml" --rom_model -o "OpenMP_2.out" "./main.obj" "../C6678.cmd"  -l"libc.a"

    <Linking>

    warning #10247-D: creating output section ".text" without a SECTIONS specification

    warning #10247-D: creating output section ".const" without a SECTIONS specification

    warning #10247-D: creating output section ".stack" without a SECTIONS specification

    warning #10247-D: creating output section ".fardata" without a SECTIONS specification

    warning #10247-D: creating output section ".switch" without a SECTIONS specification

    warning #10247-D: creating output section ".cio" without a SECTIONS specification

    warning #10247-D: creating output section ".sysmem" without a SECTIONS specification

    warning #10247-D: creating output section ".far:.common" without a SECTIONS specification

    warning #10247-D: creating output section ".cinit" without a SECTIONS specification

    warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size

    warning #10210-D: creating ".sysmem" section with default size of 0x400; use the -heap option to change the default size

    'Finished building target: OpenMP_2.out'

    ' '

    **** Build Finished ****