-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libs update #668
Libs update #668
Changes from all commits
f65cb12
1b21980
8bb23bd
2f68d22
e1f7559
3049f9b
953740f
39801a2
cc061e9
e9336b6
4d9fafd
2d1808a
7b13f5d
9363195
7105c11
87438f1
738f7be
4013d18
2b7d531
14a36ca
35168b3
6b803c8
963e799
0ddd3d7
12f8b8d
3009fc7
5aa9965
47667ff
5ee01b1
5772ac7
f2bd9f1
37c530c
34951ff
daff8d2
de0f2e7
bf02102
6fddaf4
ae098e9
c4228c7
b82153d
aa06cc4
43f1214
d467373
0a9b646
7efb0fe
a3e3b1f
03d271c
b4467a2
9daaf3b
ffce408
a801d61
669f783
4944341
918f7f3
37b96f7
55a0588
f5777c9
74e5677
743b16d
3784f98
9ec1cf9
0ae9210
1906988
afee902
7b47eac
bd47412
e3b235a
730905e
2d456a3
602e5e8
309059b
7b1ef48
272629e
78ba72f
f8733df
06871a7
b1f9233
8d4ce41
2d5b1c6
7685502
cd0f15b
acf7aca
f475b14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
|
||
# fail if anything here fails | ||
set -e | ||
|
||
RAVEN_BUILD_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
echo Making RAVEN ... | ||
|
||
# defaults | ||
MAKE_ARGS=" " | ||
LIBS_MODE=0 # 0 is "create", 1 is "load" | ||
#### FUTURE WORK: | ||
#### combine "make" and "establish_conda_env.sh" into one installation command | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see ^ |
||
ECE_ARGS=" " | ||
|
||
# read arguments | ||
while test $# -gt 0 | ||
do | ||
case "$1" in | ||
--coverage) | ||
MAKE_ARGS="${MAKE_ARGS} coverage=true graceful=true" | ||
LIBS_MODE=1 | ||
;; | ||
--jobs) MAKE_ARGS="-j $1 ${MAKE_ARGS}" | ||
# --help) ECE_ARGS="${ECE_ARGS} --help"; ;; | ||
# --optional) ECE_ARGS="${ECE_ARGS} --optional"; ;; | ||
# --no-clean) ECE_ARGS="${ECE_ARGS} --no-clean"; ;; | ||
# --conda-defs) | ||
# shift | ||
# ECE_ARGS="${ECE_ARGS} --conda-defs $1" | ||
# ;; | ||
# --raven-libs-name) | ||
# shift | ||
# export RAVEN_LIBS_NAME="$1" | ||
# ;; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comments lines are for the future work? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, if it turns out we don't need to environment variable, it would be nice to work all through the command line in the future; however, this option didn't work for an undetermined reason previously. |
||
esac | ||
shift | ||
done | ||
#### END FUTURE WORK | ||
|
||
if [[ $LIBS_MODE == 0 ]]; then | ||
#### FUTURE WORK: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see ^ |
||
# clear .ravenrc | ||
#if [[ -f "$RAVEN_BUILD_DIR/.ravenrc" ]]; then | ||
# rm "$RAVEN_BUILD_DIR/.ravenrc" | ||
#fi | ||
|
||
# combining install script for python libs and make? | ||
#echo Establishing Python libraries ... | ||
#. scripts/establish_conda_env.sh --install ${ECE_ARGS} | ||
|
||
# identify python | ||
#echo python: `which python` | ||
#### END FUTURE WORK | ||
## remove when FUTURE WORK is in place | ||
echo Establishing Python libraries ... | ||
. scripts/establish_conda_env.sh --load ${ECE_ARGS} | ||
|
||
# clean up to assure library matching | ||
echo Cleaning old build ... | ||
make clean | ||
|
||
# set up hit.cpp so that it has a newer timestamp than hit.pyx | ||
touch moose/framework/contrib/hit/hit.cpp | ||
else | ||
echo Establishing Python libraries ... | ||
. scripts/establish_conda_env.sh --load ${ECE_ARGS} | ||
fi | ||
|
||
|
||
echo Making ... | ||
# make | ||
make ${MAKE_ARGS} | ||
|
||
echo ... done! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# fail if any of these commands fail | ||
set -e | ||
|
||
SCRIPT_DIRNAME=`dirname $0` | ||
SCRIPT_DIR=`(cd $SCRIPT_DIRNAME; pwd)` | ||
|
||
cd $SCRIPT_DIR/.. | ||
|
||
# activate raven libraries | ||
source $SCRIPT_DIR/../scripts/establish_conda_env.sh --load --quiet | ||
|
||
pylint --disable=all --enable=missing-docstring --enable=no-absolute-import --enable=old-division --enable=print-statement --enable=file-builtin --enable=multiple-statements framework/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
\subsection{Installing RAVEN} | ||
\label{sec:clone raven} | ||
|
||
Once the RAVEN dependencies have been installed and conda is present | ||
(see section \ref{sec:install overview}), the rest of RAVEN can be installed. | ||
|
||
The installation of RAVEN involves the following steps: | ||
\begin{itemize} | ||
\item Obtain the source code, | ||
\item Install the prerequisite Python libraries using conda, | ||
\item Compile | ||
\end{itemize} | ||
|
||
|
||
|
||
|
||
\subsubsection{Obtaining RAVEN Source Code} | ||
RAVEN is hosted publicly as a \texttt{Git} repo on \texttt{GitHub} | ||
and can be viewed at \url{https://github.com/idaholab/raven/wiki}. | ||
In the event that access to \texttt{GitHub} is impossible, contact the user list and other arrangements may be | ||
possible. In general, however, using the git repository assures the most consistent usage and update process. | ||
|
||
To clone RAVEN, navigate in a terminal to the desired destination, for example \texttt{~/projects}. Then run | ||
the commands | ||
\begin{lstlisting}[language=bash] | ||
git clone https://github.com/idaholab/raven.git | ||
cd raven | ||
git submodule update --init | ||
\end{lstlisting} | ||
This will obtain RAVEN as well as other submodules that RAVEN uses. In the future, whenever we declare a path | ||
starting with \texttt{raven/}, we refer to the cloned directory. | ||
|
||
|
||
|
||
|
||
\subsubsection{Installing Python Libraries} | ||
RAVEN depends heavily on Python, and uses conda to maintain a separate environment to prevent conflicts with | ||
other Python library installations. This separate environment is called \texttt{raven\_libraries}. | ||
|
||
In order to establish this environment, navigate to \texttt{raven}, then | ||
\begin{lstlisting}[language=bash] | ||
cd scripts | ||
./establish\_conda\_env.sh --install | ||
\end{lstlisting} | ||
Assure that there are no errors in this process, then continue to compiling RAVEN. | ||
|
||
\nb If \texttt{conda} is not installed in the default location, then the path to the conda definitions | ||
needs to be provided, for example | ||
\begin{lstlisting}[language=bash] | ||
cd scripts | ||
./establish\_conda\_env.sh --install --conda-defs /path/to/miniconda2/etc/profile.d/conda.sh | ||
\end{lstlisting} | ||
replacing \texttt{/path/to} with the install path for \texttt{conda}. | ||
|
||
|
||
|
||
|
||
\subsubsection{Compiling RAVEN} | ||
Once Python libraries are established and the source code present, navigate to \texttt{raven} and run | ||
\begin{lstlisting}[language=bash] | ||
./build_raven | ||
\end{lstlisting} | ||
This will compile several dependent libraries. This step has the highest potential for revealing problems in | ||
the operating system setup, particularly for Windows. See troubleshooting on the \wiki for help sorting out | ||
difficulties. | ||
|
||
|
||
|
||
|
||
\subsubsection{Testing RAVEN} | ||
\label{sec:testing raven} | ||
To test the installation of RAVEN, navigate to \texttt{raven}, then run the command | ||
\begin{lstlisting}[language=bash] | ||
./run_tests -j2 | ||
\end{lstlisting} | ||
where \texttt{-j2} signifies running with 2 processors. If more processors are available, this can be | ||
increased, but using all or more than all of the available processes can slow down the testing dramatically. | ||
This command runs RAVEN's regression tests, analytic tests, and unit tests. The number of tests changes | ||
frequently as the code's needs change, and the time taken to run the tests depends strongly on the number of | ||
processors and processor speed. | ||
|
||
At the end of the tests, a number passed, skipped, and failing will be reported. Having some skipped tests is | ||
expected; RAVEN has many tests that apply only to particular configurations or codes that are not present on | ||
all machines. However, no tests should fail; if there are problems, consult the troubleshooting section on | ||
the \wiki. | ||
|
||
|
||
\subsubsection{Updating RAVEN} | ||
RAVEN updates frequently, and new features are added while bugs are fixed on a regular basis. To update | ||
RAVEN, navigate to \texttt{raven}, then run the commands | ||
\begin{lstlisting}[language=bash] | ||
git pull | ||
./scripts/establish_conda_env.sh --install | ||
./build_raven | ||
\end{lstlisting} | ||
|
||
|
||
\subsubsection{In-use Testing} | ||
|
||
At any time, tests can be checked by re-running the installation tests as | ||
described in Section \ref{sec:testing raven}. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
\subsection{Conda: Python Dependencies} | ||
\label{sec:install conda} | ||
|
||
The standard installation procedure for RAVEN includes using Miniconda (often simply referred to as | ||
\emph{conda}) to install the Python libraries required to run RAVEN. If conda cannot be made available on an | ||
operating system, refer to the wiki (listed above) for alternatives. To install miniconda, follow the | ||
instructions for your operating system at \url{https://conda.io/miniconda.html}. | ||
|
||
\nb Since RAVEN currently relies | ||
on some Python 2.7-only libraries, make sure to install the 2.7 64-bit version of miniconda. | ||
|
||
Once conda is installed, proceed to installing RAVEN itself (section \ref{sec:clone raven}). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
\subsection{Linux Ubuntu Installation} | ||
\label{sec:install ubunutu} | ||
The following instructions are for installing RAVEN on a Linux machine running Ubuntu 16.04 or greater. Some | ||
explanations of alternatives for other Linux distributions may be provided on the \wiki. | ||
|
||
To install the prerequisite packages, the following terminal command should be executed (note this requires | ||
administrative privileges): | ||
|
||
\begin{lstlisting}[language=bash] | ||
sudo apt-get install libtool git python-dev swig g++ | ||
\end{lstlisting} | ||
|
||
\paragraph{Optional LateX installation} | ||
Optionally, if you want to be able to edit and rebuild the manuals, you can | ||
install \TeX~Live and its related packages: | ||
\begin{lstlisting}[language=bash] | ||
sudo apt-get install texlive-latex-base \ | ||
texlive-extra-utils texlive-latex-extra texlive-math-extra | ||
\end{lstlisting} | ||
|
||
Once the above are installed, proceed with installing conda (see section \ref{sec:install conda}). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
\subsection{Mac OSX Installation} | ||
\label{sec:install mac} | ||
|
||
When using an Apple Macintosh computer, software dependencies are met | ||
by following steps: | ||
\begin{itemize} | ||
\item Install the XCode command line tools from Apple, | ||
\item Install the XQuartz X-Window system server, | ||
\end{itemize} | ||
|
||
\subsubsection{Installing XCode Command Line Tools} | ||
|
||
The XCode command line tools package from Apple Computer provides the C++ | ||
compilers and git source code control tools needed to obtain and build RAVEN. | ||
It is freely available from the Apple store. In order to obtain it the following command should be launched in an open terminal: | ||
\begin{lstlisting}[language=bash] | ||
xcode-select --install | ||
\end{lstlisting} | ||
|
||
\subsubsection{Installing XQuartz} | ||
XQuartz is an implementation of the X Server for the Mac OSX operating system. | ||
XQuartz is freely available on the web and can be downloaded from the link | ||
\url{https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.9.dmg}. | ||
\\After downloaded, install the package. | ||
|
||
With XCode and XQuartz installed, continue on to install conda (see section \ref{sec:install conda}). | ||
|
||
\nb While \texttt{gcc} and | ||
\texttt{git} are also required, they are installed by default in the OSX system. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
% definitions | ||
|
||
% content | ||
\input{Installation/overview.tex} | ||
|
||
\input{Installation/linux.tex} | ||
\input{Installation/macosx.tex} | ||
\input{Installation/windows.tex} | ||
|
||
\input{Installation/conda.tex} | ||
|
||
\input{Installation/clone.tex} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
\section{Installation} | ||
\subsection{Overview} | ||
\label{sec:install overview} | ||
|
||
The installation of the RAVEN code is a straightforward procedure; | ||
depending on the usage purpose and machine architecture, the | ||
installation process slightly differs. | ||
|
||
In the following sections, the recommended installation procedure is outlined. For alternatives, we encourage | ||
checking the \wiki. The machines on which | ||
RAVEN is tested and developed, however, use the standard installation procedures outlined below. | ||
|
||
The installation process will involve three steps: | ||
\begin{itemize} | ||
\item Installing prerequisites, which depends on your operating system; | ||
\item Installing conda; | ||
\item Installing RAVEN. | ||
\end{itemize} | ||
|
||
Depending on your operating system (Windows in section \ref{sec:install windows}, MacOSX in section | ||
\ref{sec:install mac}, Ubuntu Linux in section \ref{sec:install ubunutu}), follow the instructions for installing prerequisites, then continue with | ||
installing conda (section \ref{sec:install conda}), and then installing RAVEN (section \ref{sec:clone raven}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add
fixme or todo
for the comments?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have an official use for TODO or FIXME; on the contrary, it's been suggested we do neither. The use of either of these right now is to flag developers that may want to edit the lines being commented. I don't think adding TODO or FIXME is a worthwhile change unless we define a real usage for them in our standards.