Ejemplo n.º 1
0
    def test_ldconfig(self):
        """ldconfig option"""
        mv2 = mvapich2_gdr(cuda_version='9.2',
                           ldconfig=True,
                           mlnx_ofed_version='4.5',
                           release='2',
                           version='2.3.3')
        self.assertEqual(
            str(mv2), r'''# MVAPICH2-GDR version 2.3.3
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        cpio \
        libgfortran3 \
        libnuma1 \
        libpciaccess0 \
        openssh-client \
        rpm2cpio \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://mvapich.cse.ohio-state.edu/download/mvapich/gdr/2.3.3/mofed4.5/mvapich2-gdr-mcast.cuda9.2.mofed4.5.gnu4.8.5-2.3.3-2.el7.x86_64.rpm && \
    cd / && rpm2cpio /var/tmp/mvapich2-gdr-mcast.cuda9.2.mofed4.5.gnu4.8.5-2.3.3-2.el7.x86_64.rpm | cpio -id && \
    (test -f /usr/bin/bash || ln -s /bin/bash /usr/bin/bash) && \
    ln -s /usr/local/cuda/lib64/stubs/nvidia-ml.so /usr/local/cuda/lib64/stubs/nvidia-ml.so.1 && \
    rm -rf /var/tmp/mvapich2-gdr-mcast.cuda9.2.mofed4.5.gnu4.8.5-2.3.3-2.el7.x86_64.rpm && \
    echo "/opt/mvapich2/gdr/2.3.3/mcast/no-openacc/cuda9.2/mofed4.5/mpirun/gnu4.8.5/lib64" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig
ENV PATH=/opt/mvapich2/gdr/2.3.3/mcast/no-openacc/cuda9.2/mofed4.5/mpirun/gnu4.8.5/bin:$PATH \
    PROFILE_POSTLIB="-L/usr/local/cuda/lib64/stubs -lnvidia-ml"''')
Ejemplo n.º 2
0
    def test_options(self):
        """PGI compiler and different Mellanox OFED version"""
        mv2 = mvapich2_gdr(pgi=True,
                           gnu=False,
                           cuda_version='9.2',
                           mlnx_ofed_version='3.4',
                           pgi_version='17.10',
                           release='1',
                           version='2.3')
        self.assertEqual(
            str(mv2), r'''# MVAPICH2-GDR version 2.3
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        cpio \
        libnuma1 \
        libpciaccess0 \
        openssh-client \
        rpm2cpio \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://mvapich.cse.ohio-state.edu/download/mvapich/gdr/2.3/mofed3.4/mvapich2-gdr-mcast.cuda9.2.mofed3.4.pgi17.10-2.3-1.el7.x86_64.rpm && \
    cd / && rpm2cpio /var/tmp/mvapich2-gdr-mcast.cuda9.2.mofed3.4.pgi17.10-2.3-1.el7.x86_64.rpm | cpio -id && \
    (test -f /usr/bin/bash || ln -s /bin/bash /usr/bin/bash) && \
    ln -s /usr/local/cuda/lib64/stubs/nvidia-ml.so /usr/local/cuda/lib64/stubs/nvidia-ml.so.1 && \
    rm -rf /var/tmp/mvapich2-gdr-mcast.cuda9.2.mofed3.4.pgi17.10-2.3-1.el7.x86_64.rpm
ENV LD_LIBRARY_PATH=/opt/mvapich2/gdr/2.3/mcast/no-openacc/cuda9.2/mofed3.4/mpirun/pgi17.10/lib64:$LD_LIBRARY_PATH \
    PATH=/opt/mvapich2/gdr/2.3/mcast/no-openacc/cuda9.2/mofed3.4/mpirun/pgi17.10/bin:$PATH \
    PROFILE_POSTLIB="-L/usr/local/cuda/lib64/stubs -lnvidia-ml"''')
Ejemplo n.º 3
0
    def test_package(self):
        """Manually specified download package"""
        mv2 = mvapich2_gdr(
            package=
            'mvapich2-gdr-mcast.cuda10.0.mofed4.3.gnu4.8.5-2.3-1.el7.x86_64.rpm'
        )
        self.assertEqual(
            str(mv2), r'''# MVAPICH2-GDR version 2.3
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        cpio \
        libgfortran3 \
        libnuma1 \
        libpciaccess0 \
        openssh-client \
        rpm2cpio \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://mvapich.cse.ohio-state.edu/download/mvapich/gdr/2.3/mofed4.3/mvapich2-gdr-mcast.cuda10.0.mofed4.3.gnu4.8.5-2.3-1.el7.x86_64.rpm && \
    cd / && rpm2cpio /var/tmp/mvapich2-gdr-mcast.cuda10.0.mofed4.3.gnu4.8.5-2.3-1.el7.x86_64.rpm | cpio -id && \
    (test -f /usr/bin/bash || ln -s /bin/bash /usr/bin/bash) && \
    ln -s /usr/local/cuda/lib64/stubs/nvidia-ml.so /usr/local/cuda/lib64/stubs/nvidia-ml.so.1 && \
    rm -rf /var/tmp/mvapich2-gdr-mcast.cuda10.0.mofed4.3.gnu4.8.5-2.3-1.el7.x86_64.rpm
ENV LD_LIBRARY_PATH=/opt/mvapich2/gdr/2.3/mcast/no-openacc/cuda10.0/mofed4.3/mpirun/gnu4.8.5/lib64:$LD_LIBRARY_PATH \
    PATH=/opt/mvapich2/gdr/2.3/mcast/no-openacc/cuda10.0/mofed4.3/mpirun/gnu4.8.5/bin:$PATH \
    PROFILE_POSTLIB="-L/usr/local/cuda/lib64/stubs -lnvidia-ml"''')
