<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Barry,</p>
    <p>Ops, which dir should I run <i class=""><b class="">export
          PETSC_DIR=`pwd`</b></i><i class=""><b class=""><br>
        </b></i></p>
    <p><span class=""><span class="">Maybe </span></span><span class=""><span
          class="">I ran it </span></span><span class=""><span class="">wrongly
          initially at where the lib is stored: <i><b>/cygdrive/d/Lib/petsc-3.15.0_win64_impi_vs2017/</b></i></span></span><i
        class=""><b class=""><br class="">
        </b></i></p>
    <p>My source is at</p>
    <p><i><b>/cygdrive/d/wtay/Downloads/Source_codes/petsc-3.15.0</b></i></p>
    <p>Now I ran:</p>
    <p><i><b>export PETSC_DIR=`pwd`</b></i><i><b><br>
        </b></i><i><b>cd src/ksp/ksp/tutorials/</b></i><i><b><br>
        </b></i><i><b>make ex2f</b></i></p>
    <p><i><b>/cygdrive/d/wtay/Downloads/Source_codes/petsc-3.15.0/lib/petsc/bin/win32fe/win32fe
          ifort -MD -Z7 -fpp  -MD -Z7 -fpp  
          -I/cygdrive/d/wtay/Downloads/Source_codes/petsc-3.15.0/include
          -I/cygdrive/d/wtay/Downloads/S</b></i><i><b><br>
        </b></i><i><b>ource_codes/petsc-3.15.0/petsc-3.15.0_win64_impi_vs2017/include
          -I/cygdrive/c/Program\ Files\
          \(x86\)/Intel/oneAPI/mpi/latest/include     ex2f.F90 
          -R/cygdrive/d/wtay/Downloads/Source_codes/petsc-3.15.0/petsc-3.</b></i><i><b><br>
        </b></i><i><b>15.0_win64_impi_vs2017/lib
-L/cygdrive/d/wtay/Downloads/Source_codes/petsc-3.15.0/petsc-3.15.0_win64_impi_vs2017/lib
          -R/cygdrive/d/Lib/petsc-3.15.0_win64_impi_vs2017/lib
          -L/cygdrive/d/Lib/petsc-3.15.0_win64_impi</b></i><i><b><br>
        </b></i><i><b>_vs2017/lib -lpetsc -lflapack -lfblas
          /cygdrive/c/Program\ Files\
          \(x86\)/Intel/oneAPI/mpi/latest/lib/debug/impi.lib
          /cygdrive/c/Program\ Files\
          \(x86\)/Intel/oneAPI/mpi/latest/lib/debug/impicxx.lib
          /cygdrive/c/</b></i><i><b><br>
        </b></i><i><b>Program\ Files\
          \(x86\)/Intel/oneAPI/mpi/latest/lib/libmpi_ilp64.lib Gdi32.lib
          User32.lib Advapi32.lib Kernel32.lib Ws2_32.lib -o ex2f</b></i><i><b><br>
        </b></i><i><b>ifort: command line warning #10006: ignoring
          unknown option
