# CNS errors before/after recompilation

**URL:** <https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54>\
**Category:** HADDOCK\
**Created:** [April 7, 2016, 8:34am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54 "2016-04-07T08:34:33Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![bosmith](https://avatars.discourse-cdn.com/v4/letter/b/f4b2a3/32.png) [@bosmith](https://ask.bioexcel.eu/u/bosmith)\
**Post date:** [December 15, 2017, 3:21pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/21 "2017-12-15T15:21:02Z")

</div>

Garima,  
We need to see more of the compiler log to see what your error might be.

---

<div class="post-metadata">

**Author:** ![garima.tanwar](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@garima.tanwar](https://ask.bioexcel.eu/u/garima.tanwar)\
**Post date:** [December 16, 2017, 3:21pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/22 "2017-12-16T15:21:24Z")

</div>

After compiling CNS with `make install` and then `source cns_solve_env` after entering into C-shell `tcsh`  
I was trying to run cns after typing `cns`  
drriturajpurohit-CELSIUS-M740Bpower:~/Downloads/cns\_solve\_1.3\> cns  
Program will stop immediately.  
============================================================  
Maximum dynamic memory allocation: 0 bytes  
Maximum dynamic memory overhead: 0 bytes  
Program started at: on  
Program stopped at: 08:12:32 on 16-Dec-2017  
CPU time used: 0.0040 seconds  
============================================================  
drriturajpurohit-CELSIUS-M740Bpower:~/Downloads/cns\_solve\_1.3\>

---

<div class="post-metadata">

**Author:** ![garima.tanwar](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@garima.tanwar](https://ask.bioexcel.eu/u/garima.tanwar)\
**Post date:** [December 28, 2017, 5:48am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/23 "2017-12-28T05:48:49Z")

</div>

Hello everyone,  
I also got these errors and was able to resolve them.  
Just take care of installation steps of CNS:  
-\> After registration, download xyz.tar.gz file “xyz = cns\_solve downloaded version”  
-\> Enter the command in terminal: `gunzip xyz.tar.gz`  
-\> Then enter: `tar xvf xyz.tar`  
-\> This will create a new cns\_solve directory. Now enter into this directory and copy the path.  
-\> Now open the file cns\_solve\_env and paste the copied path in place of ‘location of CNSsolve directory’  
-\> Then open the terminal in this directory, and enter the command:`tcsh`  
-\> Then you entered into C-shell, now enter the command: `source cns_solve_env`  
-\>Then enter: `cns`  
-\> Your software will definitely run without any error.

---

<div class="post-metadata">

**Author:** ![arina22](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@arina22](https://ask.bioexcel.eu/u/arina22)\
**Post date:** [March 12, 2019, 9:14am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/24 "2019-03-12T09:14:48Z")

</div>

Dear Dr. Bonvin,

I am having the same problem with CNS installation, but I cannot figure out how should I remove -fast-math flag. In my Makefile I don’t have such flag. I tried to run `make no-fastm` after `make clean` but it looks like compilation still runs with fortran -ffast-math option.

Thank you

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [March 12, 2019, 10:51am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/25 "2019-03-12T10:51:20Z")

</div>

Depending on your operating system, when installing CNS a directory specific for your OS will be created, e.g. `intel-x86_64bit-linux/source` on a Linux 64bits system.

Go into that directory and edit the `Makefile` script.

Then in that dir try: `make cns_solve`

---

<div class="post-metadata">

**Author:** ![arina22](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@arina22](https://ask.bioexcel.eu/u/arina22)\
**Post date:** [March 13, 2019, 1:25am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/26 "2019-03-13T01:25:08Z")

</div>

Thank you very much! I think it’s fine now

---

<div class="post-metadata">

**Author:** ![marilenadp](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@marilenadp](https://ask.bioexcel.eu/u/marilenadp)\
**Post date:** [June 17, 2019, 8:00am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/27 "2019-06-17T08:00:06Z")

</div>

Hello,

I did exactly those steps and when I entered cns there was the error: cns: Command not found.

any idea what did i do wrong?

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [July 25, 2019, 6:23am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/28 "2019-07-25T06:23:13Z")

</div>

In order to use cns you must first source the cns\_solve\_env from the installation directory (provided you edited it properly. And check that the compilation was successful

---

<div class="post-metadata">

**Author:** ![shrutivijayk](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@shrutivijayk](https://ask.bioexcel.eu/u/shrutivijayk)\
**Post date:** [October 29, 2019, 6:17am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/29 "2019-10-29T06:17:41Z")

</div>

Dear all,

I have tried making all the modifications that have been suggested so far in the forum. I am still getting the following error -

%SETFPEPS Machine epsilon determined to be 0.494-323  
%SETFPEPS error encountered: Machine epsilon value is too small  
(CNS is in mode: SET ABORT=NORMal END)  
WARNING: program encountered a fatal error.  
However, in interactive mode, program execution  
will continue. Proceed at your own risk.  
Program will stop immediately.  
============================================================  
Maximum dynamic memory allocation: 0 bytes  
Maximum dynamic memory overhead: 0 bytes  
Program started at: on  
Program stopped at: 14:13:57 on 29-Oct-2019  
CPU time used: 0.0082 seconds  
============================================================  
Note: The following floating-point exceptions are signalling: IEEE\_UNDERFLOW\_FLAG IEEE\_DENORMAL

I am using 64 bit Ubuntu 18.04.3 LTS. Kindly advise if I can try any other value of MXFPEPS2. I tried 8192 and it gave the same error.

Thanks in advance.  
P.S. replacing the entire SETFPEPS subrouting from bosmith produced a fatal error.

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [October 29, 2019, 6:52am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/30 "2019-10-29T06:52:37Z")

</div>

I recently recompiled CNS on OSX and CentOS7 using gfortran.

The compiler flags are:

```auto
F77 = gfortran
F77STD = -fdefault-integer-8 -w
F77OPT = -O3 $(CNS_MALIGN_I86) -funroll-loops -ffast-math -static
F77FLAGS = $(F77STD) $(F77OPT) $(EXT_F77FLAGS) $(F77BUG)

# C options
CC = gcc
CPP = g++
CCFLAGS = -O -DINTEGER='long int' -DCNS_ARCH_TYPE_$(CNS_ARCH_TYPE) $(EXT_CCFLAGS)

# link options
LD = gfortran
LDFLAGS = -w $(EXT_LDFLAGS)

```

The `machine.f` file looks like:

```auto
C ==========================================================================
C
      SUBROUTINE DPSTOR(X)
C
      IMPLICIT NONE
C I/O
      INCLUDE 'machvar.inc'
      DOUBLE PRECISION X
C
C FORCES THE ARGUMENT VALUE X TO BE STORED IN MEMORY LOCATION V.
C Source code taken from fftpack41/tfftpk.f
C
      DPTMPV=X
      RETURN
      END
C
C ==========================================================================
C
      DOUBLE PRECISION FUNCTION DPTRUNC(X)
C
      IMPLICIT NONE
C I/O
      INCLUDE 'machvar.inc'
      DOUBLE PRECISION X
C
C DPTRUNC IS A PORTABLE FORTRAN FUNCTION WHICH TRUNCATES A VALUE TO THE
C MACHINE DOUBLE PRECISION WORD SIZE, REGARDLESS OF WHETHER LONGER
C PRECISION INTERNAL REGISTERS ARE USED FOR FLOATING POINT ARITHMETIC IN
C COMPUTING THE VALUE INPUT TO DPTRUNC. THE METHOD USED IS TO FORCE A
C STORE INTO MEMORY BY USING A COMMON BLOCK IN ANOTHER SUBROUTINE.
C Source code taken from fftpack41/tfftpk.f
C
      CALL DPSTOR(X)
      DPTRUNC=DPTMPV
      RETURN
      END
C
C ==========================================================================
C
      SUBROUTINE SETFPEPS
C
      IMPLICIT NONE
C I/O
      INCLUDE 'numbers.inc'
      INCLUDE 'machvar.inc'
C
C Determine the machine epsilon i.e. the smallest FPEPS such that both
C 1+FPEPS and 1-FPEPS are different from 1.
C
C local
      DOUBLE PRECISION ONEDP
      DOUBLE COMPLEX DBCOMP
C
C external
C NONE
C
C begin
C
C ONEDP doesn't really need to be defined - EPSILON() only needs to know
C the type
      ONEDP=(1.00)
      FPEPS = EPSILON(ONEDP)
      DBCOMP = DCMPLX(ZERO,ZERO)
      CALL DECLAR('FP_EPSILON', 'DP', ' ', DBCOMP, FPEPS)
      RETURN
      END
C
C ==========================================================================
C

```

---

<div class="post-metadata">

**Author:** ![shrutivijayk](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@shrutivijayk](https://ask.bioexcel.eu/u/shrutivijayk)\
**Post date:** [October 30, 2019, 5:07am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/31 "2019-10-30T05:07:11Z")

</div>

Dear Dr. Bonvin,  
Thank you very much for your prompt reply. ‘cns’ seems to be working now.  
Thanks again.

---

<div class="post-metadata">

**Author:** ![asdrfg](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@asdrfg](https://ask.bioexcel.eu/u/asdrfg)\
**Post date:** [August 14, 2020, 2:39pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/32 "2020-08-14T14:39:07Z")

</div>

Hello,  
I am trying to perform a HADDOCK docking run locally for the first time, however when I enter haddock2.4 in my run1 directory it comes up with an error message saying ./protocols/cns1 not found. I have installed cns\_solve\_1.3 and set CNSTMP on the haddock configuration file to the cns executable directory (/home/user/software/cns\_solve\_1.3/intel-x86\_64bit-linux). I also edited the run.cns file to queue\_1=“csh” and set cns\_exe\_1="/home/user/software/cns\_solve\_1.3/intel-x86\_64bit-linux". Has anyone got any idea what I might be doing wrong?

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [August 14, 2020, 2:53pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/33 "2020-08-14T14:53:53Z")

</div>

The cns\_exe must be the link to the executable and not the directory where it resides.

If you have the correct link you should be able to simply give it as command and see CNS starting.

---

<div class="post-metadata">

**Author:** ![asdrfg](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@asdrfg](https://ask.bioexcel.eu/u/asdrfg)\
**Post date:** [August 15, 2020, 11:47am UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/34 "2020-08-15T11:47:40Z")

</div>

Thank you for your prompt reply! I managed to link cns\_exe to the correct executable now (software/cns\_solve\_1.3/intel-x86\_64bit-linux/bin/cns) however when I now go to proceed with the docking run I get an error stating there is a problem with my CNS executable. Any idea what the problem is here? How could I check CNS has been compiled properly? As also when I go to source cns\_solve\_env now I also get an error saying that there is unexpected syntax in line 32 : ` if ( ! $?CNS_ARCH ) setenv CNS_ARCH`$CNS\_SOLVE/bin/getarch`. Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [August 15, 2020, 12:17pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/35 "2020-08-15T12:17:42Z")

</div>

Did you try a fresh run and not the old one giving problems?

---

<div class="post-metadata">

**Author:** ![asdrfg](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@asdrfg](https://ask.bioexcel.eu/u/asdrfg)\
**Post date:** [August 15, 2020, 12:23pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/36 "2020-08-15T12:23:43Z")

</div>

Yeah I attempted a fresh run removing the run1 directory that was created in my previous docking attempt. Still get the error message saying there is a problem with the CNS executable defined in run.cns.

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [August 15, 2020, 12:36pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/37 "2020-08-15T12:36:17Z")

</div>

can you manually start CNS based on the definition you put in run.cns?

I.e. copy and paste in the command line

---

<div class="post-metadata">

**Author:** ![asdrfg](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@asdrfg](https://ask.bioexcel.eu/u/asdrfg)\
**Post date:** [August 15, 2020, 12:47pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/38 "2020-08-15T12:47:42Z")

</div>

when I attempt to do that I get the following error message:  
%SETFPEPS increase value of MXFPEPS2 and recompile  
%SETFPEPS error encountered: Could not determine machine epsilon  
(CNS is in mode: SET ABORT=NORMal END)

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [August 15, 2020, 2:29pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/39 "2020-08-15T14:29:42Z")

</div>

Did you compile it with the provided routines from haddock? In the cns1.3 dir

The forum also already has answers to that problem - search with one one the error keyword

---

<div class="post-metadata">

**Author:** ![Marija](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/marija/32/278_2.png) [@Marija](https://ask.bioexcel.eu/u/Marija)\
**Post date:** [October 8, 2020, 12:37pm UTC](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54/40 "2020-10-08T12:37:31Z")

</div>

Dear All,

I have installed local version of HADDOCK2.4 (September 2020 release) on Centos7.7.  
I tried to run water refinement (refine-complex) with my own protein and then with the example protein (all residues have their unique residue numbers in both A and B chains) and was getting an error message:

```
waiting for /../run1/begin/e2a-hpr_1GGR_B.pdb...
waiting for /../run1/begin/e2a-hpr_1GGR_B.psf...
Error in the topology generation: prot_psf_mol1 could not be created
=> HADDOCK stopped

```

in the /…/run1/begin/generate\_1.out file is the following message:

```
 RTFRDR>set message=off echo=off end
 %RTFRDR error encountered: exceeded MXRTRS (RTF) parameter --> recompile program
   (CNS is in mode: SET ABORT=NORMal END)

```

I changed in software/cns\_solve\_1.3/intel-x86\_64bit-linux/source/rtf.inc MXRTRS from 200 to 4000

```
RAMETER (MXRTRS=4000,NICM=50)

```

and also other lines as described by @srinivas_penumutchu as well as Makefile and machine.f looks like described by @amjjbonvin on 29.10.2019 but I am still getting the same error.

I would appreciate your help very much.

Marija

[Previous page](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54.md?page=1)

[Next page](https://ask.bioexcel.eu/t/cns-errors-before-after-recompilation/54.md?page=3)
