Electrostatics / apbs

Software for biomolecular electrostatics and solvation calculations
http://www.poissonboltzmann.org/
Other
94 stars 26 forks source link

3.0.0 build instructions are confusing, do not work #54

Open mathog opened 4 years ago

mathog commented 4 years ago

Describe the bug Unable to build 3.0.0 from source, I think because the build instructions are confusing and/or incomplete

To Reproduce

  1. Attempt to follow instructions here: https://apbs.readthedocs.io/en/latest/getting/source.html
  2. It says to download "release" rather than do a git clone. There are two files for 3.0.0 that might plausibly fit that description (not counting different packaging), with no description of how they differ:
  https://github.com/Electrostatics/apbs/releases/download/v3.0.0/APBS-3.0.0_Source-Code.tar.gz
  https://github.com/Electrostatics/apbs/archive/v3.0.0.tar.gz
  1. 
    cd /usr/common/src
    pversion=3.0.0
    package=apbs
    altpkg=APBS
    TOPDIR=/usr/common/modules/el8/x86_64/software/${package}/${pversion}-CentOS-vanilla
    wget https://github.com/Electrostatics/apbs-pdb2pqr/releases/download/v${altpkg}-${pversion}/${altpkg}-${pversion}_Source-Code.tar.gz
    gunzip -c ${altpkg}-${pversion}_Source-Code.tar.gz | tar -xf -
    /bin/rm ${altpkg}-${pversion}_Source-Code.tar.gz
    cd ${package}-${pversion}
4.  The installation docs then say to do this after "git clone" (after first saying, do not do "git clone").  In any case
these do not work because git does not think this is a git repository.  The steps following fail whether or not these
commands are issued, I don't think they do anything in the present case.  I wonder though if the submodule update would have loaded in all the pieces which seem to cause problems further on, had this been a "git clone".

git submodule init git submodule update

5.    
(Note, "extract" is from drm_tools on sourceforge, here it is just substituting the -rtss string wherever it finds the -rtds string.)

module load msms module load nanoshaper module load cmake cp ../CMakeLists.txt ../CMakeLists.txt.dist extract -in ../CMakeLists.txt.dist -out ../CMakeLists.txt \ -rtds '_INSTALL_PATH ' -rtss "_INSTALL_PATH $TOPDIR/"

this will hopefully fix both the "can't find Python.h" and link problems

cmake -DENABLE_GEOFLOW=ON -DENABLE_PBAM=ON \ -DENABLE_BEM=ON -DENABLE_FETK=ON \ -DENABLE_PYTHON=ON -DBUILD_SHARED_LIBS=ON \ -DGET_NanoShaper=ON . 2>&1 | tee cmake_oops.log

This fails with a variety of messages for the different ON packages, all in more or less this form (see attached also):

-- Building TABIPB CMake Error at /usr/common/src/cmake-3.17.1/share/cmake-3.17/Modules/ExternalProject.cmake:2659 (message): No download info given for 'bem' and its source directory:

/usr/common/src/apbs-3.0.0/apbs/externals/bem

is not an existing non-empty directory. Please specify one of:


This is CentOS 8.  On  2020/04/21 an earlier version was built successfully with git clone like so:

pversion=1.5 #determined after it was built package=apbs TOPDIR=/usr/common/modules/el8/x86_64/software/${package}/${pversion}-CentOS-vanilla cd /usr/common/src git clone https://github.com/Electrostatics/apbs-pdb2pqr.git cd apbs-pdb2pqr git submodule init git submodule update

needs MSMS or Nanoshaper. Both are now available as modules

module load msms module load nanoshaper module load cmake #very recent release needed

Requires: OpenBLAS, installed on all nodes

mkdir -p apbs/build cd apbs/build

edit /usr/common/src/apbs-pdb2pqr/apbs/src/routines.c to change all:

