NAG Library Manual, Mark 27.2
```    Program e04ne_p0w_fe
!     E04NE_P0W_F Example Program Text

!     Mark 27.2 Release. NAG Copyright 2021.

!     .. Use Statements ..
Use iso_c_binding, Only: c_ptr
Use nagad_library, Only: e04nc_p0w_f, e04ne_p0w_f, e04wb_p0w_f
Use nag_library, Only: nag_wp
!     .. Implicit None Statement ..
Implicit None
!     .. Parameters ..
Integer, Parameter               :: lcwsav = 1, liwsav = 610,            &
llwsav = 120, lrwsav = 475, nin = 5, &
nout = 6
!     .. Local Scalars ..
Real (Kind=nag_wp)               :: obj
Integer                          :: i, ifail, iter, lda, ldc, liwork,    &
lwork, m, n, nclin, sdc
!     .. Local Arrays ..
Real (Kind=nag_wp), Allocatable  :: a(:,:), b(:), bl(:), bu(:), c(:,:),  &
clamda(:), cvec(:), rwsav(:),        &
work(:), x(:)
Integer, Allocatable             :: istate(:), iwork(:), iwsav(:), kx(:)
Logical, Allocatable             :: lwsav(:)
Character (80), Allocatable      :: cwsav(:)
!     .. Intrinsic Procedures ..
Intrinsic                        :: max
!     .. Executable Statements ..
Write (nout,*) 'E04NE_P0W_F Example Program Results'

!     Skip heading in data file

liwork = n
ldc = max(1,nclin)
lda = max(1,m)

If (nclin>0) Then
sdc = n
Else
sdc = 1
End If

!     This particular example problem is of type LS1, so we allocate
!     A(LDA,N), CVEC(1), B(M) and define LWORK as below
If (nclin>0) Then
lwork = 2*n**2 + 9*n + 6*nclin
Else
lwork = 9*n
End If

Allocate (istate(n+nclin),kx(n),iwork(liwork),c(ldc,sdc),bl(n+nclin),    &
bu(n+nclin),cvec(1),x(n),a(lda,n),b(m),clamda(n+nclin),work(lwork),    &
iwsav(liwsav),lwsav(llwsav),cwsav(lcwsav),rwsav(lrwsav))

!     Initialise e04ne
ifail = 0
Call e04wb_p0w_f('E04NCA',cwsav,lcwsav,lwsav,llwsav,iwsav,liwsav,rwsav,  &
lrwsav,ifail)
!     Set option via string
Call e04ne_p0w_f('Print Level = 1',lwsav,iwsav,rwsav)
!     Solve the problem
ifail = -1