Calculation starts on the login node before executing the qsub command

Typing the commands as described in the manual, the calculation starts on the login node before executing the qsub command.

GSICUSER@login1:~> #!/bin/bash
GSICUSER@login1:~> #$ -cwd
GSICUSER@login1:~> #$ -l f_node=2
GSICUSER@login1:~> #$ -l h_rt=0:30:0
GSICUSER@login1:~> . /etc/profile.d/
GSICUSER@login1:~> module load matlab/R2017a
GSICUSER@login1:~> matlab -nodisplay -r AlignMultipleSequencesExample

This is because you are directly executing commands on the shell that you need to write in the batch script.
Instead of executing them directly, create a batch script file and specify it with the qsub command.

If you are not familiar with terms such as batch script and shell,  please see "1.Beginners of UNIX/LINUX" at "I'm a beginner, I don't know what to do."