for (int i=0

to

int i; for (i=0

else it stops at:

/usr/common/src/apbs-pdb2pqr/apbs/src/routines.c:5332:11: error: ?for? loop initial declarations are only allowed in C99 mode

cp ../src/routines.c ../src/routines.c.dist extract -in ../src/routines.c.dist -out ../src/routines.c \ -rtds 'for (int i = 0;' -rtss 'int i; for(i = 0;' cp ../CMakeLists.txt ../CMakeLists.txt.dist extract -in ../CMakeLists.txt.dist -out ../CMakeLists.txt \ -rtds '_INSTALL_PATH ' -rtss "_INSTALL_PATH $TOPDIR/"

this will hopefully fix both the "can't find Python.h" and link problems

cmake -DENABLE_GEOFLOW=ON -DENABLE_PBAM=ON \ -DENABLE_BEM=ON -DENABLE_FETK=ON \ -DENABLE_PYTHON=ON -DBUILD_SHARED_LIBS=ON \ -DGET_NanoShaper=ON .. make 2>&1 | tee build_2020_04_21.log


[cmake_oops.log](https://github.com/Electrostatics/apbs/files/5059953/cmake_oops.log)
sobolevnrm commented 4 years ago

Hello; I'm adding @intendo to see if he can help with this.

mathog commented 4 years ago

Since there was no response I tried building this from the github repository, even though the installation Docs appear to say not to do so. These were the commands:

pversion=3.0.0
package=apbs
altpkg=APBS
TOPDIR=/usr/common/modules/el8/x86_64/software/${package}/${pversion}-CentOS-vanilla
cd /usr/common/src
git clone https://github.com/Electrostatics/apbs.git
mv ${package} ${package}-${pversion}
cd ${package}-${pversion}
git submodule init
git submodule update
module load msms
module load nanoshaper
module load cmake #very recent release needed
#Requires: OpenBLAS, dnf installed on all nodes
#Requires: eigen3-devel, dnf installed on all nodes, if this is NOT
#installed geoflow will try to install it from:
# https://bitbucket.org/eigen/eigen/get/3.2.5.tar.gz
#which is BROKEN and the build will fail at that point.
mkdir build
cd build
cp ../CMakeLists.txt ../CMakeLists.txt.dist
extract -in ../CMakeLists.txt.dist -out ../CMakeLists.txt \
  -rtds '_INSTALL_PATH ' -rtss "_INSTALL_PATH $TOPDIR/"
#this will hopefully fix both the "can't find Python.h" and link problems
cmake -DENABLE_GEOFLOW=ON -DENABLE_PBAM=ON \
 -DENABLE_BEM=ON -DENABLE_FETK=ON \
 -DENABLE_PYTHON=ON -DBUILD_SHARED_LIBS=ON \
 -DGET_NanoShaper=ON .. 2>&1 | tee cmake_2020_08_19.log
make 2>&1 | tee build_2020_08_19.log
#succeeded
make install 2>&1 | tee install_2020_08_19.log
#does NOT copy all the libraries
cp bem-prefix/src/bem-build/libTABIPBlib.so $TOPDIR/lib
(cd fetk/src/fetk-punc-build/src/aaa_lib/.libs; tar -cf - .) | (cd $TOPDIR/lib; tar -xf -)
(cd fetk/src/fetk-mc-build/src/aaa_lib/.libs; tar -cf - .) | (cd $TOPDIR/lib; tar -xf -)
(cd fetk/src/fetk-maloc-build/src/aaa_lib/.libs; tar -cf - .) | (cd $TOPDIR/lib; tar -xf -)
(cd fetk/src/fetk-gamer-build/src/aaa_lib/.libs; tar -cf - .) | (cd $TOPDIR/lib; tar -xf -)
(cd fetk/lib; tar -cf - *.la) | (cd $TOPDIR/lib; tar -xf -)
cp ./lib/_apbslib.so $TOPDIR/lib
/bin/rm $TOPDIR/lib/*.la
/bin/rm $TOPDIR/lib/*.lai
module_generate_from_directory.sh \
   $package \
   $pversion \
   CentOS/vanilla \
   $TOPDIR \
   "Solve the equations of continuum electrostatics for large biomolecular assemblages." \
   "https://github.com/Electrostatics/apbs" \
   "msms nanoshaper"
module purge
module load apbs
apbs --help #runs

Further testing stalled when the README.md in examples said to do:

Executing <code>make test</code> in each directory will run the examples for that directory and log the results to <code>TESTRESULTS.log</code>.

but there are no Makefiles in those directories, nor in the top example directory. There are a couple of Makefile.in and Makefile.am files. Was the build supposed to construct these?

sobolevnrm commented 4 years ago

We are not ignoring you but are stretched rather thin at this time. You have definitely confirmed our statement that the master branch is not the preferred one to build. šŸ˜„

@intendo are you able to look into this at all?

intendo commented 4 years ago

@sobolevnrm I will block off Thursday to work on APBS issues.

sobolevnrm commented 4 years ago

Thanks!


From: Darren Curtis notifications@github.com Sent: Thursday, August 20, 2020 12:23 AM To: Electrostatics/apbs apbs@noreply.github.com Cc: Nathan Baker nathanandrewbaker@outlook.com; Mention mention@noreply.github.com Subject: Re: [Electrostatics/apbs] 3.0.0 build instructions are confusing, do not work (#54)

@sobolevnrmhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsobolevnrm&data=02%7C01%7C%7Ca64e4b505dec4a3708bc08d844d9f2be%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637335050147775647&sdata=kqDgwXcld67bWVTrZSFCIHu0HVOL6LQZOsabnQ%2Fg%2F9M%3D&reserved=0 I will block off Thursday to work on APBS issues.

ā€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FElectrostatics%2Fapbs%2Fissues%2F54%23issuecomment-677413153&data=02%7C01%7C%7Ca64e4b505dec4a3708bc08d844d9f2be%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637335050147785645&sdata=AZIEgGUV3%2BY7b38o73PnJL1PNZ4mWEf%2BD2MeYgxQ9wQ%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAOX7WDR3TFDMNFDJRSMMKTSBTFPLANCNFSM4P3X5MAQ&data=02%7C01%7C%7Ca64e4b505dec4a3708bc08d844d9f2be%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637335050147785645&sdata=I%2FoD3R7a2npMifn0eDz1dL80R9z0QNPoMpCiTLgAf%2Bw%3D&reserved=0.

mathog commented 4 years ago

We are not ignoring you but are stretched rather thin at this time.

Understood.

You have definitely confirmed our statement that the master branch is not the preferred one to build.

Well, it was a bit difficult, but I was eventually able to build from that. Not so with the release.

Instructions for running the tests and examples would be very helpful. (Or at least a URL that directs to these.) At this point apbs has been built and installed, but other than responding to

apbs --help I don't yet know if it actually works.

sobolevnrm commented 4 years ago

Thank you for your perseverance! The examples directory is the best source of tests for APBS.

intendo commented 4 years ago

A recent finding was that the external dependency on Eigen was a mercurial repository on bitbucket. Bitbucket stopped supporting mercurial so we updated the dependency to point to the same version of Eigen on a Github repository.

Also, make sure when you build APBS, you run make in serial mode to eliminate any race conditions between CMake, autoconf, make, and downloads. What I use is VERBOSE=1 make -j 1 to make sure there are no race conditions that can be really hard to diagnose.

mathog commented 4 years ago

Instructions for running the tests and examples would be very helpful. (Or at least a URL that directs to these.)

Never found instructions. Was very confused by the README.md in the "examples" subdirectory (which says to run "make" in each subdirectory, but none actually have a Makefile). The README.md in the "tests" subdirectory does not say that it uses the contents of the "examples" directory, but the command it says to use, slightly modified as:

python3 apbs_tester.py 2>&1 | tee apbs_tester.log

set things rolling, and all the tests completed so far "were Passed". It quickly became apparent that tests was using the contents of examples, and was leaving new results in there.

One point though, using "top" so far has never shown apbs to go over 100%, so perhaps it is not multithreaded? If so, then it would help if the testing script would run several of these at once. The test system has 4 CPUs with 2 threads each, which shows up as "8 CPUs" under linux, but 7 of those are just twiddling their thumbs (metaphorically speaking).