简体   繁体   English

并行编程中4个线程/ 4个进程的时序问题

[英]Timing Issue with 4 Threads / 4 Processes in Parallel Programming

I am having issues with OpenMP and MPI execution timings. 我在OpenMP和MPI执行时序方面遇到问题。 When I select either 4 Threads (OMP) or 4 Proccesses (MPI) my execution time is slower than the serial code. 当我选择4个线程(OMP)或4个进程(MPI)时,我的执行时间比串行代码慢。

Both scripts have correct timings on other machines and both use the gettimeofday() function for timing. 这两个脚本在其他计算机上都具有正确的计时,并且都使用gettimeofday()函数进行计时。 Below is a screen shot of both scripts being executed from 1-8 Threads/Procs: 下面是从1-8线程/进程执行的两个脚本的屏幕截图:

在此处输入图片说明

RAM is not exceeding its limit and the disk is not busy during execution.The machine hosts an Intel i5 2500k (Stock not overclocked) and is running on Linux Mint 17 x64. RAM未超过其限制,并且在执行过程中磁盘不忙。该计算机托管Intel i5 2500k(股票未超频),并且在Linux Mint 17 x64上运行。

AS mentioned before, both programs produce the correct timings on other machines, so I think the issue has something to do with cpu affinity and the OS. 如前所述,这两个程序在其他机器上都能产生正确的时序,因此我认为问题与cpu亲和力和操作系统有关。

Has anyone encountered this issue before? 有人遇到过这个问题吗?

EDIT 1: 编辑1:

When using the argument 'bind-to-core' on the MPI execution, runtime is significantly increased, but still much slower than serial: 在MPI执行中使用参数'bind-to-core'时,运行时间显着增加,但仍然比串行运行慢得多:

在此处输入图片说明

Problem was faulty hardware. 问题是硬件故障。

I Replaced motherboard with one of the same series/chipset (so did not require an install) now the timings are returning correct on both scripts. 我现在用相同系列/芯片组之一替换主板(因此不需要安装),现在两个脚本的计时都返回正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM