Fatal Error: Test of FFT3C failed after compiling CNS

I’ve downloaded HADDOCK2.5 and CNS1.3 to my computer, following the installation documentation regarding pathway changes, patching CNS1.3 bin/, instlib/, source/ material from the HADDOCK2.5 download, etc.

However, after compiling the CNS and executing it, I get the following:
============================================================
| |
| 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 (Mac/Intel,64-bit)
with 8 threads
Program started by: (redacted)
Program started at: 18:29:35 on 03-Jul-2025
============================================================

FFT3C: Using FFTPACK4.1
Fatal Error: Test of FFT3C failed.
Check the FAQ in the online documentation to see how to fix this problem
Program will stop immediately.
============================================================
Maximum dynamic memory allocation: 8297488 bytes
Maximum dynamic memory overhead: 960 bytes
Program started at: 18:29:35 on 03-Jul-2025
Program stopped at: 18:29:35 on 03-Jul-2025
CPU time used: 0.0014 seconds
============================================================

Is there a way to prevent the Fatal Error:Test of FFT3C failed? What would be the best way to assess where/why the test failed (during compiling?)?

Did you try to use one of the precompiled CNS executable (links in the email you received)?

Yes, I downloaded cns_solve-1.31-UU-Darwin-x86.exe from the link within the email to my Mac (1.4 GHz Quad-Core Intel Core i5; Sequoia 15.4.1 OSx) and give it the right execute permissions. However, when I check if it is working by executing it, the following output occurs:

zsh: bad CPU type in executable: /cns_v1.3_r9/mac-intel-darwin/source/cns_solve-1.31-UU-Darwin-x86.exe

What kind of Mac do you have?
Did you try instead the M2/3 executable?

Here is a general hardware overview:
|Model Name:|MacBook Pro|
| Model Identifier:|MacBookPro15,4|
| Processor Name:|Quad-Core Intel Core i5|
| Processor Speed:|1.4 GHz|
| Number of Processors:|1|
| Total Number of Cores:|4|
| L2 Cache (per Core):|256 KB|
| L3 Cache:|6 MB|
| Hyper-Threading Technology:|Enabled|
| Memory:|8 GB|

Yes, I also tried using the cns_solve-1.31-UU-Darwin-arm64.exe from the link within the email, gave it the right execute permissions, and still I get the following output regardless of whether I use ~/cns_v1.3_r9/mac-intel-darwin/source or ~/cns_v1.3_r9/mac-arm-darwin/source for permissions/execute.

zsh: bad CPU type in executable: /cns_v1.3_r9/mac-arm-darwin/source/cns_solve-1.31-UU-Darwin-arm64.exe

Clearly not an arm processor.

And strange the intel version of the executable does not work.

Do you have recent gfortran compilers installed?

Below is the header of the Makefile I used to compile it on an intel Mac. Compare it to your version (which should be under mac-intel-darwin/source in your CNS directory)

I think I may have found the solution, but unsure if additional issues arise as a result. I modified the Makefile within my directory to mirror that within the troubleshooting 3.Makefile here: CNS Installation — haddock3 3.0.0 documentation

When compiling that, I observe the following warnings before the compiling commands start:
to_cns.c:282:7: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
282 | if ( ! fscanf(stream,“%d %d %d %lf %lf %lf %lf %lf %lf”,
| ^
283 | &h, &k, &l,
284 | &mean_i, &mean_s,
285 | &plus_i, &plus_s,
286 | &minus_i, &minus_s) == 9 ) {
| ~~
to_cns.c:282:7: note: add parentheses after the ‘!’ to evaluate the comparison first
282 | if ( ! fscanf(stream,“%d %d %d %lf %lf %lf %lf %lf %lf”,
| ^
| (
283 | &h, &k, &l,
284 | &mean_i, &mean_s,
285 | &plus_i, &plus_s,
286 | &minus_i, &minus_s) == 9 ) {
| )
to_cns.c:282:7: note: add parentheses around left hand side expression to silence this warning
282 | if ( ! fscanf(stream,“%d %d %d %lf %lf %lf %lf %lf %lf”,
| ^
| (
283 | &h, &k, &l,
284 | &mean_i, &mean_s,
285 | &plus_i, &plus_s,
286 | &minus_i, &minus_s) == 9 ) {
| )
to_cns.c:335:7: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
335 | if ( ! fscanf(stream,“%d %d %d %lf %lf”,
| ^
336 | &h, &k, &l,
337 | &mean_i, &mean_s) == 5 ) {
| ~~
to_cns.c:335:7: note: add parentheses after the ‘!’ to evaluate the comparison first
335 | if ( ! fscanf(stream,“%d %d %d %lf %lf”,
| ^
| (
336 | &h, &k, &l,
337 | &mean_i, &mean_s) == 5 ) {
| )
to_cns.c:335:7: note: add parentheses around left hand side expression to silence this warning
335 | if ( ! fscanf(stream,“%d %d %d %lf %lf”,
| ^
| (
336 | &h, &k, &l,
337 | &mean_i, &mean_s) == 5 ) {
| )
to_cns.c:286:29: warning: result of comparison of constant 9 with boolean expression is always false [-Wtautological-constant-out-of-range-compare]
282 | if ( ! fscanf(stream,“%d %d %d %lf %lf %lf %lf %lf %lf”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
283 | &h, &k, &l,
| ~~~~~~~~~~~
284 | &mean_i, &mean_s,
| ~~~~~~~~~~~~~~~~~
285 | &plus_i, &plus_s,
| ~~~~~~~~~~~~~~~~~
286 | &minus_i, &minus_s) == 9 ) {
| ~~~~~~~~~~~~~~~~~~~ ^ ~
to_cns.c:337:27: warning: result of comparison of constant 5 with boolean expression is always false [-Wtautological-constant-out-of-range-compare]
335 | if ( ! fscanf(stream,“%d %d %d %lf %lf”,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
336 | &h, &k, &l,
| ~~~~~~~~~~~
337 | &mean_i, &mean_s) == 5 ) {
| ~~~~~~~~~~~~~~~~~ ^ ~
4 warnings generated.
g++ -o cluster_struc -O -DINTEGER=‘long int’ -DCNS_ARCH_TYPE_LINUX cluster_struc.cpp -lm
cluster_struc.cpp:176:28: warning: expression result unused [-Wunused-value]
176 | delete neighbor, neighborcount;
| ^~~~~~~~~~~~~
1 warning generated.
lex --noyywrap refloat.l
gcc -O -DINTEGER=‘long int’ -DCNS_ARCH_TYPE_LINUX -o refloat lex.yy.c -lm -ll
make clean

After the compiling is done, these are the final warning provided:
dmemory.c:147:9: warning: absolute value function ‘abs’ given an argument of type ‘long’ but has parameter of type ‘int’ which may cause truncation of value [-Wabsolute-value]
147 | if (abs(velem) != oelem) return 2;
| ^
dmemory.c:147:9: note: use function ‘labs’ instead
147 | if (abs(velem) != oelem) return 2;
| ^~~
| labs
1 warning generated.

compiling: machine_c.c
machine_c.c:11:5: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
11 | int csatty_(fildes)
| ^
1 warning generated.

The outcome of this is an .exe file that can be executed and the CNS prompt is observed. However, I’m unsure if these warnings will have any impact on CNS function within HADDOCK.

Run some of the examples as a test.

Also which compiler including version are you using?