9696 check Release " $release " || (echo " error: RELEASE!=$release " && exit 1)
9797fi
9898
99- if test " $( uname) " = " Linux" ; then
100- case " $mpiname " in
101- mpich) MODSOURCE=" $SOURCE " /modules ;;
102- openmpi) MODSOURCE=" $SOURCE " /3rd-party ;;
103- esac
99+ boostrap-ofi () {
104100 ofigithub=" https://github.com/ofiwg/libfabric"
105101 ofiurlbase=" $ofigithub /releases/download/v$ofiversion "
106102 ofitarball=" libfabric-$ofiversion .tar.bz2"
107- ofidestdir=" $MODSOURCE " /" ${ofitarball%% .tar.* } "
103+ ofidestdir=" $1 " /" ${ofitarball%% .tar.* } "
108104 if test ! -d " $ofidestdir " ; then
109105 if test ! -f " $ofitarball " ; then
110106 echo downloading " $ofiurlbase " /" $ofitarball " ...
@@ -119,10 +115,13 @@ if test "$(uname)" = "Linux"; then
119115 else
120116 echo reusing directory " $ofidestdir " ...
121117 fi
118+ }
119+
120+ boostrap-ucx () {
122121 ucxgithub=" https://github.com/openucx/ucx"
123122 ucxurlbase=" $ucxgithub /releases/download/v$ucxversion "
124123 ucxtarball=" ucx-$ucxversion .tar.gz"
125- ucxdestdir=" $MODSOURCE " /" ${ucxtarball%% .tar.* } "
124+ ucxdestdir=" $1 " /" ${ucxtarball%% .tar.* } "
126125 if test ! -d " $ucxdestdir " ; then
127126 if test ! -f " $ucxtarball " ; then
128127 echo downloading " $ucxurlbase " /" $ucxtarball " ...
@@ -141,6 +140,17 @@ if test "$(uname)" = "Linux"; then
141140 else
142141 echo reusing directory " $ucxdestdir " ...
143142 fi
143+ }
144+
145+ if test " $( uname) " = " Linux" ; then
146+ if test " $mpiname " = " mpich" && test " ${version%% .* } " -ge 4; then
147+ boostrap-ofi " $SOURCE " /modules
148+ boostrap-ucx " $SOURCE " /modules
149+ fi
150+ if test " $mpiname " = " openmpi" ; then
151+ boostrap-ofi " $SOURCE " /3rd-party
152+ boostrap-ucx " $SOURCE " /3rd-party
153+ fi
144154fi
145155
146156if test " $mpiname " = " mpich" ; then
0 commit comments