Skip to content

Commit

Permalink
Merge pull request #241 from sony/feature/20200720-nbla-train-h5
Browse files Browse the repository at this point in the history
Upgrade gcc to 4.9.2
  • Loading branch information
YukioOobuchi authored Aug 24, 2020
2 parents 876646f + 2c6271b commit 5b5c645
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 2 deletions.
17 changes: 17 additions & 0 deletions docker/development/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,24 @@ RUN yum install -y \
which \
zip \
zlib-static \
libmpc-devel \
mpfr-devel \
gmp-devel \
&& yum group install -y "Development Tools" \
&& yum clean all

################################################### gcc
RUN mkdir /tmp/deps \
&& cd /tmp/deps \
&& wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 \
&& tar xfj gcc-4.9.2.tar.bz2 \
&& cd gcc-4.9.2 \
&& ./configure --disable-multilib --enable-languages=c,c++ \
&& make -j8 \
&& make install \
&& cd / \
&& rm -rf /tmp/*

############################################################# cmake
ARG CMAKEVER=3.14.3
RUN mkdir /tmp/deps \
Expand Down Expand Up @@ -146,3 +161,5 @@ RUN umask 0 \

ENV PATH /opt/miniconda3/envs/nnabla-build/bin:$PATH
ENV LD_LIBRARY_PATH /opt/miniconda3/envs/nnabla-build/lib:$LD_LIBRARY_PATH
ENV CC /usr/local/bin/gcc
ENV CXX /usr/local/bin/g++
17 changes: 17 additions & 0 deletions docker/development/Dockerfile.build-mpi
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,24 @@ RUN yum install -y \
which \
zip \
zlib-static \
libmpc-devel \
mpfr-devel \
gmp-devel \
&& yum group install -y "Development Tools" \
&& yum clean all

################################################### gcc
RUN mkdir /tmp/deps \
&& cd /tmp/deps \
&& wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 \
&& tar xfj gcc-4.9.2.tar.bz2 \
&& cd gcc-4.9.2 \
&& ./configure --disable-multilib --enable-languages=c,c++ \
&& make -j8 \
&& make install \
&& cd / \
&& rm -rf /tmp/*

############################################################# cmake
ARG CMAKEVER=3.14.3
RUN mkdir /tmp/deps \
Expand Down Expand Up @@ -183,3 +198,5 @@ RUN umask 0 \

ENV PATH /opt/miniconda3/envs/nnabla-build/bin:$PATH
ENV LD_LIBRARY_PATH /opt/miniconda3/envs/nnabla-build/lib:$LD_LIBRARY_PATH
ENV CC /usr/local/bin/gcc
ENV CXX /usr/local/bin/g++
17 changes: 17 additions & 0 deletions docker/development/Dockerfile.build-mpi-ppc64le
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,24 @@ RUN yum install -y \
which \
zip \
zlib-static \
libmpc-devel \
mpfr-devel \
gmp-devel \
&& yum group install -y "Development Tools" \
&& yum clean all

################################################### gcc
RUN mkdir /tmp/deps \
&& cd /tmp/deps \
&& wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 \
&& tar xfj gcc-4.9.2.tar.bz2 \
&& cd gcc-4.9.2 \
&& ./configure --disable-multilib --enable-languages=c,c++ \
&& make -j8 \
&& make install \
&& cd / \
&& rm -rf /tmp/*

############################################################# cmake
ARG CMAKEVER=3.14.3
RUN mkdir /tmp/deps \
Expand Down Expand Up @@ -174,3 +189,5 @@ RUN umask 0 \

ENV PATH /opt/miniconda3/envs/nnabla-build/bin:$PATH
ENV LD_LIBRARY_PATH /opt/miniconda3/envs/nnabla-build/lib:$LD_LIBRARY_PATH
ENV CC /usr/local/bin/gcc
ENV CXX /usr/local/bin/g++
17 changes: 17 additions & 0 deletions docker/development/Dockerfile.build-ppc64le
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,24 @@ RUN yum install -y \
which \
zip \
zlib-static \
libmpc-devel \
mpfr-devel \
gmp-devel \
&& yum group install -y "Development Tools" \
&& yum clean all

################################################### gcc
RUN mkdir /tmp/deps \
&& cd /tmp/deps \
&& wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 \
&& tar xfj gcc-4.9.2.tar.bz2 \
&& cd gcc-4.9.2 \
&& ./configure --disable-multilib --enable-languages=c,c++ \
&& make -j8 \
&& make install \
&& cd / \
&& rm -rf /tmp/*

############################################################# cmake
ARG CMAKEVER=3.14.3
RUN mkdir /tmp/deps \
Expand Down Expand Up @@ -137,3 +152,5 @@ RUN umask 0 \

ENV PATH /opt/miniconda3/envs/nnabla-build/bin:$PATH
ENV LD_LIBRARY_PATH /opt/miniconda3/envs/nnabla-build/lib:$LD_LIBRARY_PATH
ENV CC /usr/local/bin/gcc
ENV CXX /usr/local/bin/g++
6 changes: 4 additions & 2 deletions src/nbla/cuda/cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ std::shared_ptr<cudaEvent_t> Cuda::cuda_event(unsigned int flags, int device) {
auto all_events = this->cuda_unused_events_.find(device);
if (all_events == this->cuda_unused_events_.end()) {
/* Insert an empty set if there is no set corresponding to the device. */
this->cuda_unused_events_.insert({device, {}});
this->cuda_unused_events_.insert(
{device, unordered_map<unsigned int, vector<cudaEvent_t>>()});
all_events = this->cuda_unused_events_.find(device);
}

Expand Down Expand Up @@ -108,7 +109,8 @@ std::shared_ptr<cudaEvent_t> Cuda::cuda_event(unsigned int flags, int device) {
std::lock_guard<decltype(this->mtx_event_)> lock(this->mtx_event_);
auto all_events = this->cuda_unused_events_.find(device);
if (all_events == this->cuda_unused_events_.end()) {
this->cuda_unused_events_.insert({device, {}});
this->cuda_unused_events_.insert(
{device, unordered_map<unsigned int, vector<cudaEvent_t>>()});
all_events = this->cuda_unused_events_.find(device);
}

Expand Down

0 comments on commit 5b5c645

Please sign in to comment.