> El 19 nov 2017, a las 10:16, Praveen C <[email protected]> escribió:
> 
> Dear all
> 
> In the main program, if I have a line like
> 
>   call PetscInitialize('param.in', ierr); CHKERRQ(ierr)
> 
> compiling with mpifort gives
> 
> main.f95(17): error #6353: A RETURN statement is invalid in the main program.
>   call PetscInitialize('param.in', ierr); if (ierr .ne. 0) then ; call 
> PetscErrorF(ierr); return; endif
> —————————————————————————————————————————————^
> 
> It compiles fine with gfortran. What can I do for the ifort case ?
> 
> Thanks
> praveen

Use CHKERRA(ierr) in the main program and CHKERRQ(ierr) in the subroutines.

On the other hand, you should not use CHKERRA(ierr) after PetscInitialize 
because it assumes that MPI has been correctly initialized.

Jose

Reply via email to