File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- 1.00000000E+00 1.00000000E+00
2- 1.00000000E+00 1.00000000E+00
3- 1.00000000E+00 1.00000000E+00
1+ This is an example for open
Original file line number Diff line number Diff line change @@ -258,9 +258,11 @@ contains
258258 !> Update the location of the error message
259259 pure subroutine state_update_location(this, where_at)
260260 class(state_type), intent(inout) :: this
261- character(len=*), intent(in) :: where_at
261+ character(len=*), optional, intent(in) :: where_at
262262
263- if (len_trim(where_at) > 0) this%where_at = adjustl(where_at)
263+ if (present(where_at)) then
264+ if (len_trim(where_at) > 0) this%where_at = adjustl(where_at)
265+ end if
264266
265267 end subroutine state_update_location
266268
Original file line number Diff line number Diff line change @@ -5698,10 +5698,8 @@ submodule(stdlib_lapack_base) stdlib_lapack_blas_like_l2
56985698 ! Local Scalars
56995699 integer(${ik}$) :: i, j
57005700 ! Executable Statements
5701- do j = 1, n
5702- do i = 1, m
5703- x(i,j) = d(i) * x(i,j)
5704- end do
5701+ do concurrent(j=1:n, i=1:m)
5702+ x(i,j) = d(i) * x(i,j)
57055703 end do
57065704 return
57075705 end subroutine stdlib${ii}$_${ri}$lascl2
@@ -5721,10 +5719,8 @@ submodule(stdlib_lapack_base) stdlib_lapack_blas_like_l2
57215719 ! Local Scalars
57225720 integer(${ik}$) :: i, j
57235721 ! Executable Statements
5724- do j = 1, n
5725- do i = 1, m
5726- x(i,j) = d(i) * x(i,j)
5727- end do
5722+ do concurrent(j=1:n, i=1:m)
5723+ x(i,j) = d(i) * x(i,j)
57285724 end do
57295725 return
57305726 end subroutine stdlib${ii}$_${ci}$lascl2
Original file line number Diff line number Diff line change @@ -80,18 +80,18 @@ module stdlib_linalg_state
8080 character(len=*),optional,intent(in) :: where_at
8181
8282 character(len=:),allocatable :: err_msg
83+ type(linalg_state_type) :: local_err
8384
8485 if (present(ierr_out)) then
8586 ! Return error flag
8687 ierr_out = ierr
87- ! Update location if requested
88- if (present(where_at)) call ierr_out%update_location(where_at)
88+ ! Update location if requested (update_location handles optional internally)
89+ call ierr_out%update_location(where_at)
8990 elseif (ierr%error()) then
90- if (present(where_at)) then
91- err_msg = '['//trim(where_at)//'] returned '//ierr%print_msg()
92- else
93- err_msg = ierr%print()
94- end if
91+ ! Use local copy to update location, then print
92+ local_err = ierr
93+ call local_err%update_location(where_at)
94+ err_msg = local_err%print()
9595 error stop err_msg
9696 end if
9797
You can’t perform that action at this time.
0 commit comments