Re: [petsc-users] error in configuring PETSc

2023-11-08 Thread Barry Smith


  You need --download-sowing-cc=gcc-11 --download-sowing-cxx=g++-11

> On Nov 8, 2023, at 7:28 PM, 张胜  wrote:
> 
> Thank you for your suggestion. However, similar error still occurs. The 
> configure.log has been attached.
> 
> - 原始邮件 -
> 发件人: "Satish Balay" 
> 收件人: "zs1996" 
> 抄送: "petsc-users" 
> 发送时间: 星期四, 2023年 11 月 09日 上午 12:52:54
> 主题: Re: [petsc-users] error in configuring PETSc
> 
> Suggest attaching text logs (copy/paste) - instead of screenshots.
> 
> Try:
> 
> ./configure --with-cc=gcc-11 --with-cxx=g++-11 --with-fc=gfortran-11 
> --download-fftw --download-openmpi --download-fblaslapack --with-zlibs=yes 
> --with-szlib=no --with-c2html=0 --with-x=0 --download-hdf5-fortran-bindings=1 
> --download-hdf5 --download-sowing-cxx=g++-11
> 
> If you still have issues - send configure.log for this failure
> 
> Satish
> 
> On Thu, 9 Nov 2023, 张胜 wrote:
> 
>> Dear PETSc developer,
>> 
>> I use the following commands to configure petsc, but errors occur: 
>> ./configure --with-cc=gcc-11 --with-cxx=g++-11 --with-fc=gfortran-11 
>> --download-fftw --download-openmpi --download-fblaslapack 
>> --free-line-length-0 -g -fallow-argument-mismatch --enable-shared 
>> --enable-parallel --enable-fortran --with-zlibs=yes --with-szlib=no 
>> --with-cxx-dialect=C++11 --with-c2html=0 --with-x=0 
>> --download-hdf5-fortran-bindings=1 --download-hdf5
>> 
>> 
>> I tried many times but cannot fix it. So I ask help for you. Thanks in 
>> advance. 
>> Best regards, 
>> Sheng Zhang 
>> 
>> Ph.D 
>> School of Materials Science and Engineering 
>> Shanghai Jiao Tong University 
>> 800 Dongchuan Road 
>> Shanghai, 200240 China
> 



Re: [petsc-users] DMPlex and Gmsh

2023-11-08 Thread Matthew Knepley
On Wed, Nov 8, 2023 at 4:50 PM Blaise Bourdin  wrote:

> Hi,
>
> I think that you need to use the magical keyword “
> -dm_plex_gmsh_mark_vertices” for that
>

I try to describe the options here:

  https://petsc.org/main/manualpages/DMPlex/DMPlexCreateGmsh/

   Thanks,

  Matt


