Gentoo Archives: gentoo-science

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-science@l.g.o
Subject: Re: [gentoo-science] sys-cluster infiniband , mpi related soft. update request
Date: Fri, 30 Jan 2009 11:44:58
Message-Id: df02a1a80901300344v30a86232vfd68559935f5e058@mail.gmail.com
In Reply to: Re: [gentoo-science] sys-cluster infiniband , mpi related soft. update request by Janusz Mordarski
1 Yes its possible. I add this ebuild after i test it
2 also i add infiniband support for openmpi
3
4 2009/1/30 Janusz Mordarski <janek@××××××××××.pl>
5
6 > Hi, is it finally possible to someone put new ebuild for openib-mvapich2, i
7 > send my ebuild for this package below, it works well, one think maybe is to
8 > add USE flag for SDR or DDR infiniband,
9 >
10 > and register mvapich2 in virtual-mpi as one of the 'official' mpi's to
11 > select? it is easy i think and no effort (just add
12 > sys-cluster/openib-mvapich2 as a RDEPEND)
13 >
14 > also there's something wrong with this new package responsible for programs
15 > such as ibdiagnet ibtrace... , paths are wrong, emerge installs these into
16 > /usr/bin but when i start those programs, they are looking for others in
17 > /usr/local/bin.. need to be fixed
18 >
19 >
20 > openib-mvapich2.ebuild attachment:
21 >
22 >
23 >
24 > --
25 > Dept of Computational Biophysics & Bioinformatics,
26 >
27 > Faculty of Biochemistry, Biophysics and Biotechnology,
28 > Jagiellonian University,
29 > ul. Gronostajowa 7,
30 > 30-387 Krakow, Poland.
31 > Tel: (+48-12)-664-6380
32 >
33 >
34 > # Copyright 1999-2008 Gentoo Foundation
35 > # Distributed under the terms of the GNU General Public License v2
36 > # $Header: $
37 >
38 > inherit mpi fortran flag-o-matic eutils multilib toolchain-funcs
39 >
40 > SLOT="0"
41 > LICENSE="BSD"
42 >
43 > KEYWORDS="~x86 ~amd64"
44 >
45 > DESCRIPTION="MVAPICH2 MPI-over-infiniband package auto-configured for
46 > OpenIB."
47 >
48 > HOMEPAGE="http://mvapich.cse.ohio-state.edu/"
49 > SRC_URI="${HOMEPAGE}/download/mvapich2/mvapich2-${PV/_/-}p1.tgz"
50 >
51 > S="${WORKDIR}/mvapich2-${PV/_/-}p1"
52 >
53 > IUSE="debug medium-cluster large-cluster rdma romio threads fortran"
54 >
55 > RDEPEND="
56 > || ( ( sys-cluster/libibverbs
57 > sys-cluster/libibumad
58 > sys-cluster/libibmad
59 > rdma? ( sys-cluster/librdmacm ) )
60 > sys-cluster/openib-userspace )
61 > $(mpi_imp_deplist)"
62 > DEPEND="${RDEPEND}"
63 >
64 > pkg_setup() {
65 > MPI_ESELECT_FILE="eselect.mpi.mvapich2"
66 >
67 > if [ -z "${MVAPICH_HCA_TYPE}" ]; then
68 > elog "${PN} needs to know which HCA it should optimize for.
69 > This is"
70 > elog "passed to the ebuild with the variable,
71 > \${MVAPICH_HCA_TYPE}."
72 > elog "Please choose one of: _MLX_PCI_EX_SDR_,
73 > _MLX_PCI_EX_DDR_,"
74 > elog "_MLX_PCI_X, _PATH_HT_, or _IBM_EHCA_."
75 > elog "See make.mvapich2.detect in ${S} for more
76 > information."
77 > die "MVAPICH_HCA_TYPE undefined"
78 > fi
79 >
80 > case ${ARCH} in
81 > amd64)
82 > if grep Intel /proc/cpuinfo &>/dev/null; then
83 > BUILD_ARCH=-D_EM64T_
84 > else
85 > BUILD_ARCH=-D_X86_64_
86 > fi
87 > ;;
88 > x86)
89 > BUILD_ARCH=-D_IA32_
90 > ;;
91 > ia64)
92 > BUILD_ARCH=-D_IA64_
93 > ;;
94 > ppc64)
95 > BUILD_ARCH=-D_PPC64_
96 > ;;
97 > *)
98 > die "unsupported architecture: ${ARCH}"
99 > ;;
100 > esac
101 > use fortran && fortran_pkg_setup
102 > }
103 >
104 > src_unpack() {
105 > unpack ${A}
106 > cd "${S}"
107 > einfo "Disabling examples"
108 > # Examples are always compiled with the default 'all' target. This
109 > # causes problems when we don't build support for everything,
110 > including
111 > # threads, mpe2, etc. So we're not going to build them.
112 > sed -i 's:.*cd examples && ${MAKE} all.*::' Makefile.in
113 > }
114 >
115 > src_compile() {
116 > local vcluster="small"
117 > use large-cluster && vcluster="large"
118 > use medium-cluster && vcluster="medium"
119 >
120 > local c="--with-device=ch3:sock
121 > --with-link=DDR
122 > $(use_enable romio)
123 > --with-cluster-size=${vcluster}
124 > --enable-sharedlibs=gcc"
125 >
126 > local enable_srq
127 > [ "${MVAPICH_HCA_TYPE}" == "_MLX_PCI_X_" ] && enable_srq="-DSRQ"
128 >
129 >
130 > append-flags "${BUILD_ARCH}"
131 > append-flags "${enable_srq}"
132 > append-flags "-D${MVAPICH_HCA_TYPE}"
133 >
134 > use debug && c="${c} --enable-g=all --enable-debuginfo"
135 >
136 > if use threads; then
137 > c="${c} --enable-threads=multiple
138 > --with-thread-package=pthreads"
139 > else
140 > c="${c} --with-thread-package=none"
141 > fi
142 >
143 > # enable f90 support for appropriate compilers
144 > if use fortran; then
145 > case "${FORTRANC}" in
146 > gfortran|ifc|ifort|f95)
147 > c="${c} --enable-f77 --enable-f90";;
148 > g77|f77|f2c)
149 > c="${c} --enable-f77 --disable-f90";;
150 > esac
151 > else
152 > c="${c} --disable-f77 --disable-f90"
153 > fi
154 >
155 > sed -i \
156 > -e 's/ ${exec_prefix}/ ${DESTDIR}${exec_prefix}/' \
157 > -e 's/ ${libdir}/ ${DESTDIR}${libdir}/' \
158 > ${S/-beta2/}/Makefile.in
159 > sed -i '/bindir/s/ ${bindir}/ ${DESTDIR}${bindir}/'
160 > ${S/-beta2/}/src/pm/mpd/Makefile.in
161 > cd ${S/-beta2/}
162 >
163 > ! mpi_classed && c="${c} --sysconfdir=/etc/${PN}"
164 > econf $(mpi_econf_args) ${c}
165 >
166 > #
167 > http://www.mcs.anl.gov/research/projects/mpich2/support/index.php?s=faqs#parmake
168 > # https://trac.mcs.anl.gov/projects/mpich2/ticket/297
169 > emake -j1 || die "emake failed"
170 > #emake || die "emake failed"
171 > }
172 >
173 > src_install() {
174 > emake DESTDIR="${D}" install || die "make install failed"
175 > mpi_imp_add_eselect
176 > }
177 >
178 > pkg_postinst() {
179 > einfo "To allow normal users to use infiniband, it is necessary to"
180 > einfo "increase the system limits on locked memory."
181 > einfo "You must increase the kernel.shmmax sysctl value, and
182 > increase"
183 > einfo "the memlock limits in /etc/security/limits.conf. i.e.:"
184 > echo
185 > einfo "echo 'kernel.shmmax = 512000000' >> /etc/sysctl.conf"
186 > einfo "echo 512000000 > /proc/sys/kernel/shmmax"
187 > einfo "echo -e '* soft memlock unlimited\n* hard memlock unlimited'
188 > > /etc/security/limits.conf"
189 > }
190 >
191 >
192 >
193
194
195 --
196 Gentoo GNU/Linux 2.6.25
197
198 Mail to
199 alexxyum@×××××.com
200 alexxy@××××××.ru

Replies

Subject Author
Re: [gentoo-science] sys-cluster infiniband , mpi related soft. update request Janusz Mordarski <janek@××××××××××.pl>
Re: [gentoo-science] sys-cluster infiniband , mpi related soft. update request Janusz Mordarski <janek@××××××××××.pl>