I am running my Fortran 95 numerical codes, whose structure is most times easily parallelized by little more than simply adding the corresponding OpenMP instruction before some critical DO sentences, in a dual-core multi-thread CPU Intel CORE i3. Ubuntu sees four CPUs (obviously since there are 2 cores, each of them emulating two cores each), and I have read that the multithread capability means that, under certain conditions, each of the CPUs may behave close to two separate CPUs itself, but not in general. I have heard somewhere that, in some cases, the four parallel threads may perform worse than two in this kind of machine.What is the kind of coding or tasks in general with which my machine works nearly as a real 4-core, and in which ones it may not be a good idea to emulate that (thus setting for instance the OMP_NUM_THREADS variable to 2 instead of 4)?EDIT: In other words and, according to this nice answer in another post, what is the optimal number of hardware threads for my machine in relation to the kind of numerical task involved, provided that, although it is a dual-core cpu, it has that multithread ability?
Under which conditions is better OMP_NUM_THREADS = 4 or 2 for multithread two-core CPU?
parallel computing