diff --git a/src/gray_params.f90 b/src/gray_params.f90 index 7413227..666a7bc 100644 --- a/src/gray_params.f90 +++ b/src/gray_params.f90 @@ -166,7 +166,7 @@ contains integer, intent(in), optional :: unit ! local variables - integer :: u + integer :: u, iostat if (present(unit)) then u=unit @@ -174,6 +174,10 @@ contains u = get_free_unit() end if open(u,file=filenm,status='old',action='read',iostat=iostat) + if (iostat>0) then + print'(a)', 'gray_params file not found!' + call EXIT(1) + end if ! Raytracing ! ========================================================================