# Fatal Error: Test of FFT3C failed after compiling CNS

**URL:** <https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784>\
**Category:** HADDOCK\
**Tags:** haddock, support\
**Created:** [July 3, 2025, 10:43pm UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784 "2025-07-03T22:43:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brad](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@Brad](https://ask.bioexcel.eu/u/Brad)\
**Post date:** [July 3, 2025, 10:43pm UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/1 "2025-07-03T22:43:57Z")

</div>

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?)?

---

<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 4, 2025, 7:32am UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/2 "2025-07-04T07:32:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Brad](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@Brad](https://ask.bioexcel.eu/u/Brad)\
**Post date:** [July 4, 2025, 11:45am UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/3 "2025-07-04T11:45:22Z")

</div>

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

---

<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 4, 2025, 12:15pm UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/4 "2025-07-04T12:15:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Brad](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@Brad](https://ask.bioexcel.eu/u/Brad)\
**Post date:** [July 4, 2025, 12:43pm UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/5 "2025-07-04T12:43:36Z")

</div>

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

---

<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 9, 2025, 10:16am UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/6 "2025-07-09T10:16:32Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Brad](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@Brad](https://ask.bioexcel.eu/u/Brad)\
**Post date:** [July 9, 2025, 4:21pm UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/7 "2025-07-09T16:21:31Z")

</div>

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](https://www.bonvinlab.org/haddock3/CNS.html#troubleshooting)

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.

---

<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 9, 2025, 7:48pm UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/8 "2025-07-09T19:48:48Z")

</div>

Run some of the examples as a test.

Also which compiler including version are you using?

---

<div class="post-metadata">

**Author:** ![Brad](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@Brad](https://ask.bioexcel.eu/u/Brad)\
**Post date:** [July 14, 2025, 9:14pm UTC](https://ask.bioexcel.eu/t/fatal-error-test-of-fft3c-failed-after-compiling-cns/5784/9 "2025-07-14T21:14:04Z")

</div>

Thanks for the help!

I’m using: gfortran --version  
GNU Fortran (Homebrew GCC 15.1.0) 15.1.0
