Carlo, OpenMPI /= OpenMP (or, if you prefer C syntax: OpenMPI != OpenMP). OMP_NUM_THREADs is for the latter; mpirun -np N for the former. When you link MKL, by default you link the multithreaded (OpenMP) version. In order to avoid conflicts with MPI, you should set OMP_NUM_THREADS to 1. You can use both parallelization paradigms, but only in some special cases (large multicore parallel machines) and if you have control of where the MPI processes run and where OpenMP threads are spawned. In all other cases, stay clear of mixed MPI-OpenMP parallelization.
Paolo -- Paolo Giannozzi, Democritos and University of Udine, Italy
