MMPBSA is producing Segmentaion fault

Dear HPC support and users,

I am trying to run a script for MMPBSA analysis but it is not working. What can I try to solve the segmentation fault problem?

what did you try:
changing -n and -c numbers, trying on CPU

what didn’t work:
segmentation fault

what was the expected result:
MMPBSA computation of binding free energies

what was the error message:
eading frame 0 time 50000.000 /var/spool/slurmd/job5993458/slurm_script: line 10: 1886144 Segmentation fault (core dumped) ./g_mmpbsa -f stable.xtc -s md_0_2.tpr -n index2.ndx -i pbsa.mdp -b 30000 -e 50000 -pdie 2 -pbsa -decomp < pbsa.txt

path to the relevant files (logs, sbatch script, etc):

#SBATCH -J gromacs
#SBATCH -e gromacs-error.e%j
#SBATCH -o gromacs-out.o%j
#SBATCH -n 2
#SBATCH -c 1
#SBATCH -p shared-gpu
#SBATCH --gres=gpu:2
#SBATCH -t 00-12:00:00
./g_mmpbsa -f stable.xtc -s md_0_2.tpr -n index2.ndx -i pbsa.mdp -b 30000 -e 50000 -pdie 2 -pbsa -decomp <pbsa.txt

admin edit: moved to category HPC issues and code formating.

Dear @Khalil.BenHassine and other users asking for help:

to enhance the support experience: post your request in the category HPC Support => HPC issues and format your code using appropriate syntax, it helps to read the posts.

In your sbatch script, it appears you are running ./g_mmpbsa. Where does it come from? Did you compiled it yourself? If yes, on which server?