... | ... | @@ -21,13 +21,13 @@ Below presented minimalistic guide that uses only Visual Studio compiler and Mic |
|
|
Install Cygwin. When prompted to install Cygwin packages check Devel and Python packages to be installed.
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_1.png]]
|
|
|
![pic1](pics/compile_petsc_1.png)
|
|
|
|
|
|
|
|
|
In Windows Start menu search for Visual Studio Command Prompt or Visual Studio Win64 Command Prompt, depending on whether you want to generate 32-bit or 64-bit binaries.
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_2.png]]
|
|
|
![pic2](pics/compile_petsc_2.png)
|
|
|
|
|
|
|
|
|
From there run
|
... | ... | @@ -45,7 +45,7 @@ or if your Cygwin installation path is different |
|
|
Type and run `cl` command from appeared console, it should not complain that it cannot find any shared libraries.
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_3.png]]
|
|
|
![pic3](pics/compile_petsc_3.png)
|
|
|
|
|
|
|
|
|
Type `export PATH="/usr/bin:$PATH"` command in console. This will let you use Cygwin binaries. Notice that '/usr/bin' should go first, this will make Cygwin binaries prefferable over binaries with matching names.
|
... | ... | @@ -57,13 +57,13 @@ To avoid conflict between link.exe executables in Cygwin and Visual Studio run c |
|
|
Now switch to the petsc_source_dir directory. Type `bin/win32fe/win32fe.exe cl` it should return you some information on which flags can be passed to Visual Studio compiler. We just check that it works.
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_4.png]]
|
|
|
![pic4](pics/compile_petsc_4.png)
|
|
|
|
|
|
|
|
|
Now for win32fe.exe to be accessable from console type ``export PATH="$PATH:`pwd`/bin/win32fe"``. Check that you can run win32fe from console
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_5.png]]
|
|
|
![pic5](pics/compile_petsc_5.png)
|
|
|
|
|
|
|
|
|
Now we will run PETSc configure script. We will have to tell it where to find Microsoft MPI library. Typically it is installed to "C:\Program Files\Microsoft HPC Pack 2012\". Assuming this folder is correct type the command to run PETSc configuration script:
|
... | ... | @@ -79,13 +79,13 @@ Please note that there are also flags provided for compilers. First `-O2` flag t |
|
|
Be patient since configuration script takes quite a time. Once finished, PETSc script will provide you with some information on build options.
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_6.png]]
|
|
|
![pic6](pics/compile_petsc_6.png)
|
|
|
|
|
|
|
|
|
Copy and enter make command with PETSC_ARCH and PETSC_DIR as script output suggests you. You have to wait quite a while again while PETSc library is being built. Once finished, it will suggest you to run tests.
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_7.png]]
|
|
|
![pic7](pics/compile_petsc_7.png)
|
|
|
|
|
|
|
|
|
Fill free to skip this tests. Now you have finished with Cygwin, run command `mv /usr/bin/cygwin-link.exe /usr/bin/link.exe` to reverse changes we made before and you may close Cygwin console.
|
... | ... | @@ -103,13 +103,13 @@ Then click "Add Entry" button and add following entries: |
|
|
PETSC_DIR of type PATH path to the directory of petsc source code
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_8.png]]
|
|
|
![pic8](pics/compile_petsc_8.png)
|
|
|
|
|
|
|
|
|
PETSC_ARCH of type STRING describing platform for which PETSc was built
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_9.png]]
|
|
|
![pic9](pics/compile_petsc_9.png)
|
|
|
|
|
|
|
|
|
If you have installed Cygwin not in standard location (It is normally installed to "c:\cygwin" or "c:\cygwin64") then you will have to provide
|
... | ... | @@ -121,7 +121,7 @@ CYGWIN_INSTALL_PATH type PATH with the path to the directory where you have inst |
|
|
Now hit "Configure". Wait some time while PETSc run some tests and decide on compilable configuration. It should succeed at last.
|
|
|
|
|
|
|
|
|
[[pics/compile_petsc_10.png]]
|
|
|
![pic10](pics/compile_petsc_10.png)
|
|
|
|
|
|
|
|
|
Now click "Generate", reopen Visual Studio with INMOST library and rebuild it.
|
... | ... | |