<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Barry,</p>
    <p>Thanks, I'll try later. Back to using 3.20.6 which is working
      1st.</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 22/8/2024 10:39 pm, Barry Smith
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:80D9E1BB-1124-4650-8BD3-1697C51A0D86@petsc.dev">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div><br>
      </div>
        Hmm, try using a standalone variable
      <div><br>
      </div>
      <div>  PetscReal value </div>
      <div>  value = int_impl(k,5)]</div>
      <div><br>
      </div>
      <div><br>
        <div>
          <blockquote type="cite">
            <blockquote type="cite"
              cite="mid:5561D4D2-5ADD-4076-8DB3-4B07EC893FD2@petsc.dev">
              <blockquote type="cite">
                <blockquote type="cite"
cite="mid:FB6E2EF7-C73D-45EA-A0E9-EDE5C30F8F40@petsc.dev">
                  <blockquote type="cite">
                    <p>call
MatSetValues(A_mat_uv,[ione],II,[ione],[value],impl_mat_A,INSERT_VALUES,ierr)</p>
                  </blockquote>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
          <div><br>
          </div>
          unfortunately Fortan compilers in this situation are not good
          at telling us exactly what argument is giving it grief.</div>
        <div><br>
        </div>
        <div>Barry</div>
        <div><br>
          <div><br>
          </div>
          <br>
          <blockquote type="cite">
            <div>On Aug 22, 2024, at 10:33 AM, TAY Wee Beng
              <a class="moz-txt-link-rfc2396E" href="mailto:zonexo@gmail.com"><zonexo@gmail.com></a> wrote:</div>
            <br class="Apple-interchange-newline">
            <div>
              <meta http-equiv="Content-Type"
                content="text/html; charset=UTF-8">
              <div>
                <p><br>
                </p>
                <div class="moz-cite-prefix">On 22/8/2024 10:28 pm,
                  Barry Smith wrote:<br>
                </div>
                <blockquote type="cite"
cite="mid:5561D4D2-5ADD-4076-8DB3-4B07EC893FD2@petsc.dev">
                  <meta http-equiv="content-type"
                    content="text/html; charset=UTF-8">
                  <div><br>
                  </div>
                    Should be PetscReal as it is a numerical value.</blockquote>
                Ok, I changed it but I still get the same error.<br>
                <blockquote type="cite"
cite="mid:5561D4D2-5ADD-4076-8DB3-4B07EC893FD2@petsc.dev">
                  <div><br id="lineBreakAtBeginningOfMessage">
                    <div><br>
                      <blockquote type="cite">
                        <div>On Aug 22, 2024, at 9:55 AM, TAY Wee Beng <a
                            class="moz-txt-link-rfc2396E"
                            href="mailto:zonexo@gmail.com"
                            moz-do-not-send="true"><zonexo@gmail.com></a>
                          wrote:</div>
                        <br class="Apple-interchange-newline">
                        <div>
                          <meta http-equiv="Content-Type"
                            content="text/html; charset=UTF-8">
                          <div>
                            <p><br>
                            </p>
                            <div class="moz-cite-prefix">On 22/8/2024
                              9:54 pm, Barry Smith wrote:<br>
                            </div>
                            <blockquote type="cite"
cite="mid:FB6E2EF7-C73D-45EA-A0E9-EDE5C30F8F40@petsc.dev">
                              <meta http-equiv="content-type"
                                content="text/html; charset=UTF-8">
                              <div><br>
                              </div>
                                What is int_impl(k,5) defined type?</blockquote>
                            PetscInt<br>
                            <blockquote type="cite"
cite="mid:FB6E2EF7-C73D-45EA-A0E9-EDE5C30F8F40@petsc.dev">
                              <div><br>
                                <blockquote type="cite">
                                  <div>On Aug 22, 2024, at 9:45 AM, TAY
                                    Wee Beng <a
                                      class="moz-txt-link-rfc2396E"
                                      href="mailto:zonexo@gmail.com"
                                      moz-do-not-send="true"><zonexo@gmail.com></a>
                                    wrote:</div>
                                  <br class="Apple-interchange-newline">
                                  <div>
                                    <meta http-equiv="Content-Type"
                                      content="text/html; charset=UTF-8">
                                    <div>
                                      <p>Hi Barry,</p>
                                      <p>Do you mean that I change from:</p>
                                      <p>call
