-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2439ba6
commit a51429f
Showing
52 changed files
with
4,525 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
# whitelist things to copy | ||
!CMakeLists.txt | ||
!doc/ | ||
!docker/ | ||
!src/ | ||
!test/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
FROM fedora:27 | ||
|
||
RUN dnf -y update \ | ||
&& dnf install -y sudo \ | ||
&& adduser test_user \ | ||
&& echo "test_user ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/test_user \ | ||
&& chmod 0440 /etc/sudoers.d/test_user | ||
|
||
USER test_user | ||
WORKDIR /home/test_user | ||
|
||
RUN sudo dnf -y install \ | ||
openmpi-devel \ | ||
gcc-gfortran \ | ||
gcc-c++ \ | ||
gsl-devel \ | ||
metis-devel \ | ||
lapack-devel \ | ||
openblas-devel \ | ||
cmake \ | ||
&& sudo dnf clean all | ||
ENV PATH="${PATH}:/usr/lib64/openmpi/bin/" | ||
|
||
# Build the SuiteSparse libraries for sparse matrix support | ||
RUN curl -kLO http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-5.1.0.tar.gz \ | ||
&& tar -zxvf SuiteSparse-5.1.0.tar.gz \ | ||
&& export CXX=/usr/bin/cc \ | ||
&& cd SuiteSparse \ | ||
&& sudo make install INSTALL=/usr/local BLAS="-L/lib64 -lopenblas" | ||
|
||
# Install json-fortran | ||
RUN curl -LO https://github.com/jacobwilliams/json-fortran/archive/6.1.0.tar.gz \ | ||
&& tar -zxvf 6.1.0.tar.gz \ | ||
&& cd json-fortran-6.1.0 \ | ||
&& export FC=gfortran \ | ||
&& mkdir build \ | ||
&& cd build \ | ||
&& cmake -D SKIP_DOC_GEN:BOOL=TRUE .. \ | ||
&& sudo make install | ||
|
||
# NOTE: Modify .dockerignore to whitelist files/directories to copy. | ||
COPY . /home/test_user/camp/ | ||
|
||
# Install a modified version of CVODE | ||
RUN tar -zxvf /home/test_user/camp/cvode-3.4-alpha.tar.gz \ | ||
&& cd cvode-3.4-alpha \ | ||
&& mkdir build \ | ||
&& cd build \ | ||
&& cmake -D CMAKE_BUILD_TYPE=release \ | ||
-D CMAKE_C_FLAGS_DEBUG="-g -pg" \ | ||
-D CMAKE_EXE_LINKER_FLAGS_DEBUG="-pg" \ | ||
-D CMAKE_MODULE_LINKER_FLAGS_DEBUG="-pg" \ | ||
-D CMAKE_SHARED_LINKER_FLAGS_DEBUG="-pg" \ | ||
-D KLU_ENABLE:BOOL=TRUE \ | ||
-D KLU_LIBRARY_DIR=/usr/local/lib \ | ||
-D KLU_INCLUDE_DIR=/usr/local/include \ | ||
.. \ | ||
&& sudo make install | ||
|
||
# Update environment variables | ||
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64:/usr/local/jsonfortran-gnu-6.1.0/lib" | ||
ENV PATH="${PATH}:/usr/local/jsonfortran-gnu-6.1.0/lib" | ||
|
||
# Build CAMP | ||
RUN mkdir build \ | ||
&& cd build \ | ||
&& export JSON_FORTRAN_HOME="/usr/local/jsonfortran-gnu-6.1.0" \ | ||
&& cmake -D CMAKE_BUILD_TYPE=release \ | ||
-D CMAKE_C_FLAGS_DEBUG="-g -pg" \ | ||
-D CMAKE_Fortran_FLAGS_DEBUG="-g -pg" \ | ||
-D CMAKE_MODULE_LINKER_FLAGS="-pg" \ | ||
-D ENABLE_DEBUG:BOOL=TRUE \ | ||
-D ENABLE_MPI:BOOL=TRUE \ | ||
-D CMAKE_Fortran_COMPILER=/usr/lib64/openmpi/bin/mpif90 \ | ||
../camp \ | ||
&& make \ | ||
&& sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.