This is not related to temporary files overwritten by each other as omnet does not do that (if it writes out a file it always qualifies it with the run number).
The different results are most likely because running several runs in the *same* process are very prone to C++ programming errors. e.g. if you have a static variable that is initialized on process load, your are bound to fail because (static) initialization is done only when the process is started (when run 0 start, but it is not initialized for runs 1..9)
Because of this, you should always run each simulation in a separate process (i.e. never use -r 0..7 construct).
Now the good thing is, parallelization is supported by omnet out of box.
- from the IDE: in the Launch dialog just switch to Cmdenv and specify the number of processors/cores you want to use and specify * for the run number. The IDE will do the rest for you by starting each run in a separate process (also you will get consolidated progress report)
- from the command line: use the "opp_runall" script. Specify your simulation executable and parameters. You CAN specify -r 0..9 here because opp_runall will parse out it from the command line and will not pass it to the simulation but instead it will do some magic to run each run in separate process (and pass only a single run number to it). You can set the required parallelism using the -j command line argument. In short:
$ opp_runall -j 6 ./mysimulation -r 0..15
This will run the specified 16 runs parallel on 6 cores.
(if you are wondering how it is done, the opp_runall script creates a temporary makefile with a target for each run and a default target that depends on each run target. After this, it invokes make with the specified -j parameter. GNU make itself handles the parallelism and parallel process starting and ensures that no more than the specified number of processes are running at the same time. Even is some processes are finishing earlier that the others.