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

Hi

My base project is "image_proc_omp" in directory "C:\ti\mcsdk_2_01_02_05\demos\image_processing\openmp\evmc6678l".

I created three tasks in the main program dynamically for receiving, parsing and processing. I wanted to use OpenMP in processing task but when the parallel region executed the program locked. It is like memory corruption error and there isn't any error message in the console.

I included the include files for my ".c" file as below:

Question 1:

Is it necessary to include other include files? If the answer is yes, What includes?

My parallel region code is as below:

Question 2:

What is the problem? what should I do?

MY TOOLS:

OS: win7 64bit

CCS: 5.2

MCDSK: 2_1_2_5

CGT: 7.4.0

OMP: 1_1_2_6

Best Regards

  • Hi

    Please answer me, I'm waiting.

    Regards

  • 1. If you have selected omp based example for building the application means, it has included the necessary header files for the programs right. Are you getting any build issue? Can you elaborate your query?

    Thank you.
  • Dear Raja

    I can build the project without any errors. It is a run time error.

    It is my master thesis project and I want to do it as soon as possible. Please help me. I describe a little about my project history.

    History:

    I implemented my algorithms on a desktop processor in visual studio by using OpenMP , and I finished that project.

    My tools was:

    OS: win7 64 bit

    Processor: Core_i7 3930k ()

    IDE: Visual Studio

    Compiler: Micro Soft

    I used multi thread programming and OpenMP for parallel programming. Next I implemented my algorithms on DSP C6678 EVM board for profiling and comparing between my two processors.

    As I described before I used "image_proc_omp" as my base project, next my actions was as below:

    1) I made three thread dynamically for Receiving, Parsing and Processing(priority: high,medium,low)

    2) I synchronized the threads.

    3) The receiving task works real time permanently and always receives packets and put them in a ping pong buffer.

    4) The parser task parses the receiving packets and puts the data in DDR3 memory.

    5) The processing task processes data from DDR3 memory by using OpenMP.

    I accomplished steps 1 to 4 successfully and now I am in step 5. I thought I only used the OpenMP synthaxes like Visual Studio but it seems I should care full about more details. I found out those when I saw the example code as below:

    In parallel region in line 208 a function called (process_rgb() ), In this function the cache function used as below:

    My Questions:

    Question 1:

    When I used " #pragma omp for or ... "  should I manage Cache memory like above? If the answer is yes how should I do it? is there any reference?

    I have studied " C:\ti\omp_1_01_03_02\docs " User_Guide.pdf, but it didn't help me.

    Question 2:

    According to Intel Core_i7 3930k specs, can I achieve it's performance and speed up on DSP?

    Regards

  • Hi

    Please answer me, I'm waiting.

    Regards

  • dariush,

    What is the exact run time error you are observing? We might be able to better help you if you post the entire error log.

    Answers to you questions:

    1. In the for loop of your test case shown above, you don't need to manage cache coherence manually. You may find the document is useful to understand C66x cache usage:

    2. The speedup varies depending on your application implementation.

    I recommend you to upgrade to OpenMP2.x as we actually no longer support OpenMP1.x. Here is the porting guide:

    Regards,

    Garrett

  • Dear Garrett

    for using OpenMP 2.x I should said I don't have enough time for investigate it and I should finish the project as soon as possible.

    I did some tests that could help for finding the bug:

    1) I made a OpenMP project by TI OpenMP examples(Matrix vector multiplication).

    2) After I tested the the project and it worked correct, I commented the main syntax and call a function as below:

    2) I wrote an OpenMP function as below:

    This function worked correctly.

    4) In my base project at the main I called a function " Sys_Init() " for initialization as below. I copied the the parallel test code from My_test() function to start of this function and ran the project. This piece of code worked correctly.

    5) I described about the tasks in my project before, after that I copied my parallel test code in the start of Sig_Proc() task function as below. when the Sig_Proc() task run it spent infinite time as the master_main task disconnected and print the " recv failed (35) " message as below.

    As shown above the parallel test code worked in a function but didn't work in a task function!!!

    Question 1:

    What should I do?

    Regards

  • Hi

    I am waiting, Please answer me.

    Best Regards
  • Why nobody answer me????????????

  • What is the problem? why nobody answer me?
  • Hi dariush,

    I could not have chance to look into the E2E posts last week. I saw you have posted the answer in another thread (e2e.ti.com/.../475636) regarding OpenMP #pragma inside a SYS/BIOS task after you searched online. It's quite often that people may have the same questions and being answered in the past.

    Regards,
    Garrett