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.
Hello,
I was trying to running the openMP helloworld example following the steps given by the tutorial,http://processors.wiki.ti.com/index.php/OpenMP_on_C6000.
However, everytime after I loaded my .out file, those 4 cores runned automatically, and an error shown on the console at the same time, [C66xx_1] ERROR: Ipc_start failed in OpenMP_masterTask.
According to the responses for the similar problem in the forum, I was used generation tool of version 7.4.0, but it didnt help.
Could anybody tell me what the problem might be?
btw, I didnt find Debugger Options under "Tools" bar. I'm using CCS 5.3
Thanks in advance.
regards,
Wendy
I set the "auto run options" debug configuration. After unchecking "On a program load or restart." cores indeed didnt run automatically, but the error was still there :(
Wendy,
Did you uncheck the option for all cores or just one core?
Are the switch settings for your 6678 EVM in no-boot mode?
Could you please provide the following:
1. Console log once you do: Clear Project. Build Project.
2. Snapshot of CCS Debug window when the error occurs
Thanks Wendy. Could you also provide:
1. Console log once you do: Clean Project. Build Project.
hello Uday,
Thank you so much for your response.
I don't know what happened, I build a new project and run it, there's no reaction at all...
here is my screen shot
when building the project:
**** Build of configuration Debug for project hello_openMP ****
"C:\\Wendy\\ti\\ccsv5\\utils\\bin\\gmake" -k all
'Building file: ../omp_config.cfg'
'Invoking: XDCtools'
"C:/Wendy/ti/xdctools_3_25_00_48/xs" --xdcpath="C:/Wendy/ti/omp_1_02_00_05/packages;C:/Wendy/ti/bios_6_35_01_29/packages;C:/Wendy/ti/ipc_1_24_03_32/packages;C:/Wendy/ti/pdk_C6678_1_1_2_6/packages;C:/Wendy/ti/ccsv5/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.omp.examples.platforms.evm6678 -r debug -c "C:/Wendy/ti" "../omp_config.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring omp_config.xe66 from package/cfg/omp_config_pe66.cfg ...
cle66 package/cfg/omp_config_pe66.c ...
'Finished building: ../omp_config.cfg'
' '
'Building file: ../omp_hello.c'
'Invoking: C6000 Compiler'
"C:/Wendy/ti/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/Wendy/ti/include" --display_error_number --diag_warning=225 --diag_wrap=off --openmp --preproc_with_compile --preproc_dependency="omp_hello.pp" --cmd_file="./configPkg/compiler.opt" "../omp_hello.c"
'Finished building: ../omp_hello.c'
' '
'Building target: hello_openMP.out'
'Invoking: C6000 Linker'
"C:/Wendy/ti/bin/cl6x" -mv6600 --abi=eabi -g --display_error_number --diag_warning=225 --diag_wrap=off --openmp -z -m"hello_openMP.map" -i"C:/Wendy/ti/lib" -i"C:/Wendy/ti/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="hello_openMP_linkInfo.xml" --rom_model -o "hello_openMP.out" -l"./configPkg/linker.cmd" "./omp_hello.obj" -l"libc.a"
<Linking>
'Finished building target: hello_openMP.out'
' '
**** Build Finished ****
when clean project
**** Clean-only build of configuration Debug for project hello_openMP ****
"C:\\Wendy\\ti\\ccsv5\\utils\\bin\\gmake" -k clean
DEL /F "configPkg\compiler.opt" "configPkg\linker.cmd" "hello_openMP.out"
RMDIR /S/Q "configPkg\"
DEL /F "omp_hello.pp"
DEL /F "omp_hello.obj"
'Finished clean'
' '
**** Build Finished ****
.cfg file
/*
* Copyright (c) 2012, Texas Instruments Incorporated
* http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* --/COPYRIGHT--*/
/* load the common configuration file */
xdc.loadCapsule('ti/omp/common.cfg.xs');
var System = xdc.useModule('xdc.runtime.System');
System.extendedFormats = "%$S";
var OpenMP = xdc.useModule('ti.omp.utils.OpenMP');
OpenMP.setNumProcessors(4); // Set to MAX by default
OpenMP.autoDnldCore = false; // add this line
Program.sectMap["ddr"] = new Program.SectionSpec();
Program.sectMap["ddr"].loadSegment = "DDR3";
Program.sectMap[".threadprivate"] = new Program.SectionSpec();
Program.sectMap[".threadprivate"].loadSegment = "L2SRAM";
/* ===================== Optional ============================= */
/* Advance User settings */
/* The default settings are commented out. */
/* Uncomment the same and modify, if different setting is desired */
/* =============================================================================*/
//OpenMP.qmssInit = true ;
//OpenMP.qmssMemRegion = -1;
//OpenMP.qmssStartIndex = 0;
//OpenMP.qmssDestQueueNum = -1;
//OpenMP.stackRegionId = 1;
//OpenMP.internalOsal = true;
//OpenMP.cppiHwSem = 3;
//OpenMP.qmssHwSem = 4;
//OpenMP.ompHwSem = 5;
//OpenMP.ompHwSemMutex = 6;
//OpenMP.ompHwSemMem = 7;
//OpenMP.mpaxIndex = 3;
thank you in advance and best regards.
Wendy
Hi Wendy
From your console log I see that the project is using newer versions of BIOS and XDC than what came with MCSDK 2.01.02.06. Could you please right-click on your project, go to Properties, and under the RTSC tab, and make sure that you select the following software component version numbers for SYS/BIOS and XDC tools:
SYS/BIOS 6.33.06.50
XDC 3.23.04.60
I know you said you had installed 7.4.0, but just like BIOS and XDC default to the latest version, the compiler might also default to the latest version, so do make sure 7.4.0 is in fact selected. Once you've done this, rebuild your project, load on the 4 cores and attempt running.
Also please ensure that between successive attempts to load and run, if you are not doing a hardware reset of the EVM, you should do the following before you attempt to load and run again:
Select Core 0 and then go to the CCS menu 'Run --> Reset --> CPU Reset'. Repeat this on ALL cores. Then select Core 0, and go to 'Run --> Reset --> System Reset,' followed by ' Scripts --> Init script --> Global Default Setup.' A snapshot of this is as below:
Note that if you don't see any scripts in the Scripts menu, you need to load the GEL file. To do this refer to http://processors.wiki.ti.com/index.php/GEL#Loading_GEL_Files The location of the GEL file you need should be C:\ti\ccsv5\ccs_base\emulation\boards\evmc6678l\gel\evmc6678l.gel
Once you try the above steps and you continue to see the error, the next thing I would suggest you try is to use all 8 cores. To do this change "OpenMP.setNumProcessors(4);" to "OpenMP.setNumProcessors(8);" in your CFG file. Then build, load on all 8 cores and run on all 8 cores. (be sure to uncheck autorun for all 8 cores before you try loading). Let us know what you see once you try these steps.
Hi Uday,
I've got some other work to do that I cant test until now.
by following your suggestion, I made sure about those settings: SYS/BIOS is 6.33.06.50; XDC is 3.23.04.60 and CGT is 7.4.0.
and after reseting, loading GEL file and loading my .out and run on 4 cores, I do have the correct result :)
but further on when I try out with 8 cores, the result was still the same with the one running out of 4 cores. it seems to me that my .cfg file didnt work for setting number of processors.
Here is my screenshot. on the bottom left you could see my .cfg. and to make sure I even cleaned my project and rebuilt it.
and an extra Question is, is there an easier way to run my project? or everytime before running I have to load Gel and do all those operations?
Thanks in advance,
Best regards,
Wendy
Hi Wendy
Glad you are able to successfully build and run on four cores.
For the eight core configuration, in addition to the CFG file change, also change the number of threads in your .c file to eight. Else it will only attempt to split four threads across eight cores, thus effectively using only four cores.
Wrt your question on running your .out files, I would suggest the following approach that would ensure that the default setup script is automatically run and the GEL file is loaded as soon as you launch your target configuration:
1. In CCS, go to View-->Target Configurations. Double click on your Target Configuration for the 6678 EVM. As the snapshot below shows, now select C66x_0, and in the "initialization script" path point to the evmc6678l.gel file that is located in your CCSv5 installation directory at 'ccsv5\ccs_base\emulation\boards\evmc6678l\gel\evmc6678l.gel'
2. Repeat Step 1 for all the cores (C66x_0, C66x_1, C66x_2, ...C66x_7)
3. Power cycle the EVM
4. Right-click on your target configuration and click on "Launch selected configuration." This should bring up your Debug view.
5. Connect to all the cores, load the .out files on all cores and run all cores.
Of course, as I suggested before, if you plan to run your .out again without power cycling, always ensure that you do a "System Reset" on Core 0, a" CPU Reset" on Cores 1-7, followed by running the "Global_Default_Setup" script on Core 0, and only then load and run the program.
Hello Uday,
Thank you so so so much for your patience!! and I really appreciate :D
Best regards,
Wendy
hello Uday
thanks for you patient
but I still have a problem
I change the source file of Matrix-Vector Multiple example to Matrix-Matrix Multiple.
At first,I set Matrix as 10*10 and 50*50 .It works perfect.
But when I increase the elements of Matrix to 100*100 ,an error occured:
ti.sdo.ipc.heaps.HeapMemMP: line 628: assertion failure: A_internal: An internal error has occurred
xdc.runtime.Error.raise: terminating execution
can you tell me how can I fix the problem?
best regards
Wang
Hi Raja:
Thank you so much
I did it success follow your advise !
but the openMP project running as if there is a breakpoint exsit
the slave cores will break out during the project runing.
The screenshot like this
I have to click the resume button to continue.
Can you tell me how to solve the problem ?
Thank you.
Wang