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.

C6678,OpenMP,GCC

Other Parts Discussed in Thread: TMS320C6678

Hello,

I'm studying OpenMP on TMS320C6678 this days.I know that ccs5.2 use GCC as the compiler of OpenMP.I use omp_1_01_02_06 package.It's compatible with OpenMP specification 3.0 and GCC 4.5. I wonder if it support the GOMP_CPU_AFFINITY environment variable because I can't find the variable in omp.h file and  other variables else.
If ccs5.2 support the  GOMP_CPU_AFFINITY environment variable as well as other variables,where could I find them and how to set their value ? 

Thank you! 

  • Hi Wei

    It looks like there is support for GOMP_CPU_AFFINITY. If you look under omp_1_01_02_06/packages/ti/omp, you will see the following files make references to GOMP_CPU_AFFINITY: env.c, libgomp.h and team.c. 

    Also, I would recommend that you update to the latest version of MCSDK and OMP. You can find the latest version of MCSDK at http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html As of today this is MCSDK 2.01.02.06.

    Next, update your OpenMP package to the latest build by downloading the installer from http://software-dl.ti.com/sdoemb/sdoemb_public_sw/omp/latest/index_FDS.html  As of today this is OMP 1.02.00.05.

    Also ensure that you download the recommended compiler version 7.4.0.

  • Thank you very much for your reply and recommendation ! I have download the latest BIOS MCSDK files .

    http://openmp.org/forum/viewtopic.php?f=3&t=1584

    The website above is the question I post in the OpenMP's forum. I will  study the new package first and do my best to find the answer.  If you or someone else know the answer, please let me know, I would be very grateful.

    Thank you !

  • Hi Wei

    I double-checked with the OpenMP package release team and they mentioned that the OMP package does not support GOMP_CPU_AFFINITY and OMP_PROC_BIND. Core assignment is not developer-controlled; when a new task is to be assigned, the implementation does a search for a core running the least number of tasks and assigns the new task to this core. That said, your OpenMP forum post that you linked to seems to indicate that your main objective is to have four different programs split across eight cores, where each program runs on two cores. Two ways you should be able to achieve this are as follows:

    1. Load four different .outs to four pairs of cores, i.e. omp_prog1.out parallelized on say core 0 and 1, omp_prog2.out parallelized on say core 2 and 3, omp_prog3.out on core 4 and 5 and omp_prog4.out on core 6 and 7. However, though this should be possible, this is not the most efficient implementation since you now have four different copies of the OpenMP runtime data structures.

    2. You can just have a single .out program file, that contains the four different functions you plan to run. Each function can be incorporated in a separate OpenMP task using '#pragma omp task.' (You could also use #pragma omp sections). 

  • Thank you very much for your reply !

    First, this is just one of my thoughts. I have tested that different cores can run different tasks on  the TMS320C6678 platform. So I want to initiate parallel compute on different tasks that run on different cores and not tend to split the program in a specific task that can parallelly compute in the slave cores using #pragma omp sections directive. So, if we can bind specific slave cores to a parallel instruction like #pragma omp for, that could be easily solved and I think we can use all the cores sufficiently. It seems that the first solution you recommended could also solve it, but I don't know how to configurate the program that  make  parallel directives only valid in two cores.

    And, I also want to ask if IPC module can work with OMP module on the same TMS320C6678 device? I know that IPC and OMP using the same SharedRegion module and may be some other modules else. If they work together, could there be implicit conflicts ?

    Thank you !

  • The OMP is based on IPC, so IPC API can be used in OMP projects.  It' just my personal opinion.