deallocate-CG.inc


#ifdef use_allocatable
      if (allocated(w)) deallocate( w )
#else
# if defined(mmsl)
      if (ipw .ne. 0) then
       call MMRELBLK ('w-CG', '-CG', ipw, memerr)
      endif
# elif defined(mms)
      if (ipw .ne. 0) call RELVAR ('w-CG', memerr)
# elif defined(sun) || defined(hpux) || defined(irix) || defined(osf1)
      if (ipw .ne. 0) call FREE (ipw)
# elif defined(aix)
      if (ipw .ne. 0) call FREE (%val(ipw))
# elif defined(cray)
      if (ipw .ne. 0) call HPDEALLC (ipw, memerr, 0)
# endif
#endif
#ifdef use_allocatable
      if (allocated(p)) deallocate( p )
#else
# if defined(mmsl)
      if (ipp .ne. 0) then
       call MMRELBLK ('p-CG', '-CG', ipp, memerr)
      endif
# elif defined(mms)
      if (ipp .ne. 0) call RELVAR ('p-CG', memerr)
# elif defined(sun) || defined(hpux) || defined(irix) || defined(osf1)
      if (ipp .ne. 0) call FREE (ipp)
# elif defined(aix)
      if (ipp .ne. 0) call FREE (%val(ipp))
# elif defined(cray)
      if (ipp .ne. 0) call HPDEALLC (ipp, memerr, 0)
# endif
#endif
#ifdef use_allocatable
      if (allocated(r)) deallocate( r )
#else
# if defined(mmsl)
      if (ipr .ne. 0) then
       call MMRELBLK ('r-CG', '-CG', ipr, memerr)
      endif
# elif defined(mms)
      if (ipr .ne. 0) call RELVAR ('r-CG', memerr)
# elif defined(sun) || defined(hpux) || defined(irix) || defined(osf1)
      if (ipr .ne. 0) call FREE (ipr)
# elif defined(aix)
      if (ipr .ne. 0) call FREE (%val(ipr))
# elif defined(cray)
      if (ipr .ne. 0) call HPDEALLC (ipr, memerr, 0)
# endif
#endif
#ifdef use_allocatable
      if (allocated(xold)) deallocate( xold )
#else
# if defined(mmsl)
      if (ipxold .ne. 0) then
       call MMRELBLK ('xold-CG', '-CG', ipxold, memerr)
      endif
# elif defined(mms)
      if (ipxold .ne. 0) call RELVAR ('xold-CG', memerr)
# elif defined(sun) || defined(hpux) || defined(irix) || defined(osf1)
      if (ipxold .ne. 0) call FREE (ipxold)
# elif defined(aix)
      if (ipxold .ne. 0) call FREE (%val(ipxold))
# elif defined(cray)
      if (ipxold .ne. 0) call HPDEALLC (ipxold, memerr, 0)
# endif
#endif