<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi,<br>
<br>
I have solved the problem installing only the petsc-openmpi
packages:<br>
<br>
<pre>~]# 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
</pre>
<pre>
</pre>
<br>
<br>
<br>
</body>
</html>