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.