4

I used sudo apt-get install mpich in the Terminal. Everything installed just fine. But now I must edit an rc file for mgrid2 according to these instructions. One thing I must specify is the path where mpich is installed and I cannot find it! I did find its .h files in /usr/include but am certain that isn't the correct path. I've pasted the install output below.

Any thoughts on how to find where mpich installed? I'm running 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) ...

EDIT-

The instructions suggest the path /usr/x86-local/mpich/ch_p4 but I don't have a /usr/x86-local/ just a usr/local and it's not there.

find /usr -name mpich and whereis mpich returned:

/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 and whereis mpicc returned:

/usr/bin/mpicc.mpich
/usr/bin/mpicc
/usr/bin/mpicc.mpich2
/usr/share/man/man1/mpicc.1.gz

Point is, nothing I've tried so far had the subdirectory ch_p4 in it when I did an ls.

  • `which mpich` returns nothing. And executing the install command again returns a message saying the package is already installed and is the newest version. –  Feb 06 '16 at 00:24
  • find /usr -name mpi.h – Jeff Hammond Feb 06 '16 at 03:34
  • Could you try `whereis mpich` ? Usually, libraries are in /usr/lib and include is /usr/include. Notice that mpich provides a wrapper of the gcc compiler, to by used as `mpicc main.c -o main`. Could you try `which mpicc` and `whereis mpicc` ? – francis Feb 06 '16 at 09:04
  • Thanks @francis. I added the output of your suggestions to the question. I found some directories but not one containing the ch_p4 device subdirectory. Maybe this is installed separately?? `sudo find / -name ch_p4` returns nothing! –  Feb 06 '16 at 10:55
  • 1
    I guess that the problem is that the requirement of MicroGrid is mpich v1.2.5, while the package that is installed is mpich3.1-6. Other requirements are gcc 3.xx and the last revision of MicroGrid dates back to 2004... Indiana Jones would cherish such artifacts ! – francis Feb 06 '16 at 12:18

1 Answers1

3

You can use dpkg -L mpich or alternatively find /usr -name "mpich" to find the installation path of mpich.

Also, in case you specifically want to compile or run an MPI program using mpich and make sure you are not using another MPI library such as OpenMPI. You can directly call mpich by postfixing its name to MPI commands, e.g., mpicc.mpich, mpicxx.mpich, mpirun.mpich, etc.

hmofrad
  • 1,784
  • 2
  • 22
  • 28