diff --git a/src/fpm_meta.f90 b/src/fpm_meta.f90 index e03d7d23c8..6ae48e10fb 100644 --- a/src/fpm_meta.f90 +++ b/src/fpm_meta.f90 @@ -1077,7 +1077,8 @@ subroutine mpi_compiler_match(language,wrappers,compiler,which_one,mpilib,error) screen = mpi_wrapper_query(mpilib,wrappers(i),'compiler',verbose=.false.,error=error) - print *, 'mpi wrapper ',wrappers(i)%s,' lib=',MPI_TYPE_NAME(mpilib),' compiler=',screen%s,' error=',error%message + print *, 'mpi wrapper ',wrappers(i)%s,' lib=',MPI_TYPE_NAME(mpilib),' compiler=',screen%s + if (allocated(error)) print *, ' error=',error%message if (allocated(error)) return