MatSetValues(A_mat_uv,ione,II,ione,int_impl(k,5),impl_mat_A,INSERT_VALUES,ierr)</p>
                                      <p>to</p>
                                      <p>call
MatSetValues(A_mat_uv,[ione],II,[ione],[int_impl(k,5)],impl_mat_A,INSERT_VALUES,ierr)</p>
                                      <p>?</p>
                                      <p>I did it but the error is still
                                        there.<br>
                                      </p>
                                      <div class="moz-cite-prefix">On
                                        22/8/2024 9:40 pm, Barry Smith
                                        wrote:<br>
                                      </div>
                                      <blockquote type="cite"
cite="mid:8F81DAC9-6A51-4AD2-9D8F-AC6FDCF2A007@petsc.dev">
                                        <meta http-equiv="content-type"
content="text/html; charset=UTF-8">
                                        <div><br>
                                        </div>
                                           Fortran 90 type checking is
                                        very tight; The dimension of the
                                        array, or scalar passed as
                                        arguments must match the
                                        expected dimension (f77 did not
                                        do this type checking). Thus the
                                        ione argument must be a 1-d
                                        array as well as the numerical
                                        values so do 
                                        <div><br>
                                        </div>
                                        <div>
                                          <blockquote type="cite">
                                            <p><b><i>call
MatSetValues(A_mat_uv,[ione],II,[ione],[int_impl(k,5)],impl_mat_A,INSERT_VALUES,ierr)</i></b></p>
                                          </blockquote>
                                          <div><br>
                                          </div>
                                          See Fortran at <a href="https://urldefense.us/v3/__https://petsc.org/main/changes/dev/__;!!G_uCfscf7eWS!evaW1MccHDe9ZPfL8ftIad0f_3W-98xwAmqqb-CmMXOH4FQPmfb1qB2vE4K3hGi3w2UJfq_e19E7r9oLmRU$" moz-do-not-send="true" class="moz-txt-link-freetext">https://petsc.org/main/changes/dev/</a><br>
                                          <br>
                                        </div>
                                        <div>I am trying to support the
                                          old-fashion F77 model,
                                          allowing miss-matches in the
                                          array dimensions while still
                                          doing proper type checking but
                                          it will take some time to
                                          simplify the API.</div>
                                        <div><br>
                                        </div>
                                        <div>   Barry</div>
                                        <div><br>
                                        </div>
                                        <div><br
id="lineBreakAtBeginningOfMessage">
                                          <div><br>
                                            <blockquote type="cite">
                                              <div>On Aug 21, 2024, at
                                                9:44 PM, TAY Wee Beng <a
class="moz-txt-link-rfc2396E" href="mailto:zonexo@gmail.com"
                                                  moz-do-not-send="true"><zonexo@gmail.com></a>
                                                wrote:</div>
                                              <br
class="Apple-interchange-newline">
                                              <div>
                                                <meta
http-equiv="Content-Type" content="text/html; charset=UTF-8">
                                                <div>
                                                  <p>Hi Barry,</p>
                                                  <p>I have declared
                                                    them as integers in
                                                    Fortran. Is that
                                                    different from
                                                    PetscInt and how
                                                    come it works in
                                                    debug mode?</p>
                                                  <p>Anyway, I changed
                                                    them and it solved
                                                    the problem.
                                                    However, I have a
                                                    similar problem in
                                                    my boundary.F90:</p>
                                                  <p><b><i>boundary.F90(6685):
                                                        error #6285:
                                                        There is no
                                                        matching
                                                        specific
                                                        subroutine for
                                                        this generic
                                                        subroutine
                                                        call.  
                                                        [MATSETVALUES]<br>
                                                        call
MatSetValues(A_mat_uv,ione,II,ione,int_impl(k,5),impl_mat_A,INSERT_VALUES,ierr)</i></b><br>
                                                    -----^<br>
                                                    I changed all to
                                                    PetscInt and also
                                                    PetscReal but I
                                                    still got the error.</p>
                                                  <p>Why is this so now?
                                                    Any solution?</p>
                                                  <p>Thanks!<br>
                                                  </p>
                                                  <div
