I need to typeset a pseudocode algorithm. (I use TexStudio on Windows 7.) If I put the code in a single new tex file, I can see the pdf file. But, I cannot see it if I put it inside one of the other tex files. I have many tex files that cannot be shown here. But, the other parts can be displayed well, only the algorithm part disappear.
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{algpseudocode}
\usepackage{algorithm}
\begin{document}
\begin{algorithm*} **// add star here**
\caption{Euclid’s algorithm}\label{euclid}
\begin{algorithmic}[1]
\Procedure{Euclid}{$a,b$}\Comment{The g.c.d. of a and b}
\State $r\gets a\bmod b$
\While{$r\not=0$}\Comment{We have the answer if r is 0}
\State $a\gets b$
\State $b\gets r$
\State $r\gets a\bmod b$
\EndWhile\label{euclidendwhile}
\State \textbf{return} $b$\Comment{The gcd is b}
\EndProcedure
\end{algorithmic}
\end{algorithm*}
\end{document}
Compilation works fine (I get no errors), but the algorithm is nowhere to be found in the PDF file. To repeat, I use the following packages:
\usepackage{amsmath}
\usepackage{algpseudocode}
\usepackage{algorithm}
If I put the algorithm part in this way :
mark1
"the algorithm part"
mark2
UPDATE
The output :
----------------------------------
caption
-----------------------------------
the algorithm, but , it crosses two columns , is it possible to make it only occupy one column, my article is two column style.
I can see the "mark1" and "mark2" in pdf but not the "the algorithm part".
Any idea?

\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – jub0bs Aug 09 '14 at 17:54algorithmis a float object, so your algorithm might be in a different page than the one you wrote the code in. – Gonzalo Medina Aug 09 '14 at 17:56pdflatex <nameofyourfile>from the command line (cdto the folder you're working in first..) and you should find a pdf of the same name afterwards. – greyshade Aug 09 '14 at 18:56\endinputor\end{document}. – egreg Aug 09 '14 at 20:08algorithmenvironment and the caption (but leaving thealgorithmicone). What do you see in the PDF then? – jub0bs Aug 09 '14 at 20:17twocolumnclass option? – jub0bs Aug 09 '14 at 21:59multicolsenvironment, but it's not in the code of your question! The code in your question must be complete, i.e. it must exactly reflect the minimal working example (MWE) you use on your machine to try and solve this problem. Otherwise, you're not giving us all the information we need. That's why we're not getting anywhere here: you're doling out information instead of telling us everything. – jub0bs Aug 10 '14 at 06:41