Package: carolina
CarolinaCarolina is apyDAKOTAfork maintained by Equinor.  Its raison d'être is to have easier building of a PythonDakotawrapper, without any MPI support. Carolina supports Python version 3.8, 3.9, 3.10, 3.11, 3.12InstallationFor Linux and MacOS:pip install carolinaOtherwise, build Carolina youself as described below.Building and installing CarolinaIn order to build Carolina,Boost, including Boost.Python, andDakotamust be installed. This requiresCMakeand a C/C++ compiler. It is recommended to check the build scripts at.github/workflows/bundle_with_dakota_*where the full installation is described. The installation will likely vary across different operating systems. Roughly speaking, the following steps must be done:Install CMAKEInstall Boost with correct python version (NOTE: you may need to edit the python version into the project-config.jam if on MacOS, see the excerpt from the MacOS install script below)python_version=$(python--version|sed-E's/.*([0-9]+\.[0-9]+)\.([0-9]+).*/\1/')python_bin_include_lib="    using python :$python_version:$(python-c"from sysconfig import get_paths as gp; g=gp(); print(f\"$(whichpython): {g['include']} : {g['stdlib']} ;\")")"sed-i''"s|.*using python.*|$python_bin_include_lib|"project-config.jamInstall dakotaafter downloading, replace<DAKOTA_VERSION>with the dakota version, for example 6.18In order to install Dakota to a specific folder, use-DCMAKE_INSTALL_PREFIX="<INSTALL_DIR>"as part of the cmake invocation.cddakota-<DAKOTA_VERSION>-public-src-cli
mkdir-pbuildcdbuild
cmake\-DCMAKE_CXX_STANDARD=14\-DBUILD_SHARED_LIBS=ON\-DDAKOTA_PYTHON_DIRECT_INTERFACE=ON\-DDAKOTA_PYTHON_DIRECT_INTERFACE_NUMPY=ON\-DDAKOTA_DLL_API=OFF\-DHAVE_X_GRAPHICS=OFF\-DDAKOTA_ENABLE_TESTS=OFF\-DDAKOTA_ENABLE_TPL_TESTS=OFF\-DCMAKE_BUILD_TYPE='Release'\-DDAKOTA_NO_FIND_TRILINOS:BOOL=TRUE\..
make-j4installThis step is the one that might be the most tricky to get working on your local OS. It expects a number of packages to be found, includinglibgfortran,eigen,lapack,numpy, and for the appropriate libraries to be onLD_LIBRARY_PATH(linux)/DYLD_LIBRARY_PATH(MacOS). Build errors often arise from (1) the package not being installed or (2) library folders/files of the installed package not being on the library path (LD_LIBRARY_PATHfor linux  orDYLD_LIBRARY_PATHfor MacOS).After installing Dakota, it is possible to runpip install .as it will look for the following environment variables:TheBOOST_ROOTenvironment variable can be set to the location of the boost library containing the foldersincludeandlib, if they are not already included globally.TheBOOST_PYTHONcan be set if a given version ofboost_pythonis needed. For instance if Python 3.8 is to be used:exportBOOST_PYTHON=boost_python38By default the installation script will try to guess theboost_pythonversion from the minor version of Python, i.e. for Python 3.10, it will tryboost_python310.It also expectsdakotabinary executable to be on the systemPATH. To verify this, see if you can typedakotain the terminal and run it without errors. Then, try start up python and see if you canimport dakota. If these two "tests" pass, you should be able to install Carolina.Carolina can then be installed with:pipinstall.The library can then be tested by entering the tests directory and execute:pytestIn the case of testing newer versions of Dakota, scripts can be found in the script folder.Carolina requires Dakota 6.18, but will work with older versions as well.
Pathes can be reverted to allow for building against versions prior to 6.13 or 6.16.From Dakota version 6.13 a different set of boost libraries is needed: instead ofboost_signals,boost_program_optionsis used.
From Dakota version 6.16 a small change was made in the Python interface.
From Dakota version 6.18 a file was removed from the source and build script was altered.