ソースファイルが
\documentclass[a4paper,dvipdfm]{article}
\usepackage{amsmath, amsthm, amssymb,graphicx, setspace, hyperref}
となっていて、dvipdfmをdvipdfmxに変えてコンパイルしたところ


dvipdfmx:fatal: Something is wrong. Are you sure this is a DVI file?

Output file removed.
ptex2pdf processing of test.tex fails.

とでました。どうやればエラーをなくせるのでしょう?教えていただければ幸いです