Ejemplo n.º 4
0
 def test_toolchain(self):
     """Toolchain"""
     mv2 = mvapich2_gdr()
     tc = mv2.toolchain
     self.assertEqual(tc.CC, 'mpicc')
     self.assertEqual(tc.CXX, 'mpicxx')
     self.assertEqual(tc.FC, 'mpifort')
     self.assertEqual(tc.F77, 'mpif77')
     self.assertEqual(tc.F90, 'mpif90')
Ejemplo n.º 5
0
    def test_runtime(self):
        """Runtime"""
        mv2 = mvapich2_gdr()
        r = mv2.runtime()
        self.assertEqual(
            r, r'''# MVAPICH2-GDR
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        openssh-client && \
    rm -rf /var/lib/apt/lists/*
COPY --from=0 /opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda9.0/mofed3.4/mpirun/gnu4.8.5 /opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda9.0/mofed3.4/mpirun/gnu4.8.5
ENV LD_LIBRARY_PATH=/opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda9.0/mofed3.4/mpirun/gnu4.8.5/lib64:$LD_LIBRARY_PATH \
    MV2_USE_GPUDIRECT=0 \
    MV2_USE_GPUDIRECT_GDRCOPY=0 \
    PATH=/opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda9.0/mofed3.4/mpirun/gnu4.8.5/bin:$PATH'''
        )
    def test_runtime(self):
        """Runtime"""
        mv2 = mvapich2_gdr()
        r = mv2.runtime()
        self.assertEqual(r,
r'''# MVAPICH2-GDR
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        libnuma1 \
        libpciaccess0 \
        openssh-client \
        libgfortran3 && \
    rm -rf /var/lib/apt/lists/*
COPY --from=0 /opt/mvapich2/gdr/2.3/mcast/no-openacc/cuda9.0/mofed4.2/mpirun/gnu4.8.5 /opt/mvapich2/gdr/2.3/mcast/no-openacc/cuda9.0/mofed4.2/mpirun/gnu4.8.5
ENV LD_LIBRARY_PATH=/opt/mvapich2/gdr/2.3/mcast/no-openacc/cuda9.0/mofed4.2/mpirun/gnu4.8.5/lib64:$LD_LIBRARY_PATH \
    PATH=/opt/mvapich2/gdr/2.3/mcast/no-openacc/cuda9.0/mofed4.2/mpirun/gnu4.8.5/bin:$PATH''')
Ejemplo n.º 7
0
    def test_default_centos(self):
        """Default mvapich2_gdr building block"""
        mv2 = mvapich2_gdr()
        self.assertEqual(
            str(mv2), r'''# MVAPICH2-GDR version 2.3.4
RUN yum install -y \
        libgfortran \
        libpciaccess \
        numactl-libs \
        openssh-clients \
        wget && \
    rm -rf /var/cache/yum/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://mvapich.cse.ohio-state.edu/download/mvapich/gdr/2.3.4/mofed4.7/mvapich2-gdr-mcast.cuda10.2.mofed4.7.gnu4.8.5-2.3.4-1.el7.x86_64.rpm && \
    rpm --install --nodeps /var/tmp/mvapich2-gdr-mcast.cuda10.2.mofed4.7.gnu4.8.5-2.3.4-1.el7.x86_64.rpm && \
    (test -f /usr/bin/bash || ln -s /bin/bash /usr/bin/bash) && \
    ln -s /usr/local/cuda/lib64/stubs/nvidia-ml.so /usr/local/cuda/lib64/stubs/nvidia-ml.so.1 && \
    rm -rf /var/tmp/mvapich2-gdr-mcast.cuda10.2.mofed4.7.gnu4.8.5-2.3.4-1.el7.x86_64.rpm
ENV LD_LIBRARY_PATH=/opt/mvapich2/gdr/2.3.4/mcast/no-openacc/cuda10.2/mofed4.7/mpirun/gnu4.8.5/lib64:$LD_LIBRARY_PATH \
    PATH=/opt/mvapich2/gdr/2.3.4/mcast/no-openacc/cuda10.2/mofed4.7/mpirun/gnu4.8.5/bin:$PATH \
    PROFILE_POSTLIB="-L/usr/local/cuda/lib64/stubs -lnvidia-ml"''')