> Blaise
>
> On Nov 8, 2023, at 1:13 PM, Sharan Roongta  wrote:
>
> Caution: External email.
>
> Dear Petsc team,
>
> I want to load a .msh file generated using Gmsh software into the DMPlex
> object. There are several things I would want to clarify, but I would like
> to start with “Physical tags”.
>
> If I have defined “Physical Points”, “Physical Surface”, and “Physical
> Volume” in my .geo file, I get the physical tags in the “.msh” file.
> When I load this mesh in DMPlex, and view the DM:
>
> call DMView(globalMesh, PETSC_VIEWER_STDOUT_WORLD,err_PETSc)
>   CHKERRQ(err_PETSc)
>
> This is the output I get:
>
> DM Object: n/a 1 MPI process
>   type: plex
> n/a in 3 dimensions:
>   Number of 0-cells per rank: 14
>   Number of 1-cells per rank: 49
>   Number of 2-cells per rank: 60
>   Number of 3-cells per rank: 24
> Labels:
>   celltype: 4 strata with value/size (0 (14), 6 (24), 3 (60), 1 (49))
>   depth: 4 strata with value/size (0 (14), 1 (49), 2 (60), 3 (24))
>   Cell Sets: 1 strata with value/size (8 (24))
>   Face Sets: 6 strata with value/size (2 (4), 3 (4), 4 (4), 5 (4), 6 (4),
> 7 (4))
>
> I was expecting to get the “Node Sets” or “Vertex Sets” also. Is my
> assumption wrong?
>
> If yes, then how can one figure out the boundary nodes and their tags
> where I want to apply certain boundary conditions?
> Currently we apply boundary conditions on faces, therefore “Face Sets” was
> enough. But now we want to apply displacements on certain boundary nodes.
>
> I have also attached the .geo and .msh file (hope you can open it)
> The Petsc version I am using is 3.18.6.
>
>
> Thanks and Regards,
> Sharan Roongta
>
> ---
> Max-Planck-Institut für Eisenforschung GmbH
> Max-Planck-Straße 1
> D-40237 Düsseldorf
>
> Handelsregister B 2533
> Amtsgericht Düsseldorf
>
> Geschäftsführung
> Prof. Dr. Gerhard Dehm
> Prof. Dr. Jörg Neugebauer
> Prof. Dr. Dierk Raabe
> Dr. Kai de Weldige
>
> Ust.-Id.-Nr.: DE 11 93 58 514
> Steuernummer: 105 5891 1000
> -
> Please consider that invitations and e-mails of our institute are
> only valid if they end with …@mpie.de.
> If you are not sure of the validity please contact r...@mpie.de
>
> Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails
> aus unserem Haus nur mit der Endung …@mpie.de gültig sind.
> In Zweifelsfällen wenden Sie sich bitte an r...@mpie.de
>
>
>
> --
> -
> Stay up to date and follow us on LinkedIn, Twitter and YouTube.
>
> Max-Planck-Institut für Eisenforschung GmbH
> Max-Planck-Straße 1
> D-40237 Düsseldorf
>
> Handelsregister B 2533
> Amtsgericht Düsseldorf
>
> Geschäftsführung
> Prof. Dr. Gerhard Dehm
> Prof. Dr. Jörg Neugebauer
> Prof. Dr. Dierk Raabe
> Dr. Kai de Weldige
>
> Ust.-Id.-Nr.: DE 11 93 58 514
> Steuernummer: 105 5891 1000
>
>
> Please consider that invitations and e-mails of our institute are
> only valid if they end with …@mpie.de.
> If you are not sure of the validity please contact r...@mpie.de
>
> Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails
> aus unserem Haus nur mit der Endung …@mpie.de gültig sind.
> In Zweifelsfällen wenden Sie sich bitte an r...@mpie.de
> -
> 
>
>
> —
> Canada Research Chair in Mathematical and Computational Aspects of Solid
> Mechanics (Tier 1)
> Professor, Department of Mathematics & Statistics
> Hamilton Hall room 409A, McMaster University
> 1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada
> https://www.math.mcmaster.ca/bourdin | +1 (905) 525 9140 ext. 27243
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ 


Re: [petsc-users] Storing Values using a Triplet for using later

2023-11-08 Thread Matthew Knepley
On Wed, Nov 8, 2023 at 2:40 PM Brandon Denton via petsc-users <
petsc-users@mcs.anl.gov> wrote:

> Good Afternoon,
>
> Is there a structure within PETSc that allows storage of a value using a
> triple similar to PetscHMapIJSet with the key using a struct{PetscScalar i,
> j, k;}?
>
> I'm trying to access mesh information (the shape function coefficients I
> will calculate prior to their use) who's values I want to store in the
> auxiliary array available in the Residual Functions of PETSc's FEM
> infrastructure. After some trial and error work, I've come to the
> realization that the coordinates (x[]) available in the auxiliary functions
> is the centroid of the cell/element currently being evaluated. This triplet
> is unique for each cell/element for a valid mesh so I think it's reasonable
> to use this triplet as a key for looking up stored values unique to each
> cell/element. My plan is to attached the map to the Application Context,
> also available to Auxiliary Functions, to enable these calculations.
>
> Does such a map infrastructure exist within PETSc? If so, could you point
> me to a reference for it? If not, does anyone have any suggestions on how
> to solve this problem?
>

As Jed says, this is a spatial hash. I have a primitive spatial hash now.
You can use DMLocatePoints() to find the cell containing a point (like the
centroid). Let me know if this does not work or if I misunderstand the
problem.

  Thanks!

Matt


