我在2008年初的MacBook Pro上很难访问这两个内核(即将退役)。我希望一些任务(例如用户输入)只执行一次。这两个核心都可能被使用,因为似乎有一些加速-np 2,但也许这只是因为其中一个核心带有两个进程。
我的Hello World是:
#!/bin/env python
"""
from www.siafoo.net/snippet/64
mpirun -np N_PROCS ./mpiHelloWorld.py
"""
from mpi4py import MPI
import sys
hwmess = "Hello, World!! I am process %d of %d on %s.\n"
myrank = MPI.COMM_WORLD.Get_rank()
nprocs = MPI.COMM_WORLD.Get_size()
procnm = MPI.Get_processor_name()
sys.stdout.write(hwmess % (myrank, nprocs, procnm))
给
$ mpirun -np 2 python mpiHelloWorld.py
你好,世界!!我在localhost上处理0的过程。
你好,世界!!我在localhost上处理0的过程。
当我认为应该是2时,nprocs是1.其他细节:
$ python /Library/Frameworks/EPD64.framework/Versions/Current/bin/python $ python Enthought Python Distribution - www.enthought.com 版本:7.2-2(64位)
Python 2.7.2 | EPD 7.2-2(64位)| (默认,2011年9月7日,16:31:15) darwin上的[GCC 4.0.1(Apple Inc. build 5493)] 输入“packages”,“demo”或“enthought”以获取更多信息。
mpirun --version给出:
$ mpirun --version
HYDRA构建细节:
版本:3.0.4
发行日期:4月24日星期三10:08:10 CDT 2013
CC:/usr/bin/gcc-4.2 -pipe -arch x86_64 -L / opt / local / lib -Wl,-headerpad_max_install_names -arch x86_64
CXX:/usr/bin/g++-4.2 -pipe -arch x86_64 -L / opt / local / lib -Wl,-headerpad_max_install_names -arch x86_64
F77:/opt/local/bin/gfortran-mp-4.8 -pipe -m64 -L / opt / local / lib -Wl,-headerpad_max_install_names -arch x86_64
F90:/opt/local/bin/gfortran-mp-4.8 -pipe -m64 -L / opt / local / lib -Wl,-headerpad_max_install_names -arch x86_64
配置选项:' - disable-option-checking'' - prefix = / opt / local'' - disable-dependency-tracking'' - enable-f77'' - enable-fc'' - disable- silent-rules'' - enable-base-cache'' - enable-cache'' - enable-cxx'' - enable-fast = Os''enable-shared''-enable-smpcoll' '--with-device = ch3:nemesis'' - with-pm = hydra'' - with-thread-package = posix'' - enable-versioning''F90FLAGS =''F90 ='' - enable -timer-type = mach_absolute_time''CC = / usr / bin / gcc-4.2''CFLAGS = -pipe -arch x86_64 -Os''LDFLAGS = -L / opt / local / lib -Wl,-headerpad_max_install_names -arch x86_64' 'CXX = / usr / bin / g ++ - 4.2''CXXFLAGS = -pipe -arch x86_64 -Os''F77 = / opt / local / bin / gfortran-mp-4.8''FFLAGS = -pipe -m64 -Os'' FC = / opt / local / bin / gfortran-mp-4.8''FCFLAGS = -pipe -m64 -Os'' - cache-file = / dev / null'' - ssrcdir =。' 'LIBS = -lpthread''CPPFLAGS = -I / opt / local / var / macports / build / _opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich / mpich / work / mpich-3.0.4 / src / mpl / include -I / opt / local / var / macports / build / _opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich / mpich / work / mpich-3.0.4 / src / mpl / include -I / opt / local / var / macports / build / _opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich / mpich / work / mpich-3.0.4 / src / openpa / src -I / opt / local / var / macports / build / _opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich / mpich / work / mpich-3.0.4 / src / openpa / src -I / opt /本地的/ var / MacPorts的/编译/ _opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich / MPICH /工作/ MPICH-3.0.4 / src目录/ MPI / ROMIO /包括”
流程经理:pmi
可用的发射器:ssh rsh fork slurm ll lsf sge手动持久
提供拓扑库:hwloc
资源管理内核可用:用户slurm ll lsf sge pbs钴
可用的检查点库:
可用的Demux引擎:轮询选择
mpirun --nooversubscribe给出:
$ mpirun --nooversubscribe [mpiexec @ localhost] match_arg(./utils/args/args.c:160):无法识别的参数nooversubscribe [mpiexec @ localhost] HYDU_parse_array(./utils / args / args.c:175):参数匹配返回错误 [mpiexec @ localhost] parse_args(./ui/mpich/utils.c:1609):解析输入数组时出错 [mpiexec @ localhost] HYD_uii_mpx_get_parameters(./ui/mpich/utils.c:1660):无法解析用户参数 [mpiexec @ localhost] main(./ui/mpich/mpiexec.c:153):解析参数时出错
操作系统是Snow Leopard 10.6.8,芯片是Intel Core 2 Duo。
还有什么?
如何访问两个核心?
谢谢!