CNS executable not working

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?

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

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

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…

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.

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

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

Does it work?

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>

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)

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)

ok so nothing run

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