Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
449 views
in Technique[技术] by (71.8m points)

linux - Build MPICH2 from source

As a follow-up of this question, I started building MPICH2 from source. I found this tutorial: Installing MPICH2 on a Single Machine and so far what I did is this:

./configure --disable-f77 --disable-fc --disable-fortran
[seems to be OK]
make; sudo make install
[long output with one warning]
libtool: warning: relinking 'lib/libmpicxx.la'
root@pythagoras:/home/gsamaras/mpich-3.1.4# mpich2version
bash: mpich2version: command not found

What am I doing wrong? Notice that I had first installed MPICH2 with apt-get and in order to remove it, I did:

apt-get remove --purge mpich2
apt-get autoremove // which might removed something that I need now

Tomorrow, I am going to try this: Getting And Building MPICH (which with first attempt failed to work in the autogen.sh part).


EDIT_1:

I couldn't get it to work, will try a combination of the two tutorials and report back. I did a configure and then the make from the other tutorial, failed too.


EDIT_2

This may shade some light about where it got installed (by following the first tutorial):

root@pythagoras:/home/gsamaras/mpich-3.1.4# which mpiexec
/usr/local/bin/mpiexec
root@pythagoras:/home/gsamaras/mpich-3.1.4# which mpirun
/usr/local/bin/mpirun
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You installed into /usr/local, which is an OK way to do things. The README instructions you followed suggests another way which will not require administrative privileges.

I like to install into /home/robl/soft/mpich-whatever , so I can have different compilers, versions, configurations, etc. such flexibility is probably overkill for you, but it's one strategy.

To your question:

root@pythagoras:/home/gsamaras/mpich-3.1.4# mpich2version
bash: mpich2version: command not found

First, the command is now mpichversion, not mpich2version -- it's possible you were following an old tutorial.

Second, your shell might not know about the newly installed binaries. hash -r (at least on bash and tcsh) will tell the shell "forget about what you think you know about my file system and look harder".


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...