Problem building NWChem 6.8.1 on Ubuntu 18.0.4 -- Solved

From NWChem

You are viewing a single post from the thread title above
Jump to: navigation, search

Click here for full thread
Just Got Here
Threads 1
Posts 1
Greetings!

I am attempting to use Rangsiman Ketkaew's Automatic-NWChem-Compile.sh. I have followed the directions detailed at https://github.com/rangsimanketkaew/NWChem#nwchem-auto-compilation:

1) sudo apt-get install python-dev gfortran libopenblas-dev libopenmpi-dev openmpi-bin tcsh make

2) wget https://github.com/nwchemgit/nwchem/releases/download/6.8.1-release/nwchem-6.8.1-release.r...

3) tar -xvf nwchem-6.8.1-release.revision-v6.8-133-ge032219-src.2018-06-14.tar.bz2

4) wget https://raw.githubusercontent.com/rangsimanketkaew/NWChem/master/Automatic-NWChem-Compile....

5) chmod 755 Automatic-NWChem-Compile.sh

6) ./Automatic-NWChem-Compile.sh, which yielded

*********** Automatic NWChem Compilation ***********
1) Check MPI Architecture 4) Download NWChem 6.8.1
2) Compile NWChem 5) Author & Contact
3) Create Resource file 6) Exit Program
Enter Your Choice: 1
- Linux distribution version  : UBUNTU_CODENAME=bionic
- MPI architecture and version : mpirun (Open MPI) 2.1.1
- Fortran Compiler libraries  : -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
Enter Your Choice: 2
Enter absolute path of NWChem source code, e.g. /home/rangsiman/nwchem-6.8.1/: /home/doug/Programs/nwchem-6.8.1
Enter version of Python you are using, e.g. 2.6: 2.7
Enter absolute path of Python directory, e.g. /usr/: /usr

=========================================================
Install NWChem version 6.8.1 with Message Passing Interface (MPI)

Configuration compilation has been saved.
Please check /home/doug/Programs/configure_nwchem_compile.sh
=========================================================

Enter YES to start compiling: YES

Start to compile NWChem ...

Building NWChem executable ... This will take 20-30 minutes.
Please do not close this terminal.

-------------------------------------------------------------

ERROR: Program compile failed! nwchem excutable not found.
Check following files to view Log.
/home/doug/Programs/nwchem-6.8.1/src/compile-config.log
/home/doug/Programs/nwchem-6.8.1/src/compile-64_to_32.log
/home/doug/Programs/nwchem-6.8.1/src/compile-make-nwchem.log

Please look at the end of LOG file to see error message.
You can consult NWChem developer at http://www.nwchem-sw.org/index.php/Special:AWCforum

As this website is not allowing uploads, the contents of the first set of .log files will be added as "responses," otherwise this post is too large.

The end of compile-make-nwchem.log contains "GNUmakefile:105: recipe for target 'libraries' failed" followed by "make: *** [libraries] Error 1," which https://github.com/rangsimanketkaew/NWChem#nwchem-auto-compilation lists as an Error with this Fix: "Check the suitable MPI libraries that you can use. Run the script and press [1] or run following command mpif90 -show." Running the script and pressing [1] I did and recorded above. Issuing "mpif90 -show" displays

gfortran -I/usr/lib/x86_64-linux-gnu/openmpi/include -pthread -I/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi

As requested in a related post, "which mpif90" was issued and displayed

/usr/bin/mpif90

In that same post, unsetting MPI_INCLUDE, MPI_LIB, and LIBMPI was requested. Doing so and then re-executing Automatic-NWChem-Compile.sh produced the same results in the terminal window as displayed above. The four .log files changed and the contents of this second set of .log files will also be added as "responses."

My thought is that the following, from config.log, is the key to solving this problem:

configure:6532: checking whether a simple C MPI program compiles
configure:6538: cc -c -I/include -I/usr/include conftest.c >&5
conftest.c:32:10: fatal error: mpi.h: No such file or directory
#include <mpi.h>

This file, mpi.h, is not found anywhere in /home/doug/Programs/nwchem-6.8.1. It is found in /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi, and so, perhaps, this path needs to be included in the compile command. But, using this Automatic-NWChem-Compile.sh construct, I do not presently see how to do this.

Thanks for your help!

P.S. My apologies for my failed post of last night, when I tried to include the contents of the .log files; I did not realize it would still show up.

P.P.S. I cannot see how to respond to my own post. Perhaps this forum does not allow this? Bother!

P.P.P.S. Problem solved! I also found mpi.h in /usr/include/mpi, so I replaced

export MPI_INCLUDE=${MPI_LOC}/include

in Automatic-NWChem-Compile.sh with

export MPI_INCLUDE=${MPI_LOC}/usr/include/mpi

I made this change because of this line in config.log

configure:6538: cc -c -I/include -I/usr/include conftest.c >&5

where only "/include" appears, consistent with how it was being set in Automatic-NWChem-Compile.sh. So I changed the path to where mpi.h is found on my installation (/usr/include/mpi), and -- voila! -- " Congratulations! NWChem has been compiled successfully."
Edited On 5:53:51 PM PDT - Sun, Sep 30th 2018 by Dafemec


Who's here now Members 0 Guests 0 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC