GithubHelp home page GithubHelp logo

Comments (13)

sobolevnrm avatar sobolevnrm commented on July 19, 2024

Hi @PedroOverde -- thank you for trying out the code. I'm sorry you experienced problems with this. @intendo would you be willing to look into this?

from apbs.

rubadub avatar rubadub commented on July 19, 2024

Hi, I think some components of APBS 3.0 need a newer version of gcc than
what is installed by default on Centos 7 (4.8.5). The compilation works fine with gcc version 7.3 when installed via SCL. Also, I am using the git repo not the source code tarball.

from apbs.

intendo avatar intendo commented on July 19, 2024

@PedroOverde, I apologize for the problems. I think you might be missing the git submodule init and git submodule update commands documented in the apbs/README.md. Those commands will connect all the external source code repositories.

@rubadub is correct that you will need a newer version of GCC or CLANG that supports C++11.

I have a script that I use to build APBS that I keep in the apbs source code directory.
NOTE: You may want to change the INSTALL_DIR and RELEASE_TYPE variables.
NOTE: You can adjust any of the variables for the solvers (GEOFLOW, BEM, FETK, PBAM, PBSAM) to be ON or OFF depending on which ones you want to use.

I put the lines below in a bash script file in apbs/BUILD.sh. That way if the script fails, I can change some variables and try again. Then you can cd apbs and run ./BUILD.sh

#!/bin/bash

git submodule init
git submodule update

#export CC=gcc-7
#export CXX=gcc-7
#export CMAKE_C_COMPILER=gcc-7
#export CMAKE_CXX_COMPILER=gcc-7
#export CMAKE_C_LINK_EXECUTABLE=gcc-7
#export CMAKE_CXX_LINK_EXECUTABLE=gcc-7

export BUILD_DIR=build
export INSTALL_DIR=$HOME/apbs
export RELEASE_TYPE=Release
rm -rf $INSTALL_DIR                             || exit 1
mkdir -p $INSTALL_DIR                           || exit 1
rm -rf $BUILD_DIR                               || exit 1
mkdir $BUILD_DIR                                || exit 1
cd $BUILD_DIR                                   || exit 1
# NOTE: The following is useful for debugging
#cmake -S .. -B $BUILD_DIR --trace-source=../CMakeLists.txt --trace-expand \
cmake                                           \
      -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR       \
      -DCMAKE_BUILD_TYPE=$RELEASE_TYPE          \
      -DENABLE_GEOFLOW=ON                       \
      -DENABLE_BEM=ON                           \
      -DENABLE_FETK=ON                          \
      -DENABLE_OPENMP=ON                        \
      -DENABLE_PBAM=ON                          \
      -DENABLE_PBSAM=ON                         \
      -DENABLE_PYTHON=ON                        \
      -DBUILD_SHARED_LIBS=ON                    \
      ..                                        || exit 1
VERBOSE=1 make -j 1                             || exit 1

Please let us know if this helps you get APBS built.

from apbs.

PedroOverde avatar PedroOverde commented on July 19, 2024

Hello @intendo
Thanks for the response. I was able to compile the program by downloading the FETK package from https://github.com/Electrostatics/FETK/tree/0c6fdeabe8929acea7481cb1480b5706b343b7e0 and copying the contents of he package to the apbs/externals/fetk directory. After this, cmake and make did not have any issues and executables were produced. So, this is good but I guess it is not how it should be done since I am not using git.

By the way, the gcc compiler seems to work fine. I believe it was updated at some point.

I would like to try and compile the program using git. I please ask if you can help me with this. Up to this point, I have had no luck with git. Here is what I did:

  1. Created a directory called PPP in my home directory
  2. I went into PPP and clone the apbs-pdb2pqr repository by using the following command:
    git clone https://github.com/Electrostatics/apbs-pdb2pqr

Got the following output:

Cloning into 'apbs-pdb2pqr'...
remote: Enumerating objects: 224, done.
remote: Counting objects: 100% (224/224), done.
remote: Compressing objects: 100% (146/146), done.
remote: Total 61293 (delta 136), reused 137 (delta 76), pack-reused 61069
Receiving objects: 100% (61293/61293), 483.47 MiB | 50.57 MiB/s, done.
Resolving deltas: 100% (41222/41222), done.

The command created the apbs-pdb2pqr directory. A listing of files in this directory is as follows:

[poverde@pamina || ~/PPP/apbs-pdb2pqr]>>$ ls -a
. .. CNAME _config.yml doc .git .github .gitignore .gitmodules README.md readthedocs.yml

  1. I went into the apbs-pdb2pqr directory and executed the following:

