1. Don't use Windows style git such as TortoiseGit. Use git of msys2.
2. Specify your MPI environment by --with-mpi-include=<your mpi include folder> and --with-mpi-lib=<your mpi library>
3. Don't use ar in /mingw64/bin/ar by specify --with-ar=/usr/bin/ar
4. Set the gfortran compiler option by 'FOPTFLAGS=-fno-range-check'
The python script would something like:
#!/usr/bin/env python2
configure_options = [
'--with-mpi-include=/mingw64/include',
'--with-mpi-lib=/mingw64/lib/libmsmpi.a',
'--with-ar=/usr/bin/ar' ,
'--with-shared-libraries=0',
'--with-debugging=0',
'--with-visibility=0',
'--prefix=/usr/local/petsc',
'FOPTFLAGS=-O3 -fno-range-check',
]
if __name__ == '__main__':
import sys,os
sys.path.insert(0,os.path.abspath('config'))
import configure
configure.petsc_configure(configure_options)
5. Don't use python in /usr/bin/python other than /mingw/bin/python
e.g. runing the above script by type in > /usr/bin/python <your python script name>
Compilation of PETSc3.8.2 tests successfully!
Hello, can you send me a static library package of PETSC compiled by you? If so, thank you very much
回复删除