You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/UserGuide/userguide.tex
+61-52Lines changed: 61 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@
131
131
%\title{Open Source Risk Engine \\ User Guide }
132
132
\title{ORE User Guide}
133
133
\author{Acadia Inc.}
134
-
\date{13 March 2023}
134
+
\date{31 March 2023}
135
135
\maketitle
136
136
137
137
\newpage
@@ -152,7 +152,7 @@ \section*{Document History}
152
152
30 June 2021 & Acadia & updates for release 6\\
153
153
16 September 2022 & Acadia & updates for release 7\\
154
154
6 December 2022 & Acadia & updates for release 8\\
155
-
13 March 2023 & Acadia & updates for release 9\\
155
+
31 March 2023 & Acadia & updates for release 9\\
156
156
\hline
157
157
\end{supertabular}
158
158
\end{center}
@@ -709,9 +709,9 @@ \subsubsection*{Generate Visual Studio Projects with CMake}
709
709
\item Run CMake command:
710
710
\begin{itemize}
711
711
\item 32-bit: \\
712
-
{\tt cmake -G "Visual Studio 17 2022" -A x64 -DBOOST\_INCLUDEDIR=\%BOOST\% -DBOOST\_LIBRARYDIR=\%BOOST\_LIB64\% -DMSVC\_LINK\_DYNAMIC\_RUNTIME=true -B build}
712
+
{\tt cmake -G "Visual Studio 17 2022" -A x64 -DBOOST\_INCLUDEDIR=\%BOOST\% -DBOOST\_LIBRARYDIR=\%BOOST\_LIB64\% -DQL\_ENABLE\_SESSIONS=ON -DMSVC\_LINK\_DYNAMIC\_RUNTIME=true -B build}
713
713
\item 64-bit: \\
714
-
{\tt cmake -G "Visual Studio 17 2022" -A x32 -DBOOST\_INCLUDEDIR=\%BOOST\% -DBOOST\_LIBRARYDIR=\%BOOST\_LIB32\% -DMSVC\_LINK\_DYNAMIC\_RUNTIME=true -B build}
714
+
{\tt cmake -G "Visual Studio 17 2022" -A x32 -DBOOST\_INCLUDEDIR=\%BOOST\% -DBOOST\_LIBRARYDIR=\%BOOST\_LIB32\% -DQL\_ENABLE\_SESSIONS=ON -DMSVC\_LINK\_DYNAMIC\_RUNTIME=true -B build}
715
715
\end{itemize}
716
716
Replace the generator "Visual Studio 17 2022" with the actual installed version.
717
717
The solution and project files will be generated in the {\tt $\langle$ORE\_ROOT$\rangle${\bs}build} subdirectory.
@@ -725,13 +725,18 @@ \subsubsection*{Unix}
725
725
With the 5th release we have discontinued automake support so that ORE can only be built with CMake on Unix systems, as follows.
726
726
727
727
\begin{enumerate}
728
-
\item Change to the ORE project directory that contains the {\tt QuantLib}, {\tt QuantExt}, etc, folders; create subdirectory {\tt build} and change to subdirectory {\tt build}
728
+
\item set environment variable to locate the boost include and boost library directories\\
729
+
\medskip
730
+
{\tt export BOOST\_LIB=path/to/boost/lib}\\
731
+
{\tt export BOOST\_INC=path/to/boost/include}
732
+
\medskip
733
+
\Item Change to the ORE project directory that contains the {\tt QuantLib}, {\tt QuantExt}, etc, folders; create subdirectory {\tt build} and change to subdirectory {\tt build}
This will create \%DEMO\_ORE\_DIR\%{\bs}build{\bs}OREAnalytics{\bs}orea{\bs}Release{\bs}OREAnalytics-x64-mt.lib
986
+
This will create \%ORE\%{\bs}build{\bs}OREAnalytics{\bs}orea{\bs}Release{\bs}OREAnalytics-x64-mt.lib
981
987
982
988
\subsubsection*{Build ORE-SWIG Wrapper and Wheel}
983
989
984
990
In contrast to the generic cmake-based SWIG build in section \ref{sec:oreswig}, we are now resorting to python's setup.py.
985
991
986
992
\medskip
987
-
{\tt cd \%DEMO\_ORE\_SWIG\_DIR\%{\bs}OREAnalytics-SWIG{\bs}Python} \\
988
-
{\tt set BOOST\_ROOT=\%DEMO\_BOOST\_ROOT\%} \\
989
-
{\tt set BOOST\_LIB=\%DEMO\_BOOST\_LIB\%} \\
990
-
{\tt set ORE\_DIR=\%DEMO\_ORE\_DIR\%} \\
991
-
{\tt set PATH=\%PATH\%;\%DEMO\_SWIG\_DIR\%} \\
993
+
{\tt cd \%ORESWIG\%{\bs}OREAnalytics-SWIG{\bs}Python} \\
994
+
{\tt set BOOST\_ROOT=\%BOOST\_INC\%} \\
995
+
% set BOOST_LIB is needed but already done above
996
+
% set ORE needed but already done above
997
+
{\tt set PATH=\%PATH\%;\%SWIG\%} \\
992
998
{\tt set ORE\_STATIC\_RUNTIME=1} \\
993
999
{\tt python setup.py wrap} \\
994
1000
{\tt python setup.py build} \\
@@ -1001,7 +1007,7 @@ \subsubsection*{Build ORE-SWIG Wrapper and Wheel}
1001
1007
\item the Python module and static library in folder {\tt <PATH>{\bs}build{\bs}lib.win-amd64-cpython-310} (the directory name depends on the machine and python version)
1002
1008
\item the wheel file (filename.whl) in folder {\tt <PATH>{\bs}dist}
1003
1009
\end{itemize}
1004
-
where {\tt <PATH>}stands for {\tt \%DEMO\_ORE\_SWIG\_DIR\%{\bs}OREAnalytics-SWIG{\bs}Python}.
1010
+
where {\tt <PATH>}stands for {\tt \%ORESWIG\%{\bs}OREAnalytics-SWIG{\bs}Python}.
Ensure that environent variables ORE, BOOST\_INC and BOOST\_LIB are set (see above), then
1100
1102
1101
1103
\medskip
1102
-
will then generate the wheel file (filename.whl) in folder \$DEMO\_ORE\_SWIG\_DIR/OREAnalytics-SWIG/Python/dist.
1104
+
{\tt cd \$ORESWIG/OREAnalytics-SWIG/Python} \\
1105
+
{\tt python setup.py wrap} \\
1106
+
{\tt python setup.py build} \\
1107
+
{\tt python -m build -{}-wheel}
1108
+
1109
+
\medskip
1110
+
will then generate the wheel file (filename.whl) in folder \$ORESWIG/OREAnalytics-SWIG/Python/dist.
1111
+
For the second step above you may need to modify the \$ORESWIG/OREAnalytics-SWIG/oreanalytics-config script to return the appropriate cflags and libs on your machine.
1103
1112
1104
1113
\medskip
1105
1114
To use the wheel:
1106
1115
1107
1116
\medskip
1108
-
{\tt cd \$DEMO\_ORE\_SWIG\_DIR/OREAnalytics-SWIG/Python/Examples} \\
1109
-
{\tt python3 -m venv env1} \\
1117
+
{\tt cd \$ORESWIG/OREAnalytics-SWIG/Python/Examples} \\
0 commit comments