Electrostatics / apbs-pdb2pqr

APBS - software for biomolecular electrostatics and solvation
http://www.poissonboltzmann.org/
127 stars 62 forks source link

SLURM and APBS #469

Closed kozlac closed 7 years ago

kozlac commented 7 years ago

From one of our users:

Hi everyone,

I was wondering if anyone has any experience with using the SLURM workload manager (https://slurm.schedmd.com/) along with APBS? I have installed an MPI-compiled APBS-1.4.2 and it works just fine for small tests when I run it with the mg-auto, but when I use mg-para I get:

Parsing input file oneMol.in...
read
Parsed input file.
Got paths for 1 molecules
Reading PQR-format atom data from oneMol.pqr.
NOsh_setupMGPARA:  There are too few processors (1) to satisfy requirements (4)
/var/spool/slurmd/job12336001/slurm_script: line 9:  6603 Segmentation fault
(core dumped) apbs oneMol.in

My SBATCH script looks like this:

#! /bin/bash -l
#
#SBATCH -A snic2016-7-97
#SBATCH -p core -n 4 -C mem64GB
#SBATCH -t 60:00
#SBATCH -J oneMol_test
#
module load pgi openmpi
apbs oneMol.in

and the input file (oneMol.in) like this:

read
    mol pqr oneMol.pqr
end
elec
    mg-para
    ofrac 0.1
    pdime 2 2 1
    dime 97 129 129
    cglen 284.7058 90.9908 79.7538
    fglen 187.4740 73.5240 66.9140
    cgcent mol 1
    fgcent mol 1
    mol 1
    lpbe
    bcfl sdh
    pdie 2.0000
    ion charge 1 conc 0.150 radius 1.02
    ion charge -1 conc 0.150 radius 1.81
    sdie 78.5400
    srfm smol
    chgm spl2
    sdens 10.00
    srad 1.40
    swin 0.30
    temp 298.15
    calcenergy total
    calcforce no
    write pot dx oneMol.pqr
end
print 
    elecEnergy 1 
end
quit

My current thinking is that the SLURM and APBS are not communicating properly (i.e. SLURM is supposed to be allocating 4 cores to the APBS calculations, but APBS only sees 1).

kozlac commented 7 years ago

The issue was in the apbs/CMakeLists.txt file. The maloc folder was before the declaration of HAVE_MPI_H thus all maloc's preprocessor #if define were evaluating to false. See commit e3db9c1