<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div>  What is int_impl(k,5) defined type?<div><br><blockquote type="cite"><div>On Aug 22, 2024, at 9:45 AM, TAY Wee Beng <zonexo@gmail.com> 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!aWzePGVwtbySxFNNIyaUMeslM1i47XZ6Q8Cu-XOfcXtqa0fUhIxUXbnw6aeXBBE-k5uGtriqZ7_yShLv_cy0KmM$" 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"><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></body></html>