git submodule init
git submodule update

Neither command issued any type of output.

  1. I am confused with regard to the next command: cmake <path_to_apbs_directory>.
    As you can see from the listing above, there is no apbs directory. If I create a directory called apbs and run the cmake command then cmake complains that there is no CMakeList.txt.

So, I am not sure what I am doing wrong. Thanks for your help and I am sorry to cause trouble.

By the way, I believe prof Murga submitted the same message to the APBS list. You can ignore that message and we can continue the thread through here. Thanks again.

Pedro

from apbs.

intendo avatar intendo commented on July 19, 2024

@PedroOverde I am afraid that we may have accidentally destroyed the apbs and pdb2pqr directories from the master branch. We are in the process of making apbs and pdb2pqr separate repositories.

You may need to do the following procedure:

git clone https://github.com/Electrostatics/apbs-pdb2pqr
cd apbs-pdb2pqr
git checkout vAPBS-3.0.0
git submodule init
git submodule update

You should see the apbs and pdb2pqr subdirectories and then you can use the script I provided above.

Please let us know if this works for you or not. If it doesn't work, you should be able to download the binaries for Ubuntu with all the solvers from the https://github.com/Electrostatics/apbs-pdb2pqr/releases/download/vAPBS-3.0.0/APBS-3.0.0_Linux.zip file.

from apbs.

PedroOverde avatar PedroOverde commented on July 19, 2024

@intendo I was able to partially compile APBS. The following options had to be turned OFF for the compilation to proceed:
-DENABLE_PYTHON

when it is ON I get multiple errors of this form in the make:

/usr/bin/ld: /usr/local/lib/libpython3.7m.a(abstract.o): relocation R_X86_64_32S against symbol `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC

and the compilation aborts

-DENABLE_PBAM and -DENABLE_PBSAM when they are ON the compilation aborts with several errors of this form:

/home/poverde/PPP/apbs-pdb2pqr/apbs/src/routines.c: In function ‘solvePBAM’:
/home/poverde/PPP/apbs-pdb2pqr/apbs/src/routines.c:5332:11: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < PBAMPARM_MAXMOL; i++) {
^
/home/poverde/PPP/apbs-pdb2pqr/apbs/src/routines.c:5332:11: note: use option -std=c99 or -std=gnu99 to compile your code

and the compilation aborts.

Any ideas on how to fix these errors?

Thanks again!

from apbs.

rubadub avatar rubadub commented on July 19, 2024

@PedroOverde I see that you closed the issue but for future reference for people compiling this on Centos 7.7:

  • -DENABLE_PYTHON=ON requires also -DCMAKE_C_FLAGS="-fPIC"

  • -DENABLE_PBAM and -DENABLE_PBSAM require gcc version 4.9.0 or newer which fully supports the complete C++11 standard. Centos 7.7 comes with gcc 4.8.5

from apbs.

PedroOverde avatar PedroOverde commented on July 19, 2024

@rubadub
Oops! I closed this by mistake. Still new to the system. Sorry about that.

I am almost there!
I was able to compile with options -DENABLE_PBAM=ON and -DENABLE_PSAM=ON by adding the flag --std=gnu99 to -DCMAKE_C_FLAGS, This enables the C++11 options in gcc

the -fPIC does not work for me when compiling with -DENABLE_PYTHON=ON. I still get the same error despite of having -DCMAKE_C_FLAGS="-fPIC"

Any more ideas?

from apbs.

sobolevnrm avatar sobolevnrm commented on July 19, 2024

@PedroOverde I am afraid that we may have accidentally destroyed the apbs and pdb2pqr directories from the master branch. We are in the process of making apbs and pdb2pqr separate repositories.

FWIW, I think we intentionally destroyed those directories to make way for the refactoring you mentioned...

from apbs.

intendo avatar intendo commented on July 19, 2024

@sobolevnrm is this closed issue then?

from apbs.

sobolevnrm avatar sobolevnrm commented on July 19, 2024

I would like @PedroOverde to let us know if this is resolved for him before closing.

from apbs.

PolyachenkoYA avatar PolyachenkoYA commented on July 19, 2024

I had the same issue. I found this old repo where all necessary externals are linked. One can just clone them manually.

from apbs.

nsoblath avatar nsoblath commented on July 19, 2024

Hopefully these problems have been effectively resolved by the improvements that went into v3.4.0 and beyond. If there are problems with the current release, please raise a new issue.

from apbs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.