# CNS executable not working

**URL:** <https://ask.bioexcel.eu/t/cns-executable-not-working/5335>\
**Category:** HADDOCK\
**Created:** [November 14, 2024, 9:31pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335 "2024-11-14T21:31:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![acr0116](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@acr0116](https://ask.bioexcel.eu/u/acr0116)\
**Post date:** [November 14, 2024, 9:31pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/1 "2024-11-14T21:31:33Z")

</div>

I have downloaded and built haddock2.5 on my University’s supercomputer. I followed the installation documentation, but the cns does not seem to be compatible with my system. It gets built and i changed all the local paths etc, but when I try to run the executable I get:

[user@node067 source]$ ./cns\_solve-2411121204.exe  
%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: 13:04:54 on 12-Nov-2024  
CPU time used: 0.0065 seconds  
============================================================  
Note: The following floating-point exceptions are signalling: IEEE\_UNDERFLOW\_FLAG IEEE\_DENORMAL

This error propogates to the implementation of haddock as the cns is linked to this executable. I have contacted my hpc admin and they have not been able to locate the issue as well. Is there any workaround for getting a working cns executable?

---

<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:** [November 15, 2024, 7:58am UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/2 "2024-11-15T07:58:56Z")

</div>

Did you copy first all the CNS files provided with haddock (check the cns1.3 directory) to the source directory of your CNS installation?

If not, do it and recompile

---

<div class="post-metadata">

**Author:** ![acr0116](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@acr0116](https://ask.bioexcel.eu/u/acr0116)\
**Post date:** [November 15, 2024, 4:55pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/3 "2024-11-15T16:55:45Z")

</div>

Yes my directory looked like this before compilation:

$ls  
bin collapse.inc ener.inc initia.f machvar.f README supccr.inc xangle.inc xdipo\_rdc.inc  
Changes collapse\_rgyr.f fantacross.f inputs mac-intel-darwin rtf.inc test xccr.f xfantaccr.f  
cns.f connect.f fantalin.f instlib Makefile segmnt.f utils xccr.inc xfantadipo.f  
cns.inc cstran.f fantaxplor.inc intel-x86\_64bit-linux modules selrpn.f vector.f xdipo\_pcs.f xt1dist.f  
cns\_solve\_env doc genic.f libraries param.inc source version.inc xdipo\_pcs.inc  
cnst.inc energy.f helplib License Readme sup2.inc xangle.f xdipo\_rdc.f

and i am using gcc/9.3.0. When it’s compiling the following message appears:

fortran -o PSmapy -w -O PSmapy.f  
gfortran -o PSmapz -w -O PSmapz.f  
gcc -o to\_cns -O to\_cns.c -lm  
to\_cns.c:65:1: warning: return type defaults to ‘int’ [-Wimplicit-int]  
65 | main(int argc, char \*argv) {  
| ^~~~  
g++ -o cluster\_struc -O cluster\_struc.cpp -lm  
lex refloat.l  
gcc -O -o refloat lex.yy.c -lm -lfl  
/usr/bin/ld: cannot find -lfl  
collect2: error: ld returned 1 exit status  
make[4]: \*\*\* [refloat] Error 1  
make[3]: \*\*\* [utils] Error 2  
make[2]: \*\*\* [compile-utils] Error 2  
make[1]: \*\*\* [utils] Error 2

flags:  
fortran → [gfortran] -fdefault-integer-8 -w -O3 -funroll-loops -ffast-math  
c → [gcc] -O -DINTEGER=‘long int’ -DCNS\_ARCH\_TYPE\_LINUX  
link → [gfortran] -w

compiling: angledb.f  
…

---

<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:** [November 18, 2024, 10:10am UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/4 "2024-11-18T10:10:31Z")

</div>

Make sure to have copied all the files from the haddock cns1.3 directory into the proper location (check the README file)

Did you actually try to use the pre-compiled executable provided in the haddock software email?

Also gcc9 is rather old…

---

<div class="post-metadata">

**Author:** ![acr0116](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@acr0116](https://ask.bioexcel.eu/u/acr0116)\
**Post date:** [November 22, 2024, 5:28pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/5 "2024-11-22T17:28:36Z")

</div>

I got it working. What ended up solving this was copying the .f files from cns1.3 to the software/cns-1.3/source rather than in the software/cns-1.3/ directory so that they are read when making the software. Additionally just running “make install” rather than “make install compiler=gfortran” kept the make from using the gfortran in my anaconda python module that was loaded and used the gcc/9.3.0 as needed.

---

<div class="post-metadata">

**Author:** ![egil](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@egil](https://ask.bioexcel.eu/u/egil)\
**Post date:** [June 8, 2025, 7:35pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/6 "2025-06-08T19:35:03Z")

</div>

I end up with similar error:  
The cns version seems to work

(haddock2.5) [egil@cajuina run1]$ haddock2.5  
[2025-06-08 16:28:48]  
##############################################################################

# 

# Starting HADDOCK2.5

# 

# N-components version of HADDOCK (current maximum is 20)

# 

# Copyright 2003-2024 Alexandre Bonvin, Utrecht University.

# Originally adapted from Aria 1.2 from Nilges and Linge, EMBL.

# All rights reserved.

# This code is part of the HADDOCK software and governed by its

# license. Please see the LICENSE file that should have been included

# as part of this package.

# 

##############################################################################

But when I try to run the calculation it yelds as follow. Ir indicates a problem in the executable but without point exactly what it is.

[2025-06-08 16:28:48] PDB\_FILE1 protein1.pdb  
[2025-06-08 16:28:48] PROT\_SEGID\_1 A  
[2025-06-08 16:28:48] PDB\_FILE2 protein2.pdb  
[2025-06-08 16:28:48] PROT\_SEGID\_2 B  
[2025-06-08 16:28:48] PROJECT\_DIR /home/egil/testesHaddock/a4b1-test  
[2025-06-08 16:28:48] RUN\_NUMBER 1  
[2025-06-08 16:28:48] Looking for existing files  
[2025-06-08 16:28:48] There is a problem with the CNS executable defined in run.cns:

[2025-06-08 16:28:48] HADDOCK stopped  
[2025-06-08 16:28:48] ##############################################################################  
[2025-06-08 16:28:48] Finishing HADDOCK  
[2025-06-08 16:28:48] Au revoir. Tot ziens. Bye bye.

I compiled cns using a conda env with gcc 9.3 .

I copied the files from ~/haddock2.5-2024-12/cns1.3 to ~/cns\_solve\_1.3

---

<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:** [June 8, 2025, 8:19pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/7 "2025-06-08T20:19:03Z")

</div>

try to call from the command line the CNS executable you defined in run.cns

Does it work?

---

<div class="post-metadata">

**Author:** ![egil](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@egil](https://ask.bioexcel.eu/u/egil)\
**Post date:** [June 9, 2025, 5:50pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/8 "2025-06-09T17:50:16Z")

</div>

It does seems to work .  
This is how it is defined in run.cns:

{===\>} queue\_1=“bash”;  
{===\>} cns\_exe\_1=“/home/egil/PROGRAMAS/cns\_solve\_1.3/intel-x86\_64bit-linux/bin/cns”;  
{===\>} cpunumber\_1=20;

and here is what it shows when I hit the command line:

(haddock2.5) [egil@cajuina run1]$ /home/egil/PROGRAMAS/cns\_solve\_1.3/intel-x86\_64bit-linux/bin/cns  
============================================================  
| |  
| Crystallography & NMR System (CNS) |  
| CNSsolve |  
| |  
============================================================  
\*\* Version: 1.3 at patch level U\*\*  
\*\* Status: Special UU release with Rg, paramagnetic\*\*  
\*\* and Z-restraints (A. Bonvin, UU 2013)\*\*  
\*\* ============================================================\*\*  
\*\* Written by: A.T.Brunger, P.D.Adams, G.M.Clore, W.L.DeLano,\*\*  
\*\* P.Gros, R.W.Grosse-Kunstleve,J.-S.Jiang,J.M.Krahn,\*\*  
\*\* J.Kuszewski, M.Nilges, N.S.Pannu, R.J.Read,\*\*  
\*\* L.M.Rice, G.F.Schroeder, T.Simonson, G.L.Warren.\*\*  
\*\* Copyright (c) 1997-2010 Yale University\*\*  
\*\* ============================================================\*\*  
\*\* Running on machine: hostname unknown (x86\_64/Linux,64-bit)\*\*  
\*\* Program started by: egil\*\*  
\*\* Program started at: 14:48:24 on 09-Jun-2025\*\*  
\*\* ============================================================\*\*

\*\* FFT3C: Using FFTPACK4.1\*\*

CNSsolve\>

---

<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:** [June 11, 2025, 5:35am UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/9 "2025-06-11T05:35:00Z")

</div>

Ok - that looks promising. Next question is then how are you running HADDOCK? which queue command is defined in run.cns?

And if it fails, what is the content of the begin directory? Any out files in there? Check for error messages in those files (start at the end of the file)

---

<div class="post-metadata">

**Author:** ![egil](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@egil](https://ask.bioexcel.eu/u/egil)\
**Post date:** [June 11, 2025, 5:06pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/10 "2025-06-11T17:06:40Z")

</div>

> [@egil](#):
>
> queue\_1

At first I was using this ( I am assuming you are talking about that)  
{===\>} queue\_1=“bash”;  
{===\>} cns\_exe\_1=“/home/egil/PROGRAMAS/cns\_solve\_1.3/intel-x86\_64bit-linux/bin/cns”;  
{===\>} cpunumber\_1=20;

{===\>} queue\_2=“”;  
{===\>} cns\_exe\_2=“”;  
{===\>} cpunumber\_2=0;

{===\>} queue\_3=“”;  
{===\>} cns\_exe\_3=“”;  
{===\>} cpunumber\_3=0;

{===\>} queue\_4=“”;  
{===\>} cns\_exe\_4=“”;  
{===\>} cpunumber\_4=0;

{===\>} queue\_5=“”;  
{===\>} cns\_exe\_5=“”;  
{===\>} cpunumber\_5=0;

{===\>} queue\_6=“”;  
{===\>} cns\_exe\_6=“”;  
{===\>} cpunumber\_6=0;

but then I canhged for this and it gave the same results.

{===\>} queue\_1=“bash”;  
{===\>} cns\_exe\_1=“/home/egil/PROGRAMAS/cns\_solve\_1.3/intel-x86\_64bit-linux/bin/cns”;  
{===\>} cpunumber\_1=20;

As for the begin folder, there is only the file iteration.cns with the following content:

module ( iteration )  
evaluate (&iteration=0)

---

<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:** [June 11, 2025, 5:24pm UTC](https://ask.bioexcel.eu/t/cns-executable-not-working/5335/11 "2025-06-11T17:24:08Z")

</div>

ok so nothing run

Try then changing bash by /bin/bash (I.e. the full path to it)