class="moz-cite-prefix">On 22/8/2024 12:03 am, Barry Smith wrote:<br>
                                                  </div>
                                                  <blockquote
                                                    type="cite"
cite="mid:2CC29C86-EF68-4405-97F2-93EA0C25B9F2@petsc.dev">
                                                    <meta
http-equiv="content-type" content="text/html; charset=UTF-8">
                                                    <div><br>
                                                    </div>
                                                      You must declare
                                                    as
                                                    <div><br>
                                                    </div>
                                                    <div><b><i> 
                                                          PetscInt
                                                          ksta_p,kend_p</i></b></div>
                                                    <div><br>
                                                    </div>
                                                    <div>  Perhaps they
                                                      are declared as
                                                      arrays?</div>
                                                    <div><br>
                                                    </div>
                                                    <div>
                                                      <div><br>
                                                        <blockquote
                                                          type="cite">
                                                          <div>On Aug
                                                          21, 2024, at
                                                          11:19 AM, TAY
                                                          Wee Beng <a
class="moz-txt-link-rfc2396E" href="mailto:zonexo@gmail.com"
moz-do-not-send="true"><zonexo@gmail.com></a> wrote:</div>
                                                          <br
class="Apple-interchange-newline">
                                                          <div>
                                                          <meta
http-equiv="content-type" content="text/html; charset=UTF-8">
                                                          <div>
                                                          <p>Hi,</p>
                                                          <p>I am using
                                                          the latest
                                                          PETSc thru
                                                          github. I
                                                          compiled both
                                                          the debug and
                                                          rel ver of
                                                          PETSc w/o
                                                          problem.</p>
                                                          <p>I then use
                                                          it with my CFD
                                                          code and the
                                                          debug ver
                                                          works.</p>
                                                          <p>However, I
                                                          have problems
                                                          with the rel
                                                          ver:</p>
                                                          <p><b><i>ftn
                                                          -o global.o -c
                                                          -O3 -g -ip
                                                          -ipo   -fPIC 
                                                          -save -w
-I/home/project/11003851/lib/petsc_210824_intel_rel/include   
                                                          global.F90<br>
                                                          ifort: remark
                                                          #10448:
                                                          Intel(R)
                                                          Fortran
                                                          Compiler
                                                          Classic
                                                          (ifort) is now
                                                          deprecated and
                                                          will be
                                                          discontinued
                                                          late 2024.
                                                          Intel
                                                          recommends
                                                          that customers
                                                          transition now
                                                          to using the
                                                          LLVM-based
                                                          Intel(R)
                                                          Fortran
                                                          Compiler (ifx)
                                                          for continued
                                                          Windows* and
                                                          Linux*
                                                          support, new
                                                          language
                                                          support, new
                                                          language
                                                          features, and
                                                          optimizations.
                                                          Use
                                                          '-diag-disable=10448'
                                                          to disable
                                                          this message.<br>
global.F90(444): error #6285: There is no matching specific subroutine
                                                          for this
                                                          generic
                                                          subroutine
                                                          call.  
                                                          [MATGETOWNERSHIPRANGE]<br>
                                                                  call
                                                          MatGetOwnershipRange(A_mat,ksta_p,kend_p,ierr)<br>
                                                          -------------^<br>
global.F90(720): error #6285: There is no matching specific subroutine
                                                          for this
                                                          generic
                                                          subroutine
                                                          call.  
                                                          [MATGETOWNERSHIPRANGE]<br>
                                                          call
                                                          MatGetOwnershipRange(A_mat_uv,ksta_m,kend_m,ierr)<br>
                                                          -----^<br>
global.F90(774): error #6285: There is no matching specific subroutine
                                                          for this
                                                          generic
                                                          subroutine
                                                          call.  
                                                          [MATGETOWNERSHIPRANGE]<br>
                                                          call
                                                          MatGetOwnershipRange(A_semi_x,ksta_mx,kend_mx,ierr)<br>
                                                          -----^<br>
