CHARMM Development Project
Posted By: vincube Installation of CHARMM on Ubuntu 18.04 - 10/24/20 04:41 PM
Hello! I'm trying to install CHARMM on Ubuntu 18.04 and I followed the simplest instructions on this site (Installing CHARMM for Ubuntu)but it didn't work.

The error is
f951: Fatal Error: Reading module ‘allocation’ at line 1592 column 65: Unexpected EOFcompilation terminated.
I have googled for this error and I found out that there are only several topics here describing it.
Thread 37282
Thread 37239
And there was a solution in the first thread, but I have checked that file for this particular line and everything was ok, everything was like in the correct version of installation.
The GCC issue is a bug, fixed in more recent versions. The fix is in build/UNX/Makefile_gnu
< GCC_GTEQ_460 := $(shell expr `gcc -dumpversion` \>= 4.6)
> GCC_GTEQ_460 := $(shell expr `gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40600)
The corrected version is the first line in the code snippet above.

Does anybody knows what I'm supposed to do, how to fix this error?
Posted By: rmv Re: Installation of CHARMM on Ubuntu 18.04 - 10/24/20 04:55 PM
What are the CHARMM and GCC versions you are using? The OS version alone is not enough information. In many case, the default compilers on Linux systems can be fairly old, compared to the latest GCC release.

The CHARMM version could be an issue; I just built c45b1 on Ubuntu 18.04 using the default GCC 7.5 suite, and the Ubuntu cmake utility.
Posted By: vincube Re: Installation of CHARMM on Ubuntu 18.04 - 10/24/20 06:04 PM
Actually, I don't know version of CHARMM I downloaded from bc it's lite free version maybe I can look in files of unpacked archive? I also have GCC 7.5.
I am a student actually and I'm not sure that full licence is available for me, and I'm having problems with compiling lite-version and that's kinda sad)
Posted By: rmv Re: Installation of CHARMM on Ubuntu 18.04 - 10/24/20 07:51 PM
When did you download the CHARMM source?

What were the commands used to build CHARMM?

The threads you referenced were using the older, deprecated ./ procedure, while "installing CHARMM for Ubuntu" link uses the newer ./configure procedure, so those threads may not be relevant. If you used configure, there should be messages about any problems encountered. Did you install Ubuntu cmake first, or use the one that configure builds from source?

Please verify your compiler and cmake versions via

gcc --version
gfortran --version
cmake --version

The gfortran version should match gcc; gfortran and cmake may not be installed on Ubuntu by default.

Martin Karplus spent some time in Strasbourg, so perhaps there are people there you could ask for help.

From the main charmm directory (c45b1 in my case), I did the following:

mkdir ../BldTest
cd ../BldTest
make -j6
Posted By: vincube Re: Installation of CHARMM on Ubuntu 18.04 - 10/30/20 01:00 PM
Hello! Sorry for the delay.
gcc 7.5.0
gfortran 7.5.0
cmake 3.10.2

It's a free version of CHARMM, I downloaded it from

I used the ./configure procedure, following instructions from the given website (as they are pretty simple and straightforward) and it didn't work as I mentioned, at the 'make' stage I have the following error (on the picture).
Posted By: rmv Re: Installation of CHARMM on Ubuntu 18.04 - 10/30/20 04:59 PM
I cannot reproduce that error on Ubuntu 18.04, using the same compiler and cmake versions.

The 'unexpected EOF' error suggests that one possibility is that the download was corrupted; you may need to download it again.

What it is the CHARMM version? Alternatively, and I've already asked this, when did you download the program?

Can you compile other Fortran programs on that machine?
Posted By: lqz Re: Installation of CHARMM on Ubuntu 18.04 - 01/13/21 10:57 PM
I had a similar problem. I tried to compile charmm c41b2 edition on ubuntu 18.04 edition. The gcc edition is 7.5.0, gfortran edition is 7.5.0, and cmake edition is 3.10.2. After I typed ./configure command, I got errors in the process.

CMake Error in /home/xxx/charmm/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path


I am wondering what I can do. Thanks.
Posted By: rmv Re: Installation of CHARMM on Ubuntu 18.04 - 01/14/21 03:49 PM
The error is very different. The CHARMM version and GCC versions are not up to date. There's not enough information to say more.
Posted By: lqz Re: Installation of CHARMM on Ubuntu 18.04 - 01/24/21 02:54 AM
Dear all, I figured out how to compile charmm on ubuntu 18.04 system. My error above came from fftw. After i installed libfftw3-3 and libfftw3-dev, I can run configure without any problem, then can compile charmm. Intel compilors are not necessary for the compiling. Gfortran and Gcc compilors are good enough.

I only have one question. Right now, after typing sudo make install command, i can install charmm. But I do not know if it is the xxlarge size. I am wondering how to control that.
Posted By: lennart Re: Installation of CHARMM on Ubuntu 18.04 - 01/24/21 03:49 PM
XXLARGE & Co are obsolete. Instead the dimensions of atom-number related arrays is controlled at runtime using the flag "-chsize N", where N is an integer specifying the number of atoms . The current default is 360720, which corresponds to XXLARGE.
© CHARMM forums