'/R/cygdrive/d/wtay/Downloads/Source_codes/petsc-3.15.0/petsc-3.15.0_win64_impi_vs2017/lib'</b></i><i><b><br>
        </b></i><i><b>ifort: command line warning #10006: ignoring
          unknown option
          '/R/cygdrive/d/Lib/petsc-3.15.0_win64_impi_vs2017/lib'</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(80): error #6405: The same named entity
          from different modules and/or program units cannot be
          referenced.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call
          MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)</b></i><i><b><br>
        </b></i><i><b>-------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(80): error #7112: This actual argument
          must not be the name of a procedure.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call
          MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)</b></i><i><b><br>
        </b></i><i><b>-------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(81): error #6405: The same named entity
          from different modules and/or program units cannot be
          referenced.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call
          MPI_Comm_size(PETSC_COMM_WORLD,size,ierr)</b></i><i><b><br>
        </b></i><i><b>-------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(81): error #7112: This actual argument
          must not be the name of a procedure.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call
          MPI_Comm_size(PETSC_COMM_WORLD,size,ierr)</b></i><i><b><br>
        </b></i><i><b>-------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(93): error #6405: The same named entity
          from different modules and/or program units cannot be
          referenced.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call MatCreate(PETSC_COMM_WORLD,A,ierr)</b></i><i><b><br>
        </b></i><i><b>---------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(93): error #7112: This actual argument
          must not be the name of a procedure.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call MatCreate(PETSC_COMM_WORLD,A,ierr)</b></i><i><b><br>
        </b></i><i><b>---------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(159): error #6405: The same named entity
          from different modules and/or program units cannot be
          referenced.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call
          VecCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,m*n,u,ierr)</b></i><i><b><br>
        </b></i><i><b>------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(159): error #7112: This actual argument
          must not be the name of a procedure.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call
          VecCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,m*n,u,ierr)</b></i><i><b><br>
        </b></i><i><b>------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(171): error #6405: The same named entity
          from different modules and/or program units cannot be
          referenced.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>         call
          PetscRandomCreate(PETSC_COMM_WORLD,rctx,ierr)</b></i><i><b><br>
        </b></i><i><b>--------------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(171): error #7112: This actual argument
          must not be the name of a procedure.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>         call
          PetscRandomCreate(PETSC_COMM_WORLD,rctx,ierr)</b></i><i><b><br>
        </b></i><i><b>--------------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(193): error #6405: The same named entity
          from different modules and/or program units cannot be
          referenced.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call KSPCreate(PETSC_COMM_WORLD,ksp,ierr)</b></i><i><b><br>
        </b></i><i><b>---------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(193): error #7112: This actual argument
          must not be the name of a procedure.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call KSPCreate(PETSC_COMM_WORLD,ksp,ierr)</b></i><i><b><br>
        </b></i><i><b>---------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(319): error #6405: The same named entity
          from different modules and/or program units cannot be
          referenced.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call
          MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)</b></i><i><b><br>
        </b></i><i><b>-------------------------^</b></i><i><b><br>
        </b></i><i><b>ex2f.F90(319): error #7112: This actual argument
          must not be the name of a procedure.   [PETSC_COMM_WORLD]</b></i><i><b><br>
        </b></i><i><b>      call
          MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)</b></i><i><b><br>
        </b></i><i><b>-------------------------^</b></i><i><b><br>
        </b></i><i><b>compilation aborted for ex2f.F90 (code 1)</b></i><i><b><br>
        </b></i><i><b>make: ***
[/cygdrive/d/wtay/Downloads/Source_codes/petsc-3.15.0/lib/petsc/conf/test:23:
          ex2f] Error 1</b></i></p>
    <p><br>
    </p>
    <p>I have also attached the "<i><b>make check</b></i>" output. Seems
      like there's problem with fortran compile.<br>
    </p>
    <div class="moz-signature">
      <p>Thank you very much.<br>
        <br>
        Yours sincerely,<br>
        <br>
        ================================================<br>
        TAY Wee-Beng 郑伟明 (Zheng Weiming)<br>
        Personal research webpage: <font color="#3366ff"><u><a class="moz-txt-link-freetext" href="http://tayweebeng.wixsite.com/website">http://tayweebeng.wixsite.com/website</a></u></font><br>
        Youtube research showcase: <u><font color="#3366ff"><a class="moz-txt-link-freetext" href="https://goo.gl/PtvdwQ">https://goo.gl/PtvdwQ</a></font></u><br>
        linkedin: <u><font color="#3366ff"><a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/tay-weebeng">https://www.linkedin.com/in/tay-weebeng</a></font></u><br>
        ================================================<br>
      </p>
    </div>
    <div class="moz-cite-prefix">On 14/4/2021 3:47 pm, Barry Smith
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:9E47230D-2881-48E1-AC25-CA1D66A8A30C@petsc.dev">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class=""><br class="">
      </div>
       Please send configure.log and make.log and the results of "make
      check" so we have the details on the build process. 
      <div class=""><br class="">
      </div>
      <blockquote type="cite" class="">
        <div class="">
          <p class=""><i class=""><b class="">No rule to make target
