dmorse / simpatico

Molecular dynamics and Monte Carlo simulation package for polymeric and molecular liquids
GNU General Public License v3.0
31 stars 17 forks source link

Problems compiling mcMd #36

Closed jpotoff closed 7 years ago

jpotoff commented 9 years ago

I'm having trouble getting the serial version of simpatico to compile. I am compiling with gcc/g++ on CentOS 6.0. After typing ./setup and "make mcMd", I get the following error.

make[1]: Entering directory /home3/jpotoff/simpatico/simpatico/bld/serial' ./configure -m0 UTIL_MPI already disabled in file config.mk cd util; make all make[2]: Entering directory/home3/jpotoff/simpatico/simpatico/bld/serial/util' g++ -O3 -ffast-math -Wall --std=c++98 -Winline -I/home3/jpotoff/simpatico/simpatico/src -c -o /home3/jpotoff/simpatico/simpatico/bld/serial/util/misc/Memory.o /home3/jpotoff/simpatico/simpatico/src/util/misc/Memory.cpp /home3/jpotoff/simpatico/simpatico/bin/makeDep -I/home3/jpotoff/simpatico/simpatico/src -A/home3/jpotoff/simpatico/simpatico/bld/serial/config.mk -A/home3/jpotoff/simpatico/simpatico/bld/serial/util/config.mk -S/home3/jpotoff/simpatico/simpatico/src -B/home3/jpotoff/simpatico/simpatico/bld/serial /home3/jpotoff/simpatico/simpatico/src/util/misc/Memory.cpp Traceback (most recent call last): File "/home3/jpotoff/simpatico/simpatico/bin/makeDep", line 4, in from makeDepend import * ImportError: No module named makeDepend make[2]: * [/home3/jpotoff/simpatico/simpatico/bld/serial/util/misc/Memory.o] Error 1 make[2]: Leaving directory `/home3/jpotoff/simpatico/simpatico/bld/serial/util' make[1]: * [mcMd] Error 2 make[1]: Leaving directory`/home3/jpotoff/simpatico/simpatico/bld/serial' make: *\ [mcMd] Error 2

dmorse commented 9 years ago

The problem appears to be that python cannot find the script named makeDepend.py in the scripts/python directory of the simpatico file tree. The build system used by simpatico uses the unix make utility, but by default also relies on this python script to automatically generate dependency files. Dependency files are files with names that end in the suffix .d that are generated during compilation of corresponding *.cpp source files, and that contain information about which header files a source file depends upon (i.e., directly or indirectly includes), as an aid to figuring out which files need to be recompiled when you change the code and then recompile. The pattern used by make to compile source files uses this script to create a depenency file as a side-product of compilation, and will fail if it can't find the required python script.

The most likely cause of this trouble is if you did not follow the intstructions in the section on "Setting Environment Variables" of the user manual (Sec. 2.1) to set your $PYTHONPATH environment variable to include a path to the simpatico/scripts/python directory to your $PYTHONPATH variable. (The instructions assume that you are working in some sort of unix environment, i.e., linux or Mac-OS with command line tools installed.). The suggested bash shell commands to set both the path for the shell to find the executable and the path for python to find relevant python scripts (copied and pasted from the html manual), if simpatico is installed in a subdirectory of your user directory, are:

SIMPATICO_DIR=${HOME}/simpatico export PATH=${PATH}:/${SIMPATICO_DIR}/bin export PYTHONPATH=${PYTHONPATH}:/${SIMPATICO_DIR}/scripts/python

You should add this or something similar to your .profile, .bash_profile, or .bashrc script. (I think that the choice of which file to put these sorts of commands in varies a little bit from person to person and between linux and Mac OS, but this choice is a general unix issue, not specific to simpatico). Please let me know whether or not this solves the problem.

-best regards, David Morse

On Mon, Jul 13, 2015 at 10:32 AM, jpotoff notifications@github.com wrote:

I'm having trouble getting the serial version of simpatico to compile. After typing ./setup and "make mcMd", I get the following error.

make[1]: Entering directory /home3/jpotoff/simpatico/simpatico/bld/serial' ./configure -m0 UTIL_MPI already disabled in file config.mk cd util; make all make[2]: Entering directory /home3/jpotoff/simpatico/simpatico/bld/serial/util' g++ -O3 -ffast-math -Wall --std=c++98 -Winline -I/home3/jpotoff/simpatico/simpatico/src -c -o /home3/jpotoff/simpatico/simpatico/bld/serial/util/misc/Memory.o /home3/jpotoff/simpatico/simpatico/src/util/misc/Memory.cpp /home3/jpotoff/simpatico/simpatico/bin/makeDep -I/home3/jpotoff/simpatico/simpatico/src -A/home3/jpotoff/simpatico/simpatico/bld/serial/config.mk -A/home3/jpotoff/simpatico/simpatico/bld/serial/util/config.mk -S/home3/jpotoff/simpatico/simpatico/src -B/home3/jpotoff/simpatico/simpatico/bld/serial /home3/jpotoff/simpatico/simpatico/src/util/misc/Memory.cpp Traceback (most recent call last): File "/home3/jpotoff/simpatico/simpatico/bin/makeDep", line 4, in from makeDepend import * ImportError: No module named makeDepend make[2]: * [/home3/jpotoff/simpatico/simpatico/bld/serial/util/misc/Memory.o] Error 1 make[2]: Leaving directory /home3/jpotoff/simpatico/simpatico/bld/serial/util' make[1]: *\ [mcMd] Error 2 make[1]: Leaving directory/home3/jpotoff/simpatico/simpatico/bld/serial' make: * [mcMd] Error 2

— Reply to this email directly or view it on GitHub https://github.com/dmorse/simpatico/issues/36.