簡體   English   中英

從源代碼構建MPICH2

[英]Build MPICH2 from source

作為問題的后續,我從源頭開始構建MPICH2。 我找到了本教程: 在單台計算機上安裝MPICH2,到目前為止,我所做的是:

./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

我究竟做錯了什么? 請注意,我首先用apt-get安裝了MPICH2,然后為了刪除它,我這樣做了:

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

明天,我將嘗試進行以下操作: 獲取並構建MPICH (第一次嘗試在autogen.sh部分中失敗)。


EDIT_1

我無法使它正常工作,請嘗試結合使用這兩個教程並進行報告。 我進行了配置,然后從另一個教程中進行制作,也失敗了。


EDIT_2

這可能會模糊一些關於它安裝的位置的信息(通過遵循第一個教程):

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

您已將其安裝到/ usr / local,這是一種行之有效的方法。 您遵循的README說明建議了另一種不需要管理特權的方式。

我喜歡將其安裝到/ home / robl / soft / mpich-whatever,因此我可以使用不同的編譯器,版本,配置等。這種靈活性對您來說可能有些過頭,但這是一種策略。

對你的問題:

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

首先,命令現在是mpichversion ,而不是mpich2version -您可能正在學習舊的教程。

其次,您的Shell可能不知道新安裝的二進制文件。 hash -r (至少在bash和tcsh上)將告訴Shell“忘記您認為的有關我的文件系統的知識,並且看起來更難”。

我找到了mpich-3.0.4-README ,后者似乎提供了解決方案。

長話短說,它說(假設您要構建3.0.4版本,我使用3.1.4( 在此處可用)完成此工作):

tar xzf mpich-3.0.4.tar.gz
cd mpich-3.0.4

// you might want to disable fortran compiler (see the README I linked above)
./configure --prefix=/home/<USERNAME>/mpich-install 2>&1 | tee c.txt

make 2>&1 | tee m.txt

make install 2>&1 | tee mi.txt

PATH=/home/<USERNAME>/mpich-install/bin:$PATH ; export PATH

which mpicc
// should return something reasonable (with your directory)

mpiexec -n 2 ./examples/cpi

現在,帶有machinefile的選項不起作用,因為ssh需要密碼,但這是另一個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM