Project

General

Profile

Bug #2827

gmx tune_pme segfaults while trying to run benchmark

Added by Alexey Shvetsov 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Hi!

I'm trying to run gmx tune_pme using 2019 release and seems it segfaults

I'm running it through slurm

#!/bin/bash
#SBATCH --nodes=32
#SBATCH --tasks-per-node=14
#SBATCH --cpus-per-task=2
#SBATCH -p compute
#SBATCH -d singleton
#SBATCH -J si16_dsdna_at
#SBATCH -o si16_dsdna_at-%j.out
#SBATCH -e si16_dsdna_at-%j.err

module purge all 
module load gromacs/2018/bdw

export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
# path
cd ${HOME}/projects/brazzein/310K/tune-pme
export MODEL_NAME=brazzein
export STAGE=eq_npt
export MPIRUN=mpiexec
export NPME=all
export PMEMIN=0.0
export PMEMAX=0.5
export STEPS="20000" 
export RESETSTEP="0" 
echo "Running ${SLURM_NTASKS} with ${SLURM_CPUS_PER_TASK} threads per task" 
gmx tune_pme -bench -mdrun $(which mdrun_mpi) -np ${SLURM_NTASKS} -npstring none -npme ${NPME} -min ${PMEMIN} -max ${PMEMAX} -ntpr 1 -steps ${STEPS} -resetstep ${RESETSTEP} -ntomp ${SLURM_CPUS_PER_TASK} -s ${MODEL_NAME}.${STAGE}.tpr -p ${MODEL_NAME}.${STAGE}.${SLURM_NTASKS}x${SLURM_CPUS_PER_TASK}.perf.out -err ${MODEL_NAME}.${STAGE}.${SLURM_NTASKS}x${SLURM_CPUS_PER_TASK}.bencherr.log -deffnm ${MODEL_NAME}.${STAGE}.${SLURM_NTASKS}x${SLURM_CPUS_PER_TASK}

running it though gdb shows error with accessing opt


#0  0x00007ffff67bc82d in ?? () from /lib64/libc.so.6
#1  0x00007ffff752e1ce in couple_files_options (nfile=53, fnm=0x7ffff7fcb2e0 <gmx_tune_pme(int, char**)::fnm>)
    at /home/alexxy/Develop/gromacs/src/gromacs/gmxana/gmx_tune_pme.cpp:2038
#2  0x00007ffff752f7d7 in gmx_tune_pme (argc=1, argv=0x7fffffffd630)
    at /home/alexxy/Develop/gromacs/src/gromacs/gmxana/gmx_tune_pme.cpp:2346
#3  0x00007ffff7228d1b in gmx::(anonymous namespace)::CMainCommandLineModule::run (this=0x555555599100, argc=3, argv=0x7fffffffd630)
    at /home/alexxy/Develop/gromacs/src/gromacs/commandline/cmdlinemodulemanager.cpp:133
#4  0x00007ffff722a992 in gmx::CommandLineModuleManager::run (this=0x7fffffffd508, argc=3, argv=0x7fffffffd630)
    at /home/alexxy/Develop/gromacs/src/gromacs/commandline/cmdlinemodulemanager.cpp:589
#5  0x000055555556059c in main (argc=4, argv=0x7fffffffd628) at /home/alexxy/Develop/gromacs/src/programs/gmx.cpp:60
(gdb) up
#1  0x00007ffff752e1ce in couple_files_options (nfile=53, fnm=0x7ffff7fcb2e0 <gmx_tune_pme(int, char**)::fnm>)
    at /home/alexxy/Develop/gromacs/src/gromacs/gmxana/gmx_tune_pme.cpp:2038
2038            bBench = (0 == std::strncmp(opt, "-b", 2));
(gdb) up
#2  0x00007ffff752f7d7 in gmx_tune_pme (argc=1, argv=0x7fffffffd630)
    at /home/alexxy/Develop/gromacs/src/gromacs/gmxana/gmx_tune_pme.cpp:2346
2346        couple_files_options(NFILE, fnm);
(gdb) up
#3  0x00007ffff7228d1b in gmx::(anonymous namespace)::CMainCommandLineModule::run (this=0x555555599100, argc=3, argv=0x7fffffffd630)
    at /home/alexxy/Develop/gromacs/src/gromacs/commandline/cmdlinemodulemanager.cpp:133
133                 return mainFunction_(argc, argv);
(gdb) up
#4  0x00007ffff722a992 in gmx::CommandLineModuleManager::run (this=0x7fffffffd508, argc=3, argv=0x7fffffffd630)
    at /home/alexxy/Develop/gromacs/src/gromacs/commandline/cmdlinemodulemanager.cpp:589
589             rc = module->run(argc, argv);
(gdb) up
#5  0x000055555556059c in main (argc=4, argv=0x7fffffffd628) at /home/alexxy/Develop/gromacs/src/programs/gmx.cpp:60
60              int rc = manager.run(argc, argv);
(gdb) up
Initial frame selected; you cannot go up.

So opt became nullptr and this causes segfault

Associated revisions

Revision 934caa22 (diff)
Added by Paul Bauer 6 months ago

Fix tune_pme

There was an issue with the file option for the tpr file being empty
that caused a segmentation fault.

Fixes #2827

Change-Id: I2702898d071d6e9325fa2e7ebb223b9043b7109e

History

#1 Updated by Mark Abraham 7 months ago

  • Target version set to 2019.1

#2 Updated by Paul Bauer 7 months ago

The issue was intorduced in e2e75fc35947f530cb0c58c914bc0e9fa1994318, but I can't see where because none of the input string handling was touched there as far as I can see

#3 Updated by Paul Bauer 6 months ago

Correcting the commit, it was introduced in c3f2af3de49dbfba6bb7fccb0553a4e205e70c66 instead, makes much more sense.

#4 Updated by Gerrit Code Review Bot 6 months ago

Gerrit received a related patchset '1' for Issue #2827.
Uploader: Paul Bauer ()
Change-Id: gromacs~release-2019~I2702898d071d6e9325fa2e7ebb223b9043b7109e
Gerrit URL: https://gerrit.gromacs.org/9151

#5 Updated by Paul Bauer 6 months ago

  • Status changed from New to Fix uploaded

#6 Updated by Paul Bauer 6 months ago

  • Status changed from Fix uploaded to Resolved

#7 Updated by Paul Bauer 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF