Multicore virtual machine for open mpi testing
I developed time ago a open mpi code. Now I am working on it again and would like to do some testing. For reasons I can not avoid I can only use now a single core computer (my pc) for programming an开发者_如何学God testing.
I know there are virtual machines. In the same fashion I wonder if I could get a virtual machine with a eight cores cpu, so I could test my code, even if it would run 1000 times slower.
I know that for the cell processor there is some kind of simulator with a similar function.
It seems unlikely that you will find an emulator which will allow you to accurately assess the performance of your code on a multi-core system. Such a system would need to accurately simulate the memory hierarchy of the computer as well as the detailed performance of the cores themselves. I don't know of any program which will let you do this on a single core system.
OTOH, you can run your programs using several threads on your single core machine by using mpirun -np N
, where N
is the number of threads. To test your code you should at least run several datasets with many different numbers of threads. You should also run each dataset more than once, because the threads might not run in exactly the same way each time.
Testing your code in this way is far from optimal, but testing your code on a multi-core system will not guarantee that the code is correct either. Given your situation, running it with several threads is probably the best you can do.
精彩评论