Generate a Graphviz digraph structure for the DAG and write it to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dag), | intent(in) | :: | me | |||
character(len=*), | intent(in), | optional | :: | filename |
file name for diagraph |
|
character(len=*), | intent(in), | optional | :: | rankdir |
right to left orientation (e.g. 'RL') |
|
integer(kind=ip), | intent(in), | optional | :: | dpi |
resolution (e.g. 300) |
subroutine dag_save_digraph(me,filename,rankdir,dpi) class(dag),intent(in) :: me character(len=*),intent(in),optional :: filename !! file name for diagraph character(len=*),intent(in),optional :: rankdir !! right to left orientation (e.g. 'RL') integer(ip),intent(in),optional :: dpi !! resolution (e.g. 300) integer(ip) :: iunit, istat character(len=:),allocatable :: diagraph diagraph = me%generate_digraph(rankdir,dpi) open(newunit=iunit,file=filename,status='REPLACE',iostat=istat) if (istat==0) then write(iunit,fmt='(A)',iostat=istat) diagraph else write(*,*) 'error opening '//trim(filename) end if close(iunit,iostat=istat) end subroutine dag_save_digraph