<div dir="ltr">You have <span style="color:rgb(0,0,0);font-family:"Courier New",Courier,monospace,arial,sans-serif;font-size:14px;white-space:pre-wrap">PETSC_ARCH=petsc-3.15.0_win64_impi_vs2017</span><div>I think you use PETSC_ARCH="" for installed libs.<br>When you do the install it will tell you exactly what to run to run "check". You might double check that .<br>Mark</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 14, 2021 at 4:10 AM TAY wee-beng <<a href="mailto:zonexo@gmail.com">zonexo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Hi Barry,</p>
    <p>Ops, which dir should I run <i><b>export
          PETSC_DIR=`pwd`</b></i><i><b><br>
        </b></i></p>
    <p><span><span>Maybe </span></span><span><span>I ran it </span></span><span><span>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><b><br>
        </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>
      <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 href="http://tayweebeng.wixsite.com/website" target="_blank">http://tayweebeng.wixsite.com/website</a></u></font><br>
        Youtube research showcase: <u><font color="#3366ff"><a href="https://goo.gl/PtvdwQ" target="_blank">https://goo.gl/PtvdwQ</a></font></u><br>
        linkedin: <u><font color="#3366ff"><a href="https://www.linkedin.com/in/tay-weebeng" target="_blank">https://www.linkedin.com/in/tay-weebeng</a></font></u><br>
        ================================================<br>
      </p>
    </div>
    <div>On 14/4/2021 3:47 pm, Barry Smith
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div><br>
      </div>
       Please send configure.log and make.log and the results of "make
      check" so we have the details on the build process. 
      <div><br>
      </div>
      <blockquote type="cite">
        <div>
          <p><i><b>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><b>als/lib/petsc/conf/test'.  Stop.</b></i></p>
        </div>
      </blockquote>
      <div> Looks funny; it does not seem to separate the PETSc
        directory from its configuration directory appropriately.  </div>
      <div><br>
      </div>
      <div>  Are you sure </div>
      <div><br>
      </div>
      <div>
        <blockquote type="cite">
          <div>
            <p><i><b>export PETSC_DIR=`pwd`</b></i><i><b><br>
                </b></i><i><b>export
                  PETSC_ARCH=petsc-3.15.0_win64_impi_vs2017</b></i></p>
          </div>
        </blockquote>
        <div>are run in the appropriate directory so that
          PETSC_DIR is correct.</div>
        <div><br>
        </div>
        <div>Barry</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <br>
        <div><br>
        </div>
        <div><br>
          <div><br>
            <blockquote type="cite">
              <div>On Apr 14, 2021, at 2:20 AM, TAY wee-beng
                <<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>> wrote:</div>
              <br>
              <div>
                
                <div>
                  <p>Hi Mark,</p>
                  <p>I'm not sure what's wrong.</p>
                  <p>In VS2017 + Intel oneAPI,</p>
                  <p>even after adding the full path:</p>
                  <p>#include
<D:/Lib/petsc-3.15.0_win64_impi_vs2017/include/petsc/finclude/petscksp.h></p>
                  <p>I got a new error:</p>
                  <p><i><b>Compiling with
                        Intel® Fortran Compiler Classic 2021.2.0
                        [Intel(R) 64]...</b></i><i><b><br>
                      </b></i><i><b>ex2f.F90</b></i><i><b><br>
                      </b></i><i><b>petscksp.h(8):
                        #error: can't find include file:
                        petsc/finclude/petscpc.h</b></i><i><b><br>
                      </b></i><i><b>ex2f : error
                        PRJ0019: A tool returned an error code</b></i></p>
                  <p>Note that I have also specified the
                    include dir in the properties:</p>
                  <p><i><b>Debug/;$(PETSC_DIR);$(PETSC_DIR)/include;$(I_MPI_ONEAPI_ROOT)/include</b></i></p>
                  <p>I also tried in cygwin:</p>
                  <p><i><b>export
                        PETSC_DIR=`pwd`</b></i><i><b><br>
                      </b></i><i><b>export
                        PETSC_ARCH=petsc-3.15.0_win64_impi_vs2017</b></i><i><b><br>
                      </b></i><i><b>make ex2f</b></i></p>
                  <p>I got the error:</p>
                  <p><i><b>$ make ex2f</b></i><i><b><br>
                      </b></i><i><b>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><b>st: No such file or directory</b></i><i><b><br>
                      </b></i><i><b>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><b>als/lib/petsc/conf/test'. 
                        Stop.</b></i></p>
                  <p>Somehow it just doesn't work. Building the
                    library has no problem though.</p>
                  <p>I wonder what's wrong.<br>
                  </p>
                  <p><br>
                  </p>
                  <div>
                    <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 href="http://tayweebeng.wixsite.com/website" target="_blank">http://tayweebeng.wixsite.com/website</a></u></font><br>
                      Youtube research showcase: <u><font color="#3366ff"><a href="https://goo.gl/PtvdwQ" target="_blank">https://goo.gl/PtvdwQ</a></font></u><br>
                      linkedin: <u><font color="#3366ff"><a href="https://www.linkedin.com/in/tay-weebeng" target="_blank">https://www.linkedin.com/in/tay-weebeng</a></font></u><br>
                      ================================================<br>
                    </p>
                  </div>
                  <div>On 14/4/2021 9:31 am,
                    Mark Adams wrote:<br>
                  </div>
                  <blockquote type="cite">
                    
                    <div dir="ltr">
                      <div dir="ltr">PETSc has changed Fortran
                        syntax since v3.9. You should upgrade. Look at
                        examples for how to use modules etc. 
                        <div><br>
                        </div>
                        <div><br>
                        </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>
                            <p><i><b>Compiling
                                  with Intel® Fortran Compiler Classic
                                  2021.2.0 [Intel(R) 64]...</b></i><i><b><br>
                                </b></i><i><b>global.F90</b></i><i><b><br>
                                </b></i><i><b>global.F90(3):
                                  #error: can't find include file:
                                  petsc/finclude/petsc.h</b></i><i><b><br>
                                </b></i><i><b>global.F90(937):
                                  #error: can't find include file:
                                  petsc/finclude/petsc.h</b></i></p>
                          </div>
                        </blockquote>
                        <div><br>
                        </div>
                        <div>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><br>
                        </div>
                        <div>There are PETSc examples that you
                          you can make to see an example of a correct
                          make. For example, </div>
                        <div>> cd
                          petsc/src/ksp/ksp/tutorials</div>
                        <div> > make ex2f </div>
                        <div><br>
                        </div>
                        <div>should make an executable and you
                          can look at the compile and link lines, and
                          compare to what you are using.</div>
                        <div><br>
                        </div>
                        <div>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>
                            <p><br>
                            </p>
                            <div>-- <br>
                              <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 href="http://tayweebeng.wixsite.com/website" target="_blank">http://tayweebeng.wixsite.com/website</a></u></font><br>
                                Youtube research showcase: <u><font color="#3366ff"><a href="https://goo.gl/PtvdwQ" target="_blank">https://goo.gl/PtvdwQ</a></font></u><br>
                                linkedin: <u><font color="#3366ff"><a href="https://www.linkedin.com/in/tay-weebeng" target="_blank">https://www.linkedin.com/in/tay-weebeng</a></font></u><br>
================================================<br>
                              </p>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                    </div>
                  </blockquote>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
  </div>

</blockquote></div>