Пример #1
0
 def test_toolchain(self):
     """Toolchain"""
     m = mpich()
     tc = m.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')
Пример #2
0
    def test_runtime(self):
        """Runtime"""
        m = mpich()
        r = m.runtime()
        self.assertEqual(
            r, r'''# MPICH
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 /usr/local/mpich /usr/local/mpich
ENV LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH \
    PATH=/usr/local/mpich/bin:$PATH''')
Пример #3
0
    def test_defaults_centos(self):
        """Default mpich building block"""
        m = mpich()
        self.assertEqual(
            str(m), r'''# MPICH version 3.3.2
RUN yum install -y \
        file \
        gzip \
        make \
        openssh-clients \
        perl \
        tar \
        wget && \
    rm -rf /var/cache/yum/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz && \
    mkdir -p /var/tmp && tar -x -f /var/tmp/mpich-3.3.2.tar.gz -C /var/tmp -z && \
    cd /var/tmp/mpich-3.3.2 &&   ./configure --prefix=/usr/local/mpich && \
    make -j$(nproc) && \
    make -j$(nproc) install && \
    rm -rf /var/tmp/mpich-3.3.2 /var/tmp/mpich-3.3.2.tar.gz
ENV LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH \
    PATH=/usr/local/mpich/bin:$PATH''')
Пример #4
0
    def test_ldconfig(self):
        """ldconfig option"""
        m = mpich(ldconfig=True, version='3.3')
        self.assertEqual(
            str(m), r'''# MPICH version 3.3
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        file \
        gzip \
        make \
        openssh-client \
        perl \
        tar \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://www.mpich.org/static/downloads/3.3/mpich-3.3.tar.gz && \
    mkdir -p /var/tmp && tar -x -f /var/tmp/mpich-3.3.tar.gz -C /var/tmp -z && \
    cd /var/tmp/mpich-3.3 &&   ./configure --prefix=/usr/local/mpich && \
    make -j$(nproc) && \
    make -j$(nproc) install && \
    echo "/usr/local/mpich/lib" >> /etc/ld.so.conf.d/hpccm.conf && ldconfig && \
    rm -rf /var/tmp/mpich-3.3 /var/tmp/mpich-3.3.tar.gz
ENV PATH=/usr/local/mpich/bin:$PATH''')
Пример #5
0
    def test_defaults_ubuntu(self):
        """Default mpich building block"""
        m = mpich()
        self.assertEqual(
            str(m), r'''# MPICH version 3.3.2
RUN apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        file \
        gzip \
        make \
        openssh-client \
        perl \
        tar \
        wget && \
    rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz && \
    mkdir -p /var/tmp && tar -x -f /var/tmp/mpich-3.3.2.tar.gz -C /var/tmp -z && \
    cd /var/tmp/mpich-3.3.2 &&   ./configure --prefix=/usr/local/mpich && \
    make -j$(nproc) && \
    make -j$(nproc) install && \
    rm -rf /var/tmp/mpich-3.3.2 /var/tmp/mpich-3.3.2.tar.gz
ENV LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH \
    PATH=/usr/local/mpich/bin:$PATH''')