'/cygdrive/d/Lib/petsc-3.15.0_win64_impi_vs2017/share/petsc/examples/src/ksp/ksp/tutori</b></i><i
              class=""><b class="">als/lib/petsc/conf/test'.  Stop.</b></i></p>
        </div>
      </blockquote>
      <div class=""> Looks funny; it does not seem to separate the PETSc
        directory from its configuration directory appropriately.  </div>
      <div class=""><br class="">
      </div>
      <div class="">  Are you sure </div>
      <div class=""><br class="">
      </div>
      <div class="">
        <blockquote type="cite" class="">
          <div class="">
            <p class=""><i class=""><b class="">export PETSC_DIR=`pwd`</b></i><i
                class=""><b class=""><br class="">
                </b></i><i class=""><b class="">export
                  PETSC_ARCH=petsc-3.15.0_win64_impi_vs2017</b></i></p>
          </div>
        </blockquote>
        <div class="">are run in the appropriate directory so that
          PETSC_DIR is correct.</div>
        <div class=""><br class="">
        </div>
        <div class="">Barry</div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
        <br class="">
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
          <div><br class="">
            <blockquote type="cite" class="">
              <div class="">On Apr 14, 2021, at 2:20 AM, TAY wee-beng
                <<a href="mailto:zonexo@gmail.com" class=""
                  moz-do-not-send="true">zonexo@gmail.com</a>> wrote:</div>
              <br class="Apple-interchange-newline">
              <div class="">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=UTF-8" class="">
                <div class="">
                  <p class="">Hi Mark,</p>
                  <p class="">I'm not sure what's wrong.</p>
                  <p class="">In VS2017 + Intel oneAPI,</p>
                  <p class="">even after adding the full path:</p>
                  <p class="">#include
<D:/Lib/petsc-3.15.0_win64_impi_vs2017/include/petsc/finclude/petscksp.h></p>
                  <p class="">I got a new error:</p>
                  <p class=""><i class=""><b class="">Compiling with
                        Intel® Fortran Compiler Classic 2021.2.0
                        [Intel(R) 64]...</b></i><i class=""><b class=""><br
                          class="">
                      </b></i><i class=""><b class="">ex2f.F90</b></i><i
                      class=""><b class=""><br class="">
                      </b></i><i class=""><b class="">petscksp.h(8):
                        #error: can't find include file:
                        petsc/finclude/petscpc.h</b></i><i class=""><b
                        class=""><br class="">
                      </b></i><i class=""><b class="">ex2f : error
                        PRJ0019: A tool returned an error code</b></i></p>
                  <p class="">Note that I have also specified the
                    include dir in the properties:</p>
                  <p class=""><i class=""><b class="">Debug/;$(PETSC_DIR);$(PETSC_DIR)/include;$(I_MPI_ONEAPI_ROOT)/include</b></i></p>
                  <p class="">I also tried in cygwin:</p>
                  <p class=""><i class=""><b class="">export
                        PETSC_DIR=`pwd`</b></i><i class=""><b class=""><br
                          class="">
                      </b></i><i class=""><b class="">export
                        PETSC_ARCH=petsc-3.15.0_win64_impi_vs2017</b></i><i
                      class=""><b class=""><br class="">
                      </b></i><i class=""><b class="">make ex2f</b></i></p>
                  <p class="">I got the error:</p>
                  <p class=""><i class=""><b class="">$ make ex2f</b></i><i
                      class=""><b class=""><br class="">
                      </b></i><i class=""><b class="">makefile:41:
/cygdrive/d/Lib/petsc-3.15.0_win64_impi_vs2017/share/petsc/examples/src/ksp/ksp/tutorials/lib/petsc/conf/te</b></i><i
                      class=""><b class="">st: No such file or directory</b></i><i
                      class=""><b class=""><br class="">
                      </b></i><i class=""><b class="">make: *** No rule
                        to make target
'/cygdrive/d/Lib/petsc-3.15.0_win64_impi_vs2017/share/petsc/examples/src/ksp/ksp/tutori</b></i><i
                      class=""><b class="">als/lib/petsc/conf/test'. 
                        Stop.</b></i></p>
                  <p class="">Somehow it just doesn't work. Building the
                    library has no problem though.</p>
                  <p class="">I wonder what's wrong.<br class="">
                  </p>
                  <p class=""><br class="">
                  </p>
                  <div class="moz-signature">
                    <p class="">Thank you very much.<br class="">
                      <br class="">
                      Yours sincerely,<br class="">
                      <br class="">
                      ================================================<br
                        class="">
                      TAY Wee-Beng 郑伟明 (Zheng Weiming)<br class="">
                      Personal research webpage: <font class=""
                        color="#3366ff"><u class=""><a
                            class="moz-txt-link-freetext"
                            href="http://tayweebeng.wixsite.com/website"
                            moz-do-not-send="true">http://tayweebeng.wixsite.com/website</a></u></font><br
                        class="">
                      Youtube research showcase: <u class=""><font
                          class="" color="#3366ff"><a
                            class="moz-txt-link-freetext"
                            href="https://goo.gl/PtvdwQ"
                            moz-do-not-send="true">https://goo.gl/PtvdwQ</a></font></u><br
                        class="">
                      linkedin: <u class=""><font class=""
                          color="#3366ff"><a
                            class="moz-txt-link-freetext"
                            href="https://www.linkedin.com/in/tay-weebeng"
                            moz-do-not-send="true">https://www.linkedin.com/in/tay-weebeng</a></font></u><br
                        class="">
                      ================================================<br
                        class="">
                    </p>
                  </div>
                  <div class="moz-cite-prefix">On 14/4/2021 9:31 am,
                    Mark Adams wrote:<br class="">
                  </div>
                  <blockquote type="cite"
