OK, feel free to post the error here or in an MPI.jl issue if you get stuck on it. Looking at your script, it should be sufficient to replace the current julia command with mpirun julia test.jl
(assuming mpirun supports PBS, which it should), and enclose your test script in:
using MPI
mgr = MPI.start_main_loop(MPI.MPI_TRANSPORT_ALL)
# code
MPI.stop_main_loop(mgr)