Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • I INMOST
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Terekhov
  • INMOST
  • Wiki
  • 0206 Compilation PETSc Windows

0206 Compilation PETSc Windows · Changes

Page history
change pic link authored Aug 30, 2018 by Kirill Terekhov's avatar Kirill Terekhov
Show whitespace changes
Inline Side-by-side
0206-Compilation-PETSc-Windows.md
View page @ 9c6e1e0b
...@@ -21,13 +21,13 @@ Below presented minimalistic guide that uses only Visual Studio compiler and Mic ...@@ -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. 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. 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 From there run
...@@ -45,7 +45,7 @@ or if your Cygwin installation path is different ...@@ -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. 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. 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 ...@@ -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. 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 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: 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 ...@@ -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. 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. 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. 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: ...@@ -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 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 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 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 ...@@ -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. 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. Now click "Generate", reopen Visual Studio with INMOST library and rebuild it.
......
Clone repository
  • 0100 Compilation
  • 0200 Compilation Windows
  • 0201 Obtain MSVC
  • 0202 Obtain MSMPI
  • 0203 Compilation INMOST Windows
  • 0204 Compilation ParMETIS Windows
  • 0205 Compilation Zoltan Windows
  • 0206 Compilation PETSc Windows
  • 0207 Compilation Trilinos Windows
  • 0400 Compilation Linux
  • 0401 Install MPI
  • 0402 Compilation INMOST Linux
  • 0403 Compilation PETSc Linux
  • 0404 Compilation Trilinos Linux
  • 0405 Compilation ParMETIS Linux
View All Pages