<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Don’t forget that not all integers passed into PETSc routines are 64 bit.<div class="">For example, the error codes when called from Fortran should be defined as PetscErrorCode and not PetscInt.</div><div class="">It’s really good to get into the habit of correctly declaring all PETSc variables according to the web pages, so that you can easily switch between 32bit and 64bit integers.</div><div class=""><br class=""></div><div class="">Randy</div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 30, 2018, at 7:43 PM, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">On Aug 30, 2018, at 9:40 PM, TAY wee-beng <<a href="mailto:zonexo@gmail.com" class="">zonexo@gmail.com</a>> wrote:<br class=""><br class=""><br class="">On 31/8/2018 10:38 AM, Smith, Barry F. wrote:<br class=""><blockquote type="cite" class=""> PetscReal is by default real(8) you can leave those alone<br class=""><br class=""> Any integer you pass to a PETSc routine needs to be declared as PetscInt (not integer) otherwise the 64 bit indices stuff won't work.<br class=""><br class=""> Barry<br class=""><br class=""></blockquote>Hi,<br class=""><br class="">ok, I got it. Btw, is it advisable to change all integer in my code to PetscInt?<br class=""><br class="">Will it cause any conflict or waste a lot of memory?<br class=""><br class="">Or should I only change those related to PETSc?<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""> That is up to you. Since you probably pass the values between PETSc and non-PETSc part of the code it is probably easier just to make all the integer PetscInt instead. No performance difference that you can measure by keeping a few integer around.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""> Barry</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class="">Thanks!<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Aug 30, 2018, at 9:35 PM, TAY wee-beng <<a href="mailto:zonexo@gmail.com" class="">zonexo@gmail.com</a>> wrote:<br class=""><br class=""><br class="">On 31/8/2018 10:21 AM, Matthew Knepley wrote:<br class=""><blockquote type="cite" class="">On Thu, Aug 30, 2018 at 10:17 PM TAY wee-beng <<a href="mailto:zonexo@gmail.com" class="">zonexo@gmail.com</a>> wrote:<br class="">Hi,<br class=""><br class="">Due to my increase grid size, I have to go 64bit. I compiled the 64bit<br class="">PETSc w/o error. However, when I tried to compile my code using the<br class="">64bit PETSc, I got the error below. May I know why is this so?<br class=""><br class="">What changes should I make?<br class=""><br class="">Is it possible that you did not declare some inputs as PetscInt, so the interface check is failing?<br class=""><br class=""> Matt<br class=""></blockquote>Hi,<br class=""><br class="">I'm using the standard<br class=""><br class="">integer ::<br class=""><br class="">real(8) ::<br class=""><br class="">for some variables. For some others relating to PETSc, I use PetscInt.<br class=""><br class="">Should I change all to PetscInt and PetscReal?<br class=""><br class="">Currently, I use real(8) for all real values. If I change all to PetscReal, will PetscReal be real or real(8) by default?<br class=""><br class="">Thanks!<br class=""><blockquote type="cite" class=""><br class="">[tsltaywb@nus02 ibm3d_IIB_mpi]$ make -f makefile_2018<br class="">/app/intel/xe2018/compilers_and_libraries_2018.0.128/linux/mpi/intel64/bin/mpif90<br class="">-g -ip -ipo -O3 -c -fPIC -save kinefunc.F90<br class="">/app/intel/xe2018/compilers_and_libraries_2018.0.128/linux/mpi/intel64/bin/mpif90<br class="">-g -ip -ipo -O3 -c -fPIC -save -w<br class="">-I/home/users/nus/tsltaywb/propeller/lib/petsc-3.9.3_intel_2018_64bit_rel/include<br class="">-I/app/intel/xe2018/compilers_and_libraries_2018.0.128/linux/mpi/intel64/include<br class="">global.F90<br class="">global.F90(979): error #6285: There is no matching specific subroutine<br class="">for this generic subroutine call. [DMDACREATE3D]<br class="">call<br class="">DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br class="">-----^<br class="">global.F90(989): error #6285: There is no matching specific subroutine<br class="">for this generic subroutine call. [DMDACREATE3D]<br class=""> call<br class="">DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br class="">---------^<br class="">global.F90(997): error #6285: There is no matching specific subroutine<br class="">for this generic subroutine call. [DMDACREATE3D]<br class=""> call<br class="">DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br class="">---------^<br class="">global.F90(1005): error #6285: There is no matching specific subroutine<br class="">for this generic subroutine call. [DMDACREATE3D]<br class=""> call<br class="">DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br class="">---------^<br class="">global.F90(1013): error #6285: There is no matching specific subroutine<br class="">for this generic subroutine call. [DMDACREATE3D]<br class=""> call<br class="">DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br class="">---------^<br class="">global.F90(1021): error #6285: There is no matching specific subroutine<br class="">for this generic subroutine call. [DMDACREATE3D]<br class=""> call<br class="">DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br class="">---------^<br class="">global.F90(1029): error #6285: There is no matching specific subroutine<br class="">for this generic subroutine call. [DMDACREATE3D]<br class=""> call<br class="">DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&<br class="">---------^<br class="">compilation aborted for global.F90 (code 1)<br class=""><br class="">--<span class="Apple-converted-space"> </span><br 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: <a href="http://tayweebeng.wixsite.com/website" class="">http://tayweebeng.wixsite.com/website</a><br class="">Youtube research showcase: <a href="https://www.youtube.com/channel/UC72ZHtvQNMpNs2uRTSToiLA" class="">https://www.youtube.com/channel/UC72ZHtvQNMpNs2uRTSToiLA</a><br class="">linkedin: <a href="http://www.linkedin.com/in/tay-weebeng" class="">www.linkedin.com/in/tay-weebeng</a><br class="">================================================<br class=""><br class=""><br class=""><br class="">--<span class="Apple-converted-space"> </span><br class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener<br class=""><br class=""><a href="https://www.cse.buffalo.edu/~knepley/" class="">https://www.cse.buffalo.edu/~knepley/</a></blockquote></blockquote></blockquote></blockquote></div></blockquote></div><br class=""></div></body></html>