> Thank you in advance for your time.
> Brandon Denton
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ 


Re: [petsc-users] DMPlex and Gmsh

2023-11-08 Thread Blaise Bourdin



Hi,


I think that you need to use the magical keyword “-dm_plex_gmsh_mark_vertices” for that


Blaise



On Nov 8, 2023, at 1:13 PM, Sharan Roongta  wrote:







Caution: External email. 








Dear Petsc team,

 

I want to load a .msh file generated using Gmsh software into the DMPlex object. There are several things I would want to clarify, but I would like to start with “Physical tags”.

 

If I have defined “Physical Points”, “Physical Surface”, and “Physical Volume” in my .geo file, I get the physical tags in the “.msh” file.
When I load this mesh in DMPlex, and view the DM:

 

call DMView(globalMesh, PETSC_VIEWER_STDOUT_WORLD,err_PETSc)

  CHKERRQ(err_PETSc)

 

This is the output I get:

 

DM Object: n/a 1 MPI process

  type: plex

n/a in 3 dimensions:

  Number of 0-cells per rank: 14

  Number of 1-cells per rank: 49

  Number of 2-cells per rank: 60

  Number of 3-cells per rank: 24

Labels:

  celltype: 4 strata with value/size (0 (14), 6 (24), 3 (60), 1 (49))

  depth: 4 strata with value/size (0 (14), 1 (49), 2 (60), 3 (24))

  Cell Sets: 1 strata with value/size (8 (24))

  Face Sets: 6 strata with value/size (2 (4), 3 (4), 4 (4), 5 (4), 6 (4), 7 (4))

I was expecting to get the “Node Sets” or “Vertex Sets” also. Is my assumption wrong?

If yes, then how can one figure out the boundary nodes and their tags where I want to apply certain boundary conditions?
Currently we apply boundary conditions on faces, therefore “Face Sets” was enough. But now we want to apply displacements on certain boundary nodes.

 

I have also attached the .geo and .msh file (hope you can open it)

The Petsc version I am using is 3.18.6.


Thanks and Regards,

Sharan Roongta

 

---
Max-Planck-Institut für Eisenforschung GmbH 
Max-Planck-Straße 1 
D-40237 Düsseldorf 

Handelsregister B 2533 
Amtsgericht Düsseldorf 
   
Geschäftsführung 
Prof. Dr. Gerhard Dehm 
Prof. Dr. Jörg Neugebauer 
Prof. Dr. Dierk Raabe 
Dr. Kai de Weldige 

Ust.-Id.-Nr.: DE 11 93 58 514 
Steuernummer: 105 5891 1000 
- 
Please consider that invitations and e-mails of our institute are 
only valid if they end with …@mpie.de. 
If you are not sure of the validity please contact r...@mpie.de

Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails 
aus unserem Haus nur mit der Endung …@mpie.de gültig sind. 
In Zweifelsfällen wenden Sie sich bitte an r...@mpie.de

 




-
Stay up to date and follow us on LinkedIn, Twitter and YouTube.

Max-Planck-Institut für Eisenforschung GmbH
Max-Planck-Straße 1
D-40237 Düsseldorf
 
Handelsregister B 2533 
Amtsgericht Düsseldorf
 
Geschäftsführung
Prof. Dr. Gerhard Dehm
Prof. Dr. Jörg Neugebauer
Prof. Dr. Dierk Raabe
Dr. Kai de Weldige
 
Ust.-Id.-Nr.: DE 11 93 58 514 
Steuernummer: 105 5891 1000


Please consider that invitations and e-mails of our institute are 
only valid if they end with …@mpie.de. 
If you are not sure of the validity please contact r...@mpie.de

Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails
aus unserem Haus nur mit der Endung …@mpie.de gültig sind. 
In Zweifelsfällen wenden Sie sich bitte an r...@mpie.de
-





















— 
Canada Research Chair in Mathematical and Computational Aspects of Solid Mechanics (Tier 1)
Professor, Department of Mathematics & Statistics
Hamilton Hall room 409A, McMaster University
1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada 
https://www.math.mcmaster.ca/bourdin | +1 (905) 525 9140 ext. 27243






















Re: [petsc-users] Storing Values using a Triplet for using later