Ejemplo n.º 8
0
    def test_defaults_ubuntu(self):
        """Default mvapich2_gdr building block"""
        mv2 = mvapich2_gdr()
        self.assertEqual(
            str(mv2), r'''# MVAPICH2-GDR version 2.3a
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        openssh-client \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://mvapich.cse.ohio-state.edu/download/mvapich/gdr/2.3a/mofed3.4/mvapich2-gdr-mcast.cuda9.0.mofed3.4.gnu4.8.5_2.3a-1.el7.centos_amd64.deb && \
    dpkg --install /var/tmp/mvapich2-gdr-mcast.cuda9.0.mofed3.4.gnu4.8.5_2.3a-1.el7.centos_amd64.deb && \
    (test -f /usr/bin/bash || ln -s /bin/bash /usr/bin/bash) && \
    ln -s /usr/local/cuda/lib64/stubs/nvidia-ml.so /usr/local/cuda/lib64/stubs/nvidia-ml.so.1 && \
    rm -rf /var/tmp/mvapich2-gdr-mcast.cuda9.0.mofed3.4.gnu4.8.5_2.3a-1.el7.centos_amd64.deb
ENV LD_LIBRARY_PATH=/opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda9.0/mofed3.4/mpirun/gnu4.8.5/lib64:$LD_LIBRARY_PATH \
    MV2_USE_GPUDIRECT=0 \
    MV2_USE_GPUDIRECT_GDRCOPY=0 \
    PATH=/opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda9.0/mofed3.4/mpirun/gnu4.8.5/bin:$PATH \
    PROFILE_POSTLIB="-L/usr/local/cuda/lib64/stubs -lnvidia-ml"''')
Ejemplo n.º 9
0
    def test_options(self):
        """PGI compiler and different Mellanox OFED version"""
        mv2 = mvapich2_gdr(pgi=True,
                           gnu=False,
                           cuda_version='8.0',
                           mlnx_ofed_version='4.0')
        self.assertEqual(
            str(mv2), r'''# MVAPICH2-GDR version 2.3a
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        openssh-client \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://mvapich.cse.ohio-state.edu/download/mvapich/gdr/2.3a/mofed4.0/mvapich2-gdr-mcast.cuda8.0.mofed4.0.pgi17.10_2.3a-1.el7.centos_amd64.deb && \
    dpkg --install /var/tmp/mvapich2-gdr-mcast.cuda8.0.mofed4.0.pgi17.10_2.3a-1.el7.centos_amd64.deb && \
    (test -f /usr/bin/bash || ln -s /bin/bash /usr/bin/bash) && \
    ln -s /usr/local/cuda/lib64/stubs/nvidia-ml.so /usr/local/cuda/lib64/stubs/nvidia-ml.so.1 && \
    rm -rf /var/tmp/mvapich2-gdr-mcast.cuda8.0.mofed4.0.pgi17.10_2.3a-1.el7.centos_amd64.deb
ENV LD_LIBRARY_PATH=/opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda8.0/mofed4.0/mpirun/pgi17.10/lib64:$LD_LIBRARY_PATH \
    MV2_USE_GPUDIRECT=0 \
    MV2_USE_GPUDIRECT_GDRCOPY=0 \
    PATH=/opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda8.0/mofed4.0/mpirun/pgi17.10/bin:$PATH \
    PROFILE_POSTLIB="-L/usr/local/cuda/lib64/stubs -lnvidia-ml"''')
Ejemplo n.º 10
0
    def test_package(self):
        """Directory in local build context"""
        mv2 = mvapich2_gdr(
            package=
            'mvapich2-gdr-mcast.cuda9.0.mofed3.4.gnu4.8.5_2.3a-1.el7.centos_amd64.deb'
        )
        self.assertEqual(
            str(mv2), r'''# MVAPICH2-GDR
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        openssh-client \
        wget && \
    rm -rf /var/lib/apt/lists/*
COPY mvapich2-gdr-mcast.cuda9.0.mofed3.4.gnu4.8.5_2.3a-1.el7.centos_amd64.deb /var/tmp/mvapich2-gdr-mcast.cuda9.0.mofed3.4.gnu4.8.5_2.3a-1.el7.centos_amd64.deb
RUN dpkg --install /var/tmp/mvapich2-gdr-mcast.cuda9.0.mofed3.4.gnu4.8.5_2.3a-1.el7.centos_amd64.deb && \
    (test -f /usr/bin/bash || ln -s /bin/bash /usr/bin/bash) && \
    ln -s /usr/local/cuda/lib64/stubs/nvidia-ml.so /usr/local/cuda/lib64/stubs/nvidia-ml.so.1 && \
    rm -rf /var/tmp/mvapich2-gdr-mcast.cuda9.0.mofed3.4.gnu4.8.5_2.3a-1.el7.centos_amd64.deb
ENV LD_LIBRARY_PATH=/opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda9.0/mofed3.4/mpirun/gnu4.8.5/lib64:$LD_LIBRARY_PATH \
    MV2_USE_GPUDIRECT=0 \
    MV2_USE_GPUDIRECT_GDRCOPY=0 \
    PATH=/opt/mvapich2/gdr/2.3a/mcast/no-openacc/cuda9.0/mofed3.4/mpirun/gnu4.8.5/bin:$PATH \
    PROFILE_POSTLIB="-L/usr/local/cuda/lib64/stubs -lnvidia-ml"''')