<div dir="ltr"><div dir="ltr">On Thu, Aug 29, 2019 at 3:33 PM Sam Guo via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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></div></div></div></div></div></div></blockquote><div><br></div><div>Your MPI wrapper should pass the tests here. Send the configure.log</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><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></div></div></div></div></div></div></blockquote><div><br></div><div>We do dup the communicator on entry. Shouldn't that be supported by your wrapper?</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>