[petsc-users] PETSc on fedora 36. Solved

Antonio T. sagitter sagitter at fedoraproject.org
Wed Aug 24 14:32:48 CDT 2022


New builds will be in the `updates-testing` repositories soon: 
https://bodhi.fedoraproject.org/updates/FEDORA-2022-b584048fe7

Or get them from 
https://koji.fedoraproject.org/koji/buildinfo?buildID=2051418

On 23/08/22 18:03, Rafel Amer Ramon wrote:
> Hi,
> 
> I have solved the problem installing only the petsc-openmpi packages:
> 
> ~]# rpm -qa | grep petsc
> petsc-openmpi-3.16.4-3.fc36.x86_64
> petsc-openmpi-devel-3.16.4-3.fc36.x86_64
> python3-petsc-openmpi-3.16.4-3.fc36.x86_64
> ~]#
> 
> ~$ cat e.c
> #include <petsc.h>
> 
> int main(int argc, char **argv) {
>    PetscErrorCode ierr;
>    PetscMPIInt    rank;
>    char processor_name[MPI_MAX_PROCESSOR_NAME];
>    int  namelen;
> 
>    ierr = PetscInitialize(&argc,&argv,NULL,
>        "Compute e in parallel with PETSc.\n\n"); if (ierr) return ierr;
> 	
>    ierr = MPI_Comm_rank(PETSC_COMM_WORLD,&rank); CHKERRQ(ierr);
>    MPI_Get_processor_name(processor_name,&namelen);
> 
>    ierr = PetscPrintf(PETSC_COMM_SELF,"My rank is %d on %s\n",rank,processor_name); CHKERRQ(ierr);
>     
>    return PetscFinalize();
> }
> 
> ~$ mpicc -o e e.c -I/usr/include/openmpi-x86_64/petsc -lpetsc
> 
> ~$ $ mpirun -np 16 --hostfile ~/hosts ./e
> My rank is 4 on mce-eseiaat.com
> My rank is 5 on mce-eseiaat.com
> My rank is 6 on mce-eseiaat.com
> My rank is 7 on mce-eseiaat.com
> My rank is 0 on mce-eseiaat.com
> My rank is 1 on mce-eseiaat.com
> My rank is 2 on mce-eseiaat.com
> My rank is 3 on mce-eseiaat.com
> My rank is 15 on worker2.mce-eseiaat.com
> My rank is 11 on worker1.mce-eseiaat.com
> My rank is 12 on worker2.mce-eseiaat.com
> My rank is 9 on worker1.mce-eseiaat.com
> My rank is 13 on worker2.mce-eseiaat.com
> My rank is 10 on worker1.mce-eseiaat.com
> My rank is 14 on worker2.mce-eseiaat.com
> My rank is 8 on worker1.mce-eseiaat.com
> ~$
> 
> Thank you!!!
> 
> Best regards,
> 
> Rafel Amer
> 
>   
> 
> 
> 
> 

-- 
---
Antonio Trande
Fedora Project
mailto: sagitter at fedoraproject.org
GPG key: 0xCC1CFEF30920C8AE
GPG key server: https://keyserver1.pgp.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xCC1CFEF30920C8AE.asc
Type: application/pgp-keys
Size: 1798 bytes
Desc: OpenPGP public key
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220824/b840122e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220824/b840122e/attachment-0001.sig>


More information about the petsc-users mailing list