2023-11-08 Thread Barry Smith


   PETSc hashing is done by leveraging the great package khash. Take a look at 
include/petsc/private/hashtable.h and hashijkey.h for how we use kash to 
automatically generate the code for a particular key. Just make your tolerance 
smaller than the smallest diameters of your cells.


   Barry


> On Nov 8, 2023, at 2:47 PM, Jed Brown  wrote:
> 
> I don't think you want to hash floating point values, but I've had a number 
> of reasons to want spatial hashing for near-neighbor queries in PETSc and 
> that would be a great contribution. (Spatial hashes have a length scale and 
> compute integer bins.)
> 
> Brandon Denton via petsc-users  writes:
> 
>> Good Afternoon,
>> 
>> Is there a structure within PETSc that allows storage of a value using a 
>> triple similar to PetscHMapIJSet with the key using a struct{PetscScalar i, 
>> j, k;}?
>> 
>> I'm trying to access mesh information (the shape function coefficients I 
>> will calculate prior to their use) who's values I want to store in the 
>> auxiliary array available in the Residual Functions of PETSc's FEM 
>> infrastructure. After some trial and error work, I've come to the 
>> realization that the coordinates (x[]) available in the auxiliary functions 
>> is the centroid of the cell/element currently being evaluated. This triplet 
>> is unique for each cell/element for a valid mesh so I think it's reasonable 
>> to use this triplet as a key for looking up stored values unique to each 
>> cell/element. My plan is to attached the map to the Application Context, 
>> also available to Auxiliary Functions, to enable these calculations.
>> 
>> Does such a map infrastructure exist within PETSc? If so, could you point me 
>> to a reference for it? If not, does anyone have any suggestions on how to 
>> solve this problem?
>> 
>> Thank you in advance for your time.
>> Brandon Denton



Re: [petsc-users] Storing Values using a Triplet for using later

2023-11-08 Thread Jed Brown
I don't think you want to hash floating point values, but I've had a number of 
reasons to want spatial hashing for near-neighbor queries in PETSc and that 
would be a great contribution. (Spatial hashes have a length scale and compute 
integer bins.)

Brandon Denton via petsc-users  writes:

> Good Afternoon,
>
> Is there a structure within PETSc that allows storage of a value using a 
> triple similar to PetscHMapIJSet with the key using a struct{PetscScalar i, 
> j, k;}?
>
> I'm trying to access mesh information (the shape function coefficients I will 
> calculate prior to their use) who's values I want to store in the auxiliary 
> array available in the Residual Functions of PETSc's FEM infrastructure. 
> After some trial and error work, I've come to the realization that the 
> coordinates (x[]) available in the auxiliary functions is the centroid of the 
> cell/element currently being evaluated. This triplet is unique for each 
> cell/element for a valid mesh so I think it's reasonable to use this triplet 
> as a key for looking up stored values unique to each cell/element. My plan is 
> to attached the map to the Application Context, also available to Auxiliary 
> Functions, to enable these calculations.
>
> Does such a map infrastructure exist within PETSc? If so, could you point me 
> to a reference for it? If not, does anyone have any suggestions on how to 
> solve this problem?
>
> Thank you in advance for your time.
> Brandon Denton


[petsc-users] Storing Values using a Triplet for using later

2023-11-08 Thread Brandon Denton via petsc-users
Good Afternoon,

Is there a structure within PETSc that allows storage of a value using a triple 
similar to PetscHMapIJSet with the key using a struct{PetscScalar i, j, k;}?

I'm trying to access mesh information (the shape function coefficients I will 
calculate prior to their use) who's values I want to store in the auxiliary 
array available in the Residual Functions of PETSc's FEM infrastructure. After 
some trial and error work, I've come to the realization that the coordinates 
(x[]) available in the auxiliary functions is the centroid of the cell/element 
currently being evaluated. This triplet is unique for each cell/element for a 
valid mesh so I think it's reasonable to use this triplet as a key for looking 
up stored values unique to each cell/element. My plan is to attached the map to 
the Application Context, also available to Auxiliary Functions, to enable these 
calculations.

Does such a map infrastructure exist within PETSc? If so, could you point me to 
a reference for it? If not, does anyone have any suggestions on how to solve 
this problem?

