Hi Pawan,
Try the following suggestions. First, change the first line of code to say bash instead of sh, as bash or csh shells are most common in my experience; so this could be the issue. Second, you are also missing pertinent information after your resource info flag (-l), like the number of nodes. Third, your wall time is incredibly excessive. Do you realize that 480 hours is 20 full days (!) and yet most BEAST runs should finish in 7 or less? This may exceed allocations for your cluster, which often have walltime limits. (Of course, your limit may be 480 h, but why the overkill?) Other issues are that you probably need to specify the working directory, and we do this on a cluster by adding "cd $PBS_O_WORKDIR" followed by "exit 0" to the end of the code; this is just optional, for you to try. The other way to do this is to "cd" to the working directory before the beast commands ("java..."), assuming the input file is in the working directory. Last, I don't think you need the pbs output log, as you should get standard error and out anyway, and I would also change the beast output file (after ">") to have the extension ".out".
Here is an edited version of the file, which I would try, but remember to name with extension ".sh":
#!/bin/bash
#---Job name
#PBS -l nodes=1:ppn=1,pmem=2gb,walltime=168:00:00
#PBS -N beast1kmn
java -Xmx4048M -Djava.library.path=/opt/software/beagle/lib -jar /opt/software/BEAST/BEASTv1.8.0/lib/beast.jar -beagle_CPU Inputfile_name.xml > Inputfile_name.out
#--working directory
#--option1:
cd $PBS_O_WORKDIR
exit 0
Please let me know if this runs for you. Thanks.
Best,
Justin