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.

Error compiling for Open MP

Other Parts Discussed in Thread: SYSBIOS, TMS320C6678

I am trying to run a simple hello world program for Open MP on a C6678 core.

I am compiling using CGT7.4.0B2.

I am using the OMP package 1.00.01.05

In the project properties, under C6000 Compiler -> Advanced Options ->Advanced Optimizations , I selected 'Enable Support for OpenMP 3.0.

I receive the following errors and warning:

<Linking>
error #10378: non-TLS reference "errno" in
   "/opt/ti/omp_1_00_01_05_eng/packages/ti/omp/lib/release/ti.omp.ae66<env.oe66
   >" mismatches TLS definition in
   "/opt/ti/C6000CGT7.4.0B2/lib/rts6600_elf_mt.lib<errno.obj>"
warning #10247-D: creating output section ".TI.tls" without a SECTIONS
   specification
warning #10247-D: creating output section ".TI.tls_init" without a SECTIONS
   specification

I am unsure what to do to resolve these errors and warnings.

Thanks,

Elaina

  • Hi Elaina,

    What RTSC platform are you using? Make sure you use the "ti.omp.examples.platforms.evm6678" platform. You can check this by right-clicking on your project, and then going to Properties, and under the General menu option, select the RTSC tab. Snapshot 1 below shows the default platform that is selected as part of the HelloWorld example included in the omp package.

    You can also use the helloWorld example that is included in the omp package as a starting point. To do that go to File --> New --> CCS Project, and then as Snapshot 2 shows, under "Project Templates and Examples" select "OMP Examples--> C6678 Examples --> Hello World Example." There are two other project templates here with OpenMP examples.

    Snapshot 1


    Snapshot 2

  • Hi,

    The RTSC platform I was using was 'ti.omp.examples.platforms.evm6678'

    Target: ti.targets.elf.C66

    Build-profile: release

    I tried compiling the OMP helloworld example, but the error remained the same. The compiler the example project defaulted to was 7.3.5, but then I get the following warning:

    Warning: xdc.cfg.INCOMPATIBLE_TARGET_VERSION: current target 'ti.targets.elf.C66' [1,0,7.3,5] is not compatible with targets used to build the following packages; package ti.omp.config.sysbios [in /opt/ti/omp_1_00_01_05_eng/packages/ti/omp/config/sysbios/] was built using 'ti.targets.elf.C66' [1,0,7.4,0,11348]
    ; package ti.omp [in /opt/ti/omp_1_00_01_05_eng/packages/ti/omp/] was built using 'ti.targets.elf.C66' [1,0,7.4,0,11348]
    ; package ti.omp.navigator [in /opt/ti/omp_1_00_01_05_eng/packages/ti/omp/navigator/] was built using 'ti.targets.elf.C66' [1,0,7.4,0,11348]
    ; package ti.omp.utils [in /opt/ti/omp_1_00_01_05_eng/packages/ti/omp/utils/] was built using 'ti.targets.elf.C66' [1,0,7.4,0,11348]

    However, it does complete the build. I tried running it on the TMDXEVM6678LE: To do so, I launched my target configuration file (XDS100v1 USB Emulator), connected to the first 4 cores, and loaded my program to all four. I do not see any of the print statements in the console.

    I terminated and relaunched the configuration. This time I loaded symbols into cores 1,2 and 3, and loaded the program onto core 0. I resumed running only on core 0 with no output. I resumed running on the first four cores, but with no output.

    To double check that the cores were working, I successfully ran a non-Open MP hello world on each core to test that they could print to the console.

    -Elaina

  • Hi Elaina,

    Could you please select the compiler 7.4.x in the project properties for the OMP helloworld example provided and then try building and running again.

  • Hi,

    I changed the compiler to 7.4.0B2, and the 'incompatible target version' warning goes away, but I receive the exact error in the original post, and the compilation fails:

    <Linking>
    error #10378: non-TLS reference "errno" in
       "/opt/ti/omp_1_00_01_05_eng/packages/ti/omp/lib/release/ti.omp.ae66<env.oe66
       >" mismatches TLS definition in
       "/opt/ti/C6000CGT7.4.0B2/lib/rts6600_elf_mt.lib<errno.obj>"
    warning #10247-D: creating output section ".TI.tls" without a SECTIONS
       specification
    warning #10247-D: creating output section ".TI.tls_init" without a SECTIONS
       specification
    error #10010: errors encountered during linking; "omp_helloworld2.out" not
       built

    gmake: *** [omp_helloworld2.out] Error 1
    >> Compilation failure
    gmake: Target `all' not remade because of errors.

    -Elaina

  • Hi Elaina

    Could you please zip your helloWorld project and attach it here?

  • Hi

    Attached is the helloWorld project. Please let me know if you need any other files.

    Thanks,

    Elaina

    omp_helloword2.zip
  • Hi,

    I was working on OpenMP too, but with compiler 7.4.0B1. I had no special warning / error when compiling.

    To run a OpenMP program, I had to load the program on all the 8 cores (not only symbols). Even if I used fewer.

    I changed in the .cfg  :  OpenMP.setNumProcessors(8);   (It was set to 4 in the exemple)

    I keep the option "run to symbol main" in the target configuration propertie

    When the program finishes loading on all the 8 cores, the core 0 suspends. Then, I pressed "Resume", and it worked

    I hope it could help...

  • I forgot one more thing : in the RTSC properties (where you can select the platform), I had to specify the PDK for C6678.

    It wanted to use an unexisting PDK, so I unchecked it, to replace it to the good PDK.

  • Hi,

    I'd like to use OpenMP too but I have some questions.

    What should I do to use the 7.4 beta compiler? I downloaded and installed it but it doesn't show on the compiler menu (Properties -> General -> Main -> Compiler version).

    How do I get the OpenMP package? Does it come with a beta version of MCSDK or something else?

    Thanks in advance

  • Under the RTSC 'Products and Repositories, what did you specify, and which versions?

    Thanks,

    Elaina

  • Hi Elaina,

    Under RTSC I'm using:

    XDCtools 3.23.1.43

    EDMA3 Low Level Driver 2.11.2

    IPC 1.24.2.27

    MCSDK 2.08.20

    MCSDK PDK TMS320C6678 1.0.0.20

    NDK 2.20.6.35

    SYS/BIOS 6.33.2.31

    System Analyzer 1.0.3.25

    XDAIS 7.21.1.07

    The 'OpenMP BIOS runtime library' is not installed so I don't have the ti.omp.examples.platforms.evm6678.

    Also I don't have the 'OMP Examples' when I create a new CCS project.

    Under Properties .. C6000 Compiler... Optimizations, I selected 'Enable Support for OpenMP 3.0', but this is the only place where I have something about OpenMP.

    How do you have these features enabled? How do you got the OMP package you mentioned above?

    Thanks,

    Johannes

  • Hi Benoit

    Under the RTSC 'Products and Repositories, what did you specify, and which versions?

    Thanks,

    Elaina

  • Hi Benoit,

    I am wondering if/hoping the problem is with the compiler. Can you try compiling and running the OpenMP helloworld example using 7.4.0B2?

    Thanks,

    Elaina

  • Johannes,

    The OpenMP MCSDK support was in alpha release and not currently available for general download.  However, you have good timing since the beta will be released next week and will be posted to ti.com for general download.  I'll post back to this thread with the download location at that point.  It will be MCSDK v2.1.0.2 I believe.  Stay tuned!

    Thanks,

    Travis

  • Hi Travis,

    Thanks for your update. I'm glad to hear that =)

    Regards

    Johannes

  • Hi Elaina,

    Wrt your original question, I was able to recreate the symbol mismatch linking error you are seeing, when I tried your example with the 7.4.0B2 version of the compiler. This symbol mismatch issue will be fixed in the upcoming MCSDK 2.1 beta that Travis mentioned. In the meantime, you can use the following workaround:

    1. Right-click on your project and select Properties

    2. Go to Build-->C6000 Linker-->File Search Path. Select first the "Debug" configuration from the drop-down menu and in the "Include library file or command file as input" box replace "libc.a" with "rts6600_elf.lib" as indicated in the snapshot below:

    3. Repeat #2 for the "Release" configuration.

    4. Clean Project and Build Project

  • The fix worked and I can now compile the program (using all 8 cores) without any errors. However, I am now trying to run it on the TMDXEVM6678LE, and I am getting an error related to Heap Memory.

    -I launch the target configuration file (Texas Instruments XDS100v1 USB Emulator), with the TMS320C6678 selected.

    -I group all the cores and connect to the group

    -I load the program to group. At this point all the cores start running except core 0, so I hit resume.

    I receive the following error:

    [C66xx_1] ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x8003e8, size=872546304
    xdc.runtime.Error.raise: terminating execution
    [C66xx_2] ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x8003e8, size=872546304
    xdc.runtime.Error.raise: terminating execution
    [C66xx_3] ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x8003e8, size=872546304
    xdc.runtime.Error.raise: terminating execution
    [C66xx_4] ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x8003e8, size=872546304
    xdc.runtime.Error.raise: terminating execution
    [C66xx_5] ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x8003e8, size=872546304
    xdc.runtime.Error.raise: terminating execution
    [C66xx_6] ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x8003e8, size=872546304
    xdc.runtime.Error.raise: terminating execution
    [C66xx_7] ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x8003e8, size=872546304
    xdc.runtime.Error.raise: terminating execution

  • Elaina,

    Could you please power cycle your board, start a new debug session in CCS and try the following:

    1. Select Core 0 and then go to Tools--> Debugger Options --> Generic Debugger Options as shown in the snapshot below

    2. Under 'General Debugger Options' ---> 'Auto Run Options' uncheck the box that says "On a program load or restart," and click "Remember My Settings" at the bottom

    3. Repeat steps 1 and 2 for all cores

    4. Load the .out file on each of the cores (or you can group them like you were doing earlier)

    5. Run the program on all cores 

  • The error remains the same.

    I inserted some print statements to detect where the code was breaking. All print statements before the omp pragma work.

    -Elaina

  • Hi,

    Sorry for taking so much time to answer....

    I tried to compile your project with version 7.4 B2, but it did not work

    <Linking>
    warning #10366-D: automatic library build: using library "C:\ti3\C6x compiler
       7_4_0_B2\lib\rts6600_elf_mt.lib" for the first time, so it must be built.
       This may take a few minutes.
    "c:/users/admini~1/appdata/local/temp/ti1bf6~1/obj/exp10f.asm", ERROR!  :
     [E1000]
             Unable to open temp macro library
               'C:\Users\ADMINI~1\AppData\Local\Temp\031762': Permission denied

    I created another project from helloworld exemple, compiled it with v7.4 B1 (did not work with B2...)

    I used :

    IPC : v1.24.0.16

    PDK for 6678 v1.1.0.1

    OpenMP BIOS runtime library1.0.1.05_eng

    SYS/BIOS : 6.32.5.54

    (XDCtools v3.22.4.46)

    I loaded it on all 8 cores, it worked.


    Do you use a gel file to initialize your board when you connect it ?

    I did not see it in your .ccxml file.

    I am using mcsdk_2_01_00_01\tools\program_evm\gel\evmc6678l.gel

  • Hello,

    thank you for figuring out a solution. Regarding the statement "This symbol mismatch issue will be fixed in the upcoming MCSDK 2.1 beta that Travis mentioned":

    I downloaded MCSDK 2.1 beta today and unfortunately the same issue is still present. I saw the error message of the original post also on my machine. Afer manually replacing libc.a by rts6600_elf.lib as written above, the error message of the original post vanished. Instead the compiler complains about the following:

    error #10378: TLS reference "errno" in

       "C:\ti\omp_1_01_02_03_beta\packages\ti\omp\lib\debug\ti.omp.ae66<env.oe66>"

       mismatches non-TLS definition in

       "C:/ti/C6000-Code-Generation-Tools-7.4.0B2/lib/rts6600_elf.lib<errno.obj>"

    I tried "rts6600_elf_mt.lib" instead, compilation finished. But I saw the following warnings (which I saw in several posts in the forum allready - and which I also saw during the first automatic compilation of the runtime (or whatever) library after installing the new compiler):

    <Linking>

    warning #10247-D: creating output section ".TI.tls" without a SECTIONS

       specification

    warning #10247-D: creating output section ".TI.tls_init" without a SECTIONS

    Two topics:

    a) The release manager of the beta version might be interested in the fact that libc.a has to be manually replaced in the current release.

    b) What do this warnings (which not only I see) mean ?

    Thank you.

    Best regards,

    Roelof Berg

  • Additional information: I don't use the HelloWorld example, instead I use "OpenMP Example - Matrix-vector multiplication - C/C++ Version". Execution of the (with warnings and mt-runtime) compiled version on a C6678 EVM is successful.

    By the way: Excellent choice to provide OpenMP on a multicore DSP. TI rocks !

  • Hi Benoit,

    It works now!

    The problem was that I was not using a gel file to initialize the board. I followed the instructions in the following post, and everything worked:

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/199072.aspx

    Thanks,

    Elaina