Speeding up Simulink compile times and the use of CUDA cores

2 views (last 30 days)
I am running a master script file which calls a number of files in successive order. #1 is a simulink simulation that takes in data from the audio card, demodulates and filters it then puts the data stream on workspace as bunch of bits in order. #5 is another simulink file takes pre-arranged and entered bits from the workspace, modulates, adds coding and then transmits it through the audio device which is the sound card again. Both of these models have over 20 blocks in them. Both have them additional side circuits that check to make sure that they won't run longer than necessary such as stopping the simulation if there is no signal at the input etc..
When I am continuously running the master file and supplying it with signal intermittently, my what I call transceiver is basically deaf for long periods of time because it takes on average 25-30 seconds to compile the simulink models. It will first run the receiver for a 10 seconds, if it detects a signal, it will stop the receiver simulink file,run the rest of the code and then run the transmitter to send it's answer. Then it will stop the transmitter and run receiver again waiting for more data. So to go around just one time, I am spending 60 seconds or so in compiling area. I tried to run the accelerator mode but it does not seem to be making a big difference.
Question 1) When I run the simulation under accelerator or rapid accelerator, do I need to let it build the mex file and then later go back and call that mex file or the original .slx simulink file? I feel like I am doing something wrong since nothing is accelerating. A professor of mine checked the code and said that the check sum is not changing from compile to compile, so I do not know why matlab is recompiling the model every time it wants to run it.
Question 2) I have 2 brand new graphics cards running in SLI(parallel) with 1536 cuda cores each. Is there any way I can run my simulink files on those cores to speed up the compiling part of the model? I realistically need to lower the compiling to sub 5 seconds in order to have a viable model that would work with a real radio transceiver. I have access to almost all the simulink toolboxes through my school.

Accepted Answer

Andy
Andy on 31 Jul 2013
We have figured a way out with the filters. The filters were taking a really long time to compile because they were really sharp. Once we fixed that it started to run much faster.
I would still like to know how to run these models on the GPU though, if someone has experience, please teach me.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!