Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Apr 22, 2023
1 parent 0a3d436 commit 2a7b023
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
16 changes: 9 additions & 7 deletions documentation/python_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ Some general remarks:
Using the Microsoft Visual Studio
---------------------------------

.. note:: Support for MSVC is experimental.

We assume that Visual Studio (not to be confused with Visual Studio Code)
is already installed. Using Visual Studio Installer, the following components
need to be included:
Expand All @@ -116,14 +114,16 @@ need to be included:
This is part of multiple packages, including Desktop Development with C++.
* Windows Universal C Runtime.
This is an individual component and installs some DLLs that we need.
* cmake
This is need to build OpenBLAS. Available at https://cmake.org/download/

OpenBLAS
^^^^^^^^

There are prebuilt OpenBLAS binaries available, but they did not seem to work
well here. Therefore, we recommend building OpenBLAS from scratch.
well here. Therefore, we recommend building OpenBLAS from scratch. This
requires an installation of CMake. CMake can be installed from
https://cmake.org/download/ (system-wide), or via ``pip install cmake``
(in the current Python environment).


To build OpenBLAS, download the following scripts from the AMICI repository:

Expand All @@ -135,8 +135,10 @@ The first script needs to be called in Powershell, and it needs to call

cmd /c "scripts\compileBLAS.cmd $version"

Additionally, in ``compileBLAS.cmd`` make sure that you point to your Visual Studio installation on line 3.
Newer installations could be located under ``C:\Program Files\Microsoft Visual Studio\...\VC\Auxiliary\Build\vcvars64.bat"``.
Additionally, in ``compileBLAS.cmd`` make sure that you point to your
Visual Studio installation on line 3.
Newer installations could be located under
``C:\Program Files\Microsoft Visual Studio\...\VC\Auxiliary\Build\vcvars64.bat``.

so that it matches your directory structure.
This will download OpenBLAS and compile it, creating
Expand Down
8 changes: 4 additions & 4 deletions swig/amici.i
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import_array();
%pythoncode %{
def __repr__(self):
return self.this.__repr__()[:-1] + '; ' + repr(np.asarray(self, dtype=np.float64)) + ' >'

%}
};
%template(IntVector) std::vector<int>;
Expand Down Expand Up @@ -330,13 +330,13 @@ def __repr__(self):
import sys
import os

if sys.platform == 'win32' and os.environ.get('AMICI_DLL_DIRS', ''):
for dll_dir in os.environ.get("AMICI_DLL_DIRS", "").split(os.pathsep):
if sys.platform == 'win32' and (dll_dirs := os.environ.get('AMICI_DLL_DIRS')):
for dll_dir in dll_dirs.split(os.pathsep):
os.add_dll_directory(dll_dir)

%}

// import additional types for typehintsn
// import additional types for typehints
// also import np for use in __repr__ functions
%pythonbegin %{
from typing import TYPE_CHECKING, Iterable, List, Tuple, Sequence
Expand Down

0 comments on commit 2a7b023

Please sign in to comment.