<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear PETSc dev team,<div>   I am looking some tips porting petsc to windows. We have our mpi wrapper (so we can switch different mpi). I configure petsc using --with-mpi-lib and --with-mpi-include</div><div> ./configure --with-cc="win32fe cl" --with-fc=0 --download-f2cblaslapack --with-mpi-lib=/home/xianzhongg/dev/star/lib/win64/intel18.3vc14/lib/StarMpiWrapper.lib --with-mpi-include=/home/xianzhongg/dev/star/base/src/mpi/include --with-shared-libaries=1</div><div><br></div><div>But I got error</div><div>===============================================================================<br>             Configuring PETSc to compile on your system<br>===============================================================================<br>TESTING: check from config.libraries(config/BuildSystem/config/libraries.py:154)         *******************************************************************************<br>         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):<br>-------------------------------------------------------------------------------<br>--with-mpi-lib=['/home/xianzhongg/dev/star/lib/win64/intel18.3vc14/lib/StarMpiWrapper.lib'] and<br>--with-mpi-include=['/home/xianzhongg/dev/star/base/src/mpi/include'] did not work<br>*******************************************************************************</div><div><br></div><div>To fix the configuration error,  in config/BuildSystem/config/package.py, I removed </div><div> self.executeTest(self.checkDependencies)<br> self.executeTest(self.configureLibrary)<br> self.executeTest(self.checkSharedLibrary)</div><div><br></div><div>To link, I add my mpi wrapper to ${PTESTC_ARCH}/lib/petsc/conf/petscvariables:</div><div>PCC_LINKER_FLAGS =    -MD -wd4996 -Z7 /home/xianzhongg/dev/star/lib/win64/intel18.3vc14/lib/StarMpiWrapper.lib</div><div><br></div><div>I got libpetstc.dll and libpetstc.lib. When I try to test it inside our code, PETSc somehow crates a duplicate of communicator with only 1 MPI process and PETSC_COMM_WORLD is set to 2. If I set PETSC_COMM_WORLD to 1 (our MPI_COMM_WORLD), PETSc is hanging. </div><div><br></div><div>I am wondering if you could give me some tips how to debug this problem.</div><div><br></div><div>BR,</div><div>Sam</div></div></div></div></div></div></div></div>