global.F90(776): error #6285: There is no matching specific subroutine
                                                          for this
                                                          generic
                                                          subroutine
                                                          call.  
                                                          [MATGETOWNERSHIPRANGE]<br>
                                                          call
                                                          MatGetOwnershipRange(A_semi_y,ksta_my,kend_my,ierr)<br>
                                                          -----^<br>
global.F90(949): error #6285: There is no matching specific subroutine
                                                          for this
                                                          generic
                                                          subroutine
                                                          call.  
                                                          [MATGETOWNERSHIPRANGE]<br>
                                                          call
                                                          MatGetOwnershipRange(A_semi_x,ksta_mx,kend_mx,ierr)<br>
                                                          -----^<br>
global.F90(957): error #6285: There is no matching specific subroutine
                                                          for this
                                                          generic
                                                          subroutine
                                                          call.  
                                                          [MATGETOWNERSHIPRANGE]<br>
                                                          call
                                                          MatGetOwnershipRange(A_semi_y,ksta_my,kend_my,ierr)<br>
                                                          -----^<br>
                                                          compilation
                                                          aborted for
                                                          global.F90
                                                          (code 1)</i></b><br>
                                                          </p>
                                                          <p>May I know
                                                          what's the
                                                          problem?<br>
                                                          </p>
                                                          <div
class="moz-signature">-- <br>
                                                          <div><br
class="webkit-block-placeholder">
                                                          </div>
                                                          Thank you very
                                                          much.<br>
                                                          <br>
                                                          Yours
                                                          sincerely,<br>
                                                          <br>
================================================<br>
                                                          TAY Wee-Beng
                                                          郑伟明 (Zheng
                                                          Weiming)<br>
================================================<br>
                                                          <p><br>
                                                          </p>
                                                          </div>
                                                          </div>
                                                          </div>
                                                        </blockquote>
                                                      </div>
                                                      <br>
                                                    </div>
                                                  </blockquote>
                                                  <div
class="moz-signature">-- <br>
                                                    <div><br
class="webkit-block-placeholder">
                                                    </div>
                                                    Thank you very much.<br>
                                                    <br>
                                                    Yours sincerely,<br>
                                                    <br>
================================================<br>
                                                    TAY Wee-Beng 郑伟明
                                                    (Zheng Weiming)<br>
================================================<br>
                                                    <p><br>
                                                    </p>
                                                  </div>
                                                </div>
                                              </div>
                                            </blockquote>
                                          </div>
                                          <br>
                                        </div>
                                      </blockquote>
                                      <div class="moz-signature">-- <br>
                                        <div><br
class="webkit-block-placeholder">
                                        </div>
                                        Thank you very much.<br>
                                        <br>
                                        Yours sincerely,<br>
                                        <br>
================================================<br>
                                        TAY Wee-Beng 郑伟明 (Zheng Weiming)<br>
================================================<br>
                                        <p><br>
                                        </p>
                                      </div>
                                    </div>
                                  </div>
                                </blockquote>
                              </div>
                              <br>
                            </blockquote>
                            <div class="moz-signature">-- <br>
                              <div><br class="webkit-block-placeholder">
                              </div>
                              Thank you very much.<br>
                              <br>
                              Yours sincerely,<br>
                              <br>
================================================<br>
                              TAY Wee-Beng 郑伟明 (Zheng Weiming)<br>
================================================<br>
                              <p><br>
                              </p>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                    <br>
                  </div>
                </blockquote>
                <div class="moz-signature">-- <br>
                  <div><br class="webkit-block-placeholder">
                  </div>
                  Thank you very much.<br>
                  <br>
                  Yours sincerely,<br>
                  <br>
                  ================================================<br>
                  TAY Wee-Beng 郑伟明 (Zheng Weiming)<br>
                  ================================================<br>
                  <p><br>
                  </p>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <div class="moz-signature">-- <br>
      <p></p>
      Thank you very much.<br>
      <br>
      Yours sincerely,<br>
      <br>
      ================================================<br>
      TAY Wee-Beng 郑伟明 (Zheng Weiming)<br>
      ================================================<br>
      <p><br>
      </p>
    </div>
  </body>
</html>