我在终端中使用了sudo apt-get install mpich
。一切安装得很好。但是现在我必须根据these instructions编辑mgrid2的rc文件。我必须指定的一件事是安装mpich的路径,我找不到它!我确实在/ usr / include中找到了它的.h文件,但我确定这不是正确的路径。我已粘贴下面的安装输出。
有关如何找到mpich安装位置的任何想法?我正在运行Ubuntu 15.10。
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
gfortran gfortran-5 hwloc-nox libcr-dev libcr0 libgfortran-5-dev
libgfortran3 libhwloc-plugins libhwloc5 libmpich-dev libmpich12 libmpl-dev
libmpl1 libopa-dev libopa1 ocl-icd-libopencl1
Suggested packages:
gfortran-multilib gfortran-doc gfortran-5-multilib gfortran-5-doc
libgfortran3-dbg blcr-dkms libhwloc-contrib-plugins blcr-util mpich-doc
opencl-icd
The following NEW packages will be installed:
gfortran gfortran-5 hwloc-nox libcr-dev libcr0 libgfortran-5-dev
libgfortran3 libhwloc-plugins libhwloc5 libmpich-dev libmpich12 libmpl-dev
libmpl1 libopa-dev libopa1 mpich ocl-icd-libopencl1
0 upgraded, 17 newly installed, 0 to remove and 5 not upgraded.
Need to get 9,379 kB of archives.
After this operation, 36.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu/ wily/universe libhwloc5 i386 1.11.0-1 [86.5 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ wily/main libgfortran3 i386 5.2.1-22ubuntu2 [250 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ wily/main libgfortran-5-dev i386 5.2.1-22ubuntu2 [276 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ wily/main gfortran-5 i386 5.2.1-22ubuntu2 [6,522 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ wily/main gfortran i386 4:5.2.1-3ubuntu1 [1,276 B]
Get:6 http://us.archive.ubuntu.com/ubuntu/ wily/universe libcr0 i386 0.8.5-2.2 [19.9 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ wily/universe libcr-dev i386 0.8.5-2.2 [24.5 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ wily/universe hwloc-nox i386 1.11.0-1 [126 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu/ wily/main ocl-icd-libopencl1 i386 2.2.7-2 [30.3 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu/ wily/universe libhwloc-plugins i386 1.11.0-1 [11.8 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu/ wily/universe libmpl1 i386 3.1-6 [20.4 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu/ wily/universe libmpich12 i386 3.1-6 [797 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu/ wily/universe libmpl-dev i386 3.1-6 [17.7 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu/ wily/universe libopa1 i386 3.1-6 [14.0 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu/ wily/universe libopa-dev i386 3.1-6 [11.3 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu/ wily/universe libmpich-dev i386 3.1-6 [985 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu/ wily/universe mpich i386 3.1-6 [186 kB]
Fetched 9,379 kB in 22s (425 kB/s)
Selecting previously unselected package libhwloc5:i386.
(Reading database ... 208750 files and directories currently installed.)
Preparing to unpack .../libhwloc5_1.11.0-1_i386.deb ...
Unpacking libhwloc5:i386 (1.11.0-1) ...
Selecting previously unselected package libgfortran3:i386.
Preparing to unpack .../libgfortran3_5.2.1-22ubuntu2_i386.deb ...
Unpacking libgfortran3:i386 (5.2.1-22ubuntu2) ...
Selecting previously unselected package libgfortran-5-dev:i386.
Preparing to unpack .../libgfortran-5-dev_5.2.1-22ubuntu2_i386.deb ...
Unpacking libgfortran-5-dev:i386 (5.2.1-22ubuntu2) ...
Selecting previously unselected package gfortran-5.
Preparing to unpack .../gfortran-5_5.2.1-22ubuntu2_i386.deb ...
Unpacking gfortran-5 (5.2.1-22ubuntu2) ...
Selecting previously unselected package gfortran.
Preparing to unpack .../gfortran_4%3a5.2.1-3ubuntu1_i386.deb ...
Unpacking gfortran (4:5.2.1-3ubuntu1) ...
Selecting previously unselected package libcr0.
Preparing to unpack .../libcr0_0.8.5-2.2_i386.deb ...
Unpacking libcr0 (0.8.5-2.2) ...
Selecting previously unselected package libcr-dev.
Preparing to unpack .../libcr-dev_0.8.5-2.2_i386.deb ...
Unpacking libcr-dev (0.8.5-2.2) ...
Selecting previously unselected package hwloc-nox.
Preparing to unpack .../hwloc-nox_1.11.0-1_i386.deb ...
Unpacking hwloc-nox (1.11.0-1) ...
Selecting previously unselected package ocl-icd-libopencl1:i386.
Preparing to unpack .../ocl-icd-libopencl1_2.2.7-2_i386.deb ...
Unpacking ocl-icd-libopencl1:i386 (2.2.7-2) ...
Selecting previously unselected package libhwloc-plugins.
Preparing to unpack .../libhwloc-plugins_1.11.0-1_i386.deb ...
Unpacking libhwloc-plugins (1.11.0-1) ...
Selecting previously unselected package libmpl1:i386.
Preparing to unpack .../libmpl1_3.1-6_i386.deb ...
Unpacking libmpl1:i386 (3.1-6) ...
Selecting previously unselected package libmpich12:i386.
Preparing to unpack .../libmpich12_3.1-6_i386.deb ...
Unpacking libmpich12:i386 (3.1-6) ...
Selecting previously unselected package libmpl-dev.
Preparing to unpack .../libmpl-dev_3.1-6_i386.deb ...
Unpacking libmpl-dev (3.1-6) ...
Selecting previously unselected package libopa1:i386.
Preparing to unpack .../libopa1_3.1-6_i386.deb ...
Unpacking libopa1:i386 (3.1-6) ...
Selecting previously unselected package libopa-dev.
Preparing to unpack .../libopa-dev_3.1-6_i386.deb ...
Unpacking libopa-dev (3.1-6) ...
Selecting previously unselected package libmpich-dev.
Preparing to unpack .../libmpich-dev_3.1-6_i386.deb ...
Unpacking libmpich-dev (3.1-6) ...
Selecting previously unselected package mpich.
Preparing to unpack .../archives/mpich_3.1-6_i386.deb ...
Unpacking mpich (3.1-6) ...
Processing triggers for man-db (2.7.4-1) ...
Processing triggers for doc-base (0.10.6) ...
Processing 1 added doc-base file...
Setting up libhwloc5:i386 (1.11.0-1) ...
Setting up libgfortran3:i386 (5.2.1-22ubuntu2) ...
Setting up libgfortran-5-dev:i386 (5.2.1-22ubuntu2) ...
Setting up gfortran-5 (5.2.1-22ubuntu2) ...
Setting up gfortran (4:5.2.1-3ubuntu1) ...
update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode
update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode
Setting up libcr0 (0.8.5-2.2) ...
Setting up libcr-dev (0.8.5-2.2) ...
Setting up hwloc-nox (1.11.0-1) ...
Setting up ocl-icd-libopencl1:i386 (2.2.7-2) ...
Setting up libhwloc-plugins (1.11.0-1) ...
Setting up libmpl1:i386 (3.1-6) ...
Setting up libmpich12:i386 (3.1-6) ...
Setting up libmpl-dev (3.1-6) ...
Setting up libopa1:i386 (3.1-6) ...
Setting up libopa-dev (3.1-6) ...
Setting up libmpich-dev (3.1-6) ...
DEBUG: postinst in libmpich-dev
update-alternatives: using /usr/include/mpich to provide /usr/include/mpi (mpi) in auto mode
Setting up mpich (3.1-6) ...
update-alternatives: using /usr/bin/mpirun.mpich to provide /usr/bin/mpirun (mpirun) in auto mode
Processing triggers for libc-bin (2.21-0ubuntu4) ...
修改 -
说明建议路径为/usr/x86-local/mpich/ch_p4
,但我没有/usr/x86-local/
仅usr/local
而且它不存在。
find /usr -name mpich
和whereis mpich
已退回:
/usr/share/doc/mpich --copyright info and shortcuts stored here
/usr/include/mpich --.h files stored here
/usr/lib/mpich --shortcut to /usr/include/mpich only
which mpicc
和whereis mpicc
已退回:
/usr/bin/mpicc.mpich
/usr/bin/mpicc
/usr/bin/mpicc.mpich2
/usr/share/man/man1/mpicc.1.gz
重点是,当我执行ls
时,到目前为止我没有尝试过任何子目录ch_p4。
答案 0 :(得分:0)
您可以使用dpkg -L mpich
或find /usr -name "mpich"
查找mpich的安装路径。
此外,如果您特别想使用mpich编译或运行MPI程序,并确保您没有使用其他MPI库(如OpenMPI)。您可以通过将mpich的名称后缀到MPI命令(例如mpicc.mpich
,mpicxx.mpich
,mpirun.mpich
等)来直接调用mpich