cite="mid:CADOhEh53FZLqwCETYTYdtuso_P0_6qcyPf-wvxSDUywiSWaPTQ@mail.gmail.com"
                    class="">
                    <meta http-equiv="content-type" content="text/html;
                      charset=UTF-8" class="">
                    <div dir="ltr" class="">
                      <div dir="ltr" class="">PETSc has changed Fortran
                        syntax since v3.9. You should upgrade. Look at
                        examples for how to use modules etc. 
                        <div class=""><br class="">
                        </div>
                        <div class=""><br class="">
                        </div>
                      </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 class="">
                            <p class=""><i class=""><b class="">Compiling
                                  with Intel® Fortran Compiler Classic
                                  2021.2.0 [Intel(R) 64]...</b></i><i
                                class=""><b class=""><br class="">
                                </b></i><i class=""><b class="">global.F90</b></i><i
                                class=""><b class=""><br class="">
                                </b></i><i class=""><b class="">global.F90(3):
                                  #error: can't find include file:
                                  petsc/finclude/petsc.h</b></i><i
                                class=""><b class=""><br class="">
                                </b></i><i class=""><b class="">global.F90(937):
                                  #error: can't find include file:
                                  petsc/finclude/petsc.h</b></i></p>
                          </div>
                        </blockquote>
                        <div class=""><br class="">
                        </div>
                        <div class="">It looks like you might not have
                          your PETSC_ARCH variable set. You should get a
                          full path to /finclude/petsc.h. Look at the
                          compile line.</div>
                        <div class=""><br class="">
                        </div>
                        <div class="">There are PETSc examples that you
                          you can make to see an example of a correct
                          make. For example, </div>
                        <div class="">> cd
                          petsc/src/ksp/ksp/tutorials</div>
                        <div class=""> > make ex2f </div>
                        <div class=""><br class="">
                        </div>
                        <div class="">should make an executable and you
                          can look at the compile and link lines, and
                          compare to what you are using.</div>
                        <div class=""><br class="">
                        </div>
                        <div class="">Mark</div>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
                          0.8ex;border-left:1px solid
                          rgb(204,204,204);padding-left:1ex">
                          <div class="">
                            <p class=""><br class="">
                            </p>
                            <div class="">-- <br class="">
                              <p class="">Thank you very much.<br
                                  class="">
                                <br class="">
                                Yours sincerely,<br class="">
                                <br class="">
================================================<br class="">
                                TAY Wee-Beng 郑伟明 (Zheng Weiming)<br
                                  class="">
                                Personal research webpage: <font
                                  class="" color="#3366ff"><u class=""><a
href="http://tayweebeng.wixsite.com/website" target="_blank"
                                      moz-do-not-send="true" class="">http://tayweebeng.wixsite.com/website</a></u></font><br
                                  class="">
                                Youtube research showcase: <u class=""><font
                                    class="" color="#3366ff"><a
                                      href="https://goo.gl/PtvdwQ"
                                      target="_blank"
                                      moz-do-not-send="true" class="">https://goo.gl/PtvdwQ</a></font></u><br
                                  class="">
                                linkedin: <u class=""><font class=""
                                    color="#3366ff"><a
                                      href="https://www.linkedin.com/in/tay-weebeng"
                                      target="_blank"
                                      moz-do-not-send="true" class="">https://www.linkedin.com/in/tay-weebeng</a></font></u><br
                                  class="">
================================================<br class="">
                              </p>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                    </div>
                  </blockquote>
                </div>
              </div>
            </blockquote>
          </div>
          <br class="">
        </div>
      </div>
    </blockquote>
  </body>
</html>