a***m 发帖数: 74 | 1 I have to use MC for 1e+9 runs to get the required accuracy. It roughly
takes 1000/2/60 = 7-8 hours to get a set of result.It's too time consuming.
I wonder if there are ways to accelerate matlab runs.
1. I heard about compiling matlab m file into execution file that can
operate at a speed similar to C. I am not sure how to do it.
2. I can try other MC methods, for example, control variate etc. Assume I
have a control variate that I know the true value, how do I use it to
accelerate MC speed?
An | l*****g 发帖数: 547 | 2 1. read help of matlab, it's all there
2. let matlab manage your variable memory, unless it is global.
.
【在 a***m 的大作中提到】 : I have to use MC for 1e+9 runs to get the required accuracy. It roughly : takes 1000/2/60 = 7-8 hours to get a set of result.It's too time consuming. : I wonder if there are ways to accelerate matlab runs. : 1. I heard about compiling matlab m file into execution file that can : operate at a speed similar to C. I am not sure how to do it. : 2. I can try other MC methods, for example, control variate etc. Assume I : have a control variate that I know the true value, how do I use it to : accelerate MC speed? : An
| k****f 发帖数: 3794 | 3 升级机器最省事了。
.
【在 a***m 的大作中提到】 : I have to use MC for 1e+9 runs to get the required accuracy. It roughly : takes 1000/2/60 = 7-8 hours to get a set of result.It's too time consuming. : I wonder if there are ways to accelerate matlab runs. : 1. I heard about compiling matlab m file into execution file that can : operate at a speed similar to C. I am not sure how to do it. : 2. I can try other MC methods, for example, control variate etc. Assume I : have a control variate that I know the true value, how do I use it to : accelerate MC speed? : An
| k**f 发帖数: 372 | 4 The improvement you can achieve by compiling to C code depends on your
original code. It could be large, or little.
Alternatively, you may wan to use the matlab profiler to find out the
bottleneck of your code. Often you'll find inefficient code that holds your
simulation speed. Then do some optimization to speed it up.
Good luck. | I*******r 发帖数: 211 | 5 put all your big loops in C. search mex+matlab for help.
.
【在 a***m 的大作中提到】 : I have to use MC for 1e+9 runs to get the required accuracy. It roughly : takes 1000/2/60 = 7-8 hours to get a set of result.It's too time consuming. : I wonder if there are ways to accelerate matlab runs. : 1. I heard about compiling matlab m file into execution file that can : operate at a speed similar to C. I am not sure how to do it. : 2. I can try other MC methods, for example, control variate etc. Assume I : have a control variate that I know the true value, how do I use it to : accelerate MC speed? : An
|
|