Thank you in advance for your time.
Brandon Denton



[petsc-users] DMPlex and Gmsh

2023-11-08 Thread Sharan Roongta
Dear Petsc team,
 
I want to load a .msh file generated using Gmsh software into the DMPlex 
object. There are several things I would want to clarify, but I would like to 
start with "Physical tags".
 
If I have defined "Physical Points", "Physical Surface", and "Physical Volume" 
in my .geo file, I get the physical tags in the ".msh" file.
When I load this mesh in DMPlex, and view the DM:
 
call DMView(globalMesh, PETSC_VIEWER_STDOUT_WORLD,err_PETSc)
  CHKERRQ(err_PETSc)
 
This is the output I get:
 
DM Object: n/a 1 MPI process
  type: plex
n/a in 3 dimensions:
  Number of 0-cells per rank: 14
  Number of 1-cells per rank: 49
  Number of 2-cells per rank: 60
  Number of 3-cells per rank: 24
Labels:
  celltype: 4 strata with value/size (0 (14), 6 (24), 3 (60), 1 (49))
  depth: 4 strata with value/size (0 (14), 1 (49), 2 (60), 3 (24))
  Cell Sets: 1 strata with value/size (8 (24))
  Face Sets: 6 strata with value/size (2 (4), 3 (4), 4 (4), 5 (4), 6 (4), 7 (4))

I was expecting to get the "Node Sets" or "Vertex Sets" also. Is my assumption 
wrong?

If yes, then how can one figure out the boundary nodes and their tags where I 
want to apply certain boundary conditions?
Currently we apply boundary conditions on faces, therefore "Face Sets" was 
enough. But now we want to apply displacements on certain boundary nodes.
 
I have also attached the .geo and .msh file (hope you can open it)
The Petsc version I am using is 3.18.6.


Thanks and Regards,
Sharan Roongta
 
--- 
Max-Planck-Institut für Eisenforschung GmbH 
Max-Planck-Straße 1 
D-40237 Düsseldorf 

Handelsregister B 2533 
Amtsgericht Düsseldorf 
   
Geschäftsführung 
Prof. Dr. Gerhard Dehm 
Prof. Dr. Jörg Neugebauer 
Prof. Dr. Dierk Raabe 
Dr. Kai de Weldige 

Ust.-Id.-Nr.: DE 11 93 58 514 
Steuernummer: 105 5891 1000 
- 
Please consider that invitations and e-mails of our institute are 
only valid if they end with ...@mpie.de. 
If you are not sure of the validity please contact r...@mpie.de 

Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails 
aus unserem Haus nur mit der Endung ...@mpie.de gültig sind. 
In Zweifelsfällen wenden Sie sich bitte an r...@mpie.de

-
Stay up to date and follow us on LinkedIn, Twitter and YouTube.

Max-Planck-Institut für Eisenforschung GmbH
Max-Planck-Straße 1
D-40237 Düsseldorf
 
Handelsregister B 2533 
Amtsgericht Düsseldorf
 
Geschäftsführung
Prof. Dr. Gerhard Dehm
Prof. Dr. Jörg Neugebauer
Prof. Dr. Dierk Raabe
Dr. Kai de Weldige
 
Ust.-Id.-Nr.: DE 11 93 58 514 
Steuernummer: 105 5891 1000


Please consider that invitations and e-mails of our institute are 
only valid if they end with …@mpie.de. 
If you are not sure of the validity please contact r...@mpie.de

Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails
aus unserem Haus nur mit der Endung …@mpie.de gültig sind. 
In Zweifelsfällen wenden Sie sich bitte an r...@mpie.de
-


cube_check.msh
Description: Binary data


cube_check.geo
Description: Binary data


Re: [petsc-users] error in configuring PETSc

2023-11-08 Thread Satish Balay via petsc-users
Suggest attaching text logs (copy/paste) - instead of screenshots.

Try:

./configure --with-cc=gcc-11 --with-cxx=g++-11 --with-fc=gfortran-11 
--download-fftw --download-openmpi --download-fblaslapack --with-zlibs=yes 
--with-szlib=no --with-c2html=0 --with-x=0 --download-hdf5-fortran-bindings=1 
--download-hdf5 --download-sowing-cxx=g++-11

If you still have issues - send configure.log for this failure

Satish

On Thu, 9 Nov 2023, 张胜 wrote:

> Dear PETSc developer,
> 
> I use the following commands to configure petsc, but errors occur: 
> ./configure --with-cc=gcc-11 --with-cxx=g++-11 --with-fc=gfortran-11 
> --download-fftw --download-openmpi --download-fblaslapack 
> --free-line-length-0 -g -fallow-argument-mismatch --enable-shared 
> --enable-parallel --enable-fortran --with-zlibs=yes --with-szlib=no 
> --with-cxx-dialect=C++11 --with-c2html=0 --with-x=0 
> --download-hdf5-fortran-bindings=1 --download-hdf5
> 
> 
> I tried many times but cannot fix it. So I ask help for you. Thanks in 
> advance. 
> Best regards, 
> Sheng Zhang 
> 
> Ph.D 
> School of Materials Science and Engineering 
> Shanghai Jiao Tong University 
> 800 Dongchuan Road 
> Shanghai, 200240 China
> 


[petsc-users] error in configuring PETSc

2023-11-08 Thread 张胜
Dear PETSc developer,

I use the following commands to configure petsc, but errors occur: 
./configure --with-cc=gcc-11 --with-cxx=g++-11 --with-fc=gfortran-11 
--download-fftw --download-openmpi --download-fblaslapack --free-line-length-0 
-g -fallow-argument-mismatch --enable-shared --enable-parallel --enable-fortran 
--with-zlibs=yes --with-szlib=no --with-cxx-dialect=C++11 --with-c2html=0 
--with-x=0 --download-hdf5-fortran-bindings=1 --download-hdf5


I tried many times but cannot fix it. So I ask help for you. Thanks in advance. 
Best regards, 
Sheng Zhang 

Ph.D 
School of Materials Science and Engineering 
Shanghai Jiao Tong University 
800 Dongchuan Road 
Shanghai, 200240 China


Re: [petsc-users] Better solver and preconditioner to use multiple GPU

2023-11-08 Thread Jed Brown
What sort of problem are you solving? Algebraic multigrid like gamg or hypre 
are good choices for elliptic problems. Sparse triangular solves have horrific 
efficiency even on one GPU so you generally want to do your best to stay away 
from them.

"Ramoni Z. Sedano Azevedo"  writes:

> Hey!
>
> I am using PETSC in Fortran code and we apply the MPI process to
> parallelize the code.
>
> At the moment, the options that have been used are
> -ksp_monitor_true_residual
> -ksp_type bcgs
> -pc_type bjacobi
> -sub_pc_type ilu
> -sub_pc_factor_levels 3
> -sub_pc_factor_fill 6
>
> Now, we want to use multiple GPUs and I would like to know if there is a
> better solver and preconditioner pair to apply in this case.
>
> Yours sincerely,
> Ramoni Z. S . Azevedo


Re: [petsc-users] Better solver and preconditioner to use multiple GPU

2023-11-08 Thread Barry Smith


Unfortunately, ILU(3) is not something that runs well on GPUs so ideally, 
we should find a preconditioner that works well in terms of iteration count but 
also runs well on GPUs.  You can start by saying a bit about the nature of your 
problem. Is it a PDE? What type of discretization? 

  Barry


> On Nov 8, 2023, at 9:53 AM, Ramoni Z. Sedano Azevedo 
>  wrote:
> 
> 
> Hey!
> 
> I am using PETSC in Fortran code and we apply the MPI process to parallelize 
> the code.
> 
> At the moment, the options that have been used are
> -ksp_monitor_true_residual 
> -ksp_type bcgs 
> -pc_type bjacobi 
> -sub_pc_type ilu 
> -sub_pc_factor_levels 3 
> -sub_pc_factor_fill 6 
> 
> Now, we want to use multiple GPUs and I would like to know if there is a 
> better solver and preconditioner pair to apply in this case.
> 
> Yours sincerely,
> Ramoni Z. S . Azevedo
> 
> 



Re: [petsc-users] Error in configuring PETSc with Cygwin on Windows by using Intel MPI

2023-11-08 Thread Barry Smith

   Send the file $PETSC_ARCH/lib/petsc/conf/configure.log 



> On Nov 8, 2023, at 12:20 AM, 程奔  wrote:
> 
> Hello,
> Recently I try to install PETSc with Cygwin since I'd like to use PETSc with 
> Visual Studio on Windows10 plateform.For the sake of clarity, I firstly list 
> the softwares/packages used below:
> 1. PETSc: version 3.19.2
> 2. VS: version 2022 
> 3. Intel MPI: download Intel oneAPI Base Toolkit and HPC Toolkit
> 4. Cygwin: see the picture attatched (see picture cygwin)
> 
> 
> And the compiler option in configuration is:
>  ./configure --prefix=/cygdrive/g/mypetsc/petsc2023  --with-cc='win32fe cl' 
> --with-fc='win32fe ifort' --with-cxx='win32fe cl' --with-shared-libraries=0 
> --with-mpi-include=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/include 
> --with-mpi-lib=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/libTherefore, I write 
> this e-mail to look for your help.
> /release/impi.lib 
> --with-mpiexec=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/bin/mpiexec -localonly
> 
> 
> 
> 
> but there return an error:
> *
>   OSError while running ./configure
> -
>   Cannot run executables created with FC. If this machine uses a batch system
>   to submit jobs you will need to configure using ./configure with the 
> additional option
>   --with-batch.
>   Otherwise there is problem with the compilers. Can you compile and run code 
> with your
>   compiler '/cygdrive/g/mypetsc/petsc-3.19.2/lib/petsc/bin/win32fe/win32fe 
> ifort'?
>   See https://petsc.org/release/faq/#error-libimf
> *
> 
> 
> 
> Then I try to open configure.log in petsc, but there turnout an error that I 
> can't open it.(see picture 1)
> 
> And then I right click on properties and click safety,it just turnout "The 
> permissions on test directory are incorrectly ordered.which may cause some 
> entries to be ineffective." (see picture 2)
> 
> And it also likely seen “NULL SID” as the top entry in permission lists.(see 
> picture 3)
> 
> Then i follow this 
> blog(https://blog.dhampir.no/content/forcing-cygwin-to-create-sane-permissions-on-windows)
>  to edit /etc/fstab in Cygwin, and add “noacl” to the mount options for 
> /cygdrive.
> 
> But it's not working.
> 
> So I can't sent configure.log to you guys, it seems cygwin that installed in 
> my computer happened to some problem.
> 
> Mayebe the error happened in the configure on petsc just because of this 
> reason.
> 
> 
> 
> So I wrrit this email to report my problem and ask for your help.  
> 
> 
> Looking forward your reply!
> 
> 
> sinserely,
> Cheng.
> 



[petsc-users] Better solver and preconditioner to use multiple GPU

2023-11-08 Thread Ramoni Z. Sedano Azevedo
Hey!

I am using PETSC in Fortran code and we apply the MPI process to
parallelize the code.

At the moment, the options that have been used are
-ksp_monitor_true_residual
-ksp_type bcgs
-pc_type bjacobi
-sub_pc_type ilu
-sub_pc_factor_levels 3
-sub_pc_factor_fill 6

Now, we want to use multiple GPUs and I would like to know if there is a
better solver and preconditioner pair to apply in this case.

Yours sincerely,
Ramoni Z. S . Azevedo


Re: [petsc-users] Error in configuring PETSc with Cygwin on Windows by using Intel MPI

2023-11-08 Thread 程奔
Sorry, the configure is 
./configure --prefix=/cygdrive/g/mypetsc/petsc2023  --with-cc='win32fe cl' 
--with-fc='win32fe ifort' --with-cxx='win32fe cl' --with-shared-libraries=0 
--with-mpi-include=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/include 
--with-mpi-lib=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/lib/release/impi.lib 
--with-mpiexec=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/bin/mpiexec -localonly

-原始邮件-
发件人:程奔 
发送时间:2023-11-08 13:20:21 (星期三)
收件人: petsc-users@mcs.anl.gov
主题: Error in configuring PETSc with Cygwin on Windows by using Intel MPI


Hello,
Recently I try to install PETSc with Cygwin since I'd like to use PETSc with 
Visual Studio on Windows10 plateform.For the sake of clarity, I firstly list 
the softwares/packages used below:
1. PETSc: version 3.19.2
2. VS: version 2022 
3. Intel MPI: download Intel oneAPI Base Toolkit and HPC Toolkit
4. Cygwin: see the picture attatched (see picture cygwin)


And the compiler option in configuration is:
 ./configure --prefix=/cygdrive/g/mypetsc/petsc2023  --with-cc='win32fe cl' 
--with-fc='win32fe ifort' --with-cxx='win32fe cl' --with-shared-libraries=0 
--with-mpi-include=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/include 
--with-mpi-lib=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/libTherefore, I write 
this e-mail to look for your help.
/release/impi.lib 
--with-mpiexec=/cygdrive/g/Intel/oneAPI/mpi/2021.10.0/bin/mpiexec -localonly




but there return an error:
*
  OSError while running ./configure
-
  Cannot run executables created with FC. If this machine uses a batch system
  to submit jobs you will need to configure using ./configure with the 
additional option
  --with-batch.
  Otherwise there is problem with the compilers. Can you compile and run code 
with your
  compiler '/cygdrive/g/mypetsc/petsc-3.19.2/lib/petsc/bin/win32fe/win32fe 
ifort'?
  See https://petsc.org/release/faq/#error-libimf
*






Then I try to open configure.log in petsc, but there turnout an error that I 
can't open it.(see picture 1)

And then I right click on properties and click safety,it just turnout "The 
permissions on test directory are incorrectly ordered.which may cause some 
entries to be ineffective." (see picture 2)

And it also likely seen “NULL SID” as the top entry in permission lists.(see 
picture 3)

Then i follow this 
blog(https://blog.dhampir.no/content/forcing-cygwin-to-create-sane-permissions-on-windows)
 to edit /etc/fstab in Cygwin, and add “noacl” to the mount options for 
/cygdrive.

But it's not working.

So I can't sent configure.log to you guys, it seems cygwin that installed in my 
computer happened to some problem.


Mayebe the error happened in the configure on petsc just because of this reason.




So I wrrit this email to report my problem and ask for your help.  


Looking forward your reply!


sinserely,
Cheng.


[petsc-users] Fortran, Hypre, PETSc, 64bit-integers

2023-11-08 Thread Bastian Löhrer


  
  
Hello all,
I am wondering about the right datatype to use for Hypre routines
  in a Fortran code.
The Hypre manual provides a conversion table from C to Fortran on
  page 80
     https://hypre.readthedocs.io/_/downloads/en/latest/pdf/
but the small example that follows is a bit contradictory. To be
  exact:
The table on page 80 says: Instead of C "Hypre_Type" use Fortran
  "integer*8".
On the next page they give the example of 

    HYPRE_IJMatrixSetValues(HYPRE_IJMatrix matrix, int nrows,
  ...)
and they say that Fortran types should be 

    integer*8 :: matrix
      integer :: nrows
However, the documentation of HYPRE_IJMatrixSetValues on page 102
  actually has the signature

    HYPRE_IJMatrixSetValues(HYPRE_IJMatrix matrix, HYPRE_Int
  nrows, ...)
So apparently "HYPRE_Int" is not to be misunderstood as
  "Hypre_Type", which would be replaced by integer*8, but instead as
  a plain integer, i.e. integer*4 in Fortran.
Can you confirm that?
Also is that Hypre_Int always an integer*4 or is it adjusted to
  match PETScInt?
Best regards,
  Bastian Löhrer






-- 
  

  Dipl.-Ing. Bastian Löhrer


  Technische Universität Dresden
  Fakultät für Maschinenwesen
  Institut für Strömungsmechanik
  01062 Dresden




  

  tel: 
  +49 351 463-37496 


  cell:
  +49 152 241-72799 


  fax: 
  +49 351 463-35246 


  mail:
   bastian.loeh...@tu-dresden.de
  

  


  Besucheradresse / Visitor address:
  
Zeuner-Bau Zi 152A
George-Bähr-Straße 3c
01062 Dresden