I think I found the problem, but I don't know how to solve it.
I made the following test:
I replaced Do I=1,NPOIN with DO I=1,392045 where 392045 is the total number of nodes in the mesh and then I asked for the KNOGL instead of the KNOLG.
DO I=1,392045
gn=MESH%KNOGL%I(I)
write(LU,*)I,gn
end do
the printing result is, gn=0 up to I=294000 and then gn≠0 for 294000<I>392045.
I'm running with 4 parallel processos, so each processors should solve 25% of the mesh. The values where gn≠0 are about 25% of the MESH, and the other 294000 nodes where gn=0 correspond to 75% of the mesh.
I do an other excercise:
DO I=1,NPOIN
gn=MESH%KNOLG%I(I)
write(LU,*)I,gn
end do
NPOIN=98442 ~ 25% of the MESH.
It seems that is running the code just in one processor.
How can I ask the program to run this code in all the processors involved?