Reputation: 11
I'm trying to compile this scientific software and running make gives problems that I've been stuck on for days. The error is
Error: Unable to determine fftw version.
The specific compilation line that's giving me issue is
cc -c -static -m64 -O1 -fcommon -DGIT_SNANA_VERSION=\""v11_05d-43-gce493d51"\" -I/path/to/directory/cfitsio-4.2.0/include ../src/sntools_output.c
Been debugging this back and forth with no success so far. I'm on a cluster machine so I need to locally install a lot of softwares. I install gsl, cfitsio, etc. successfully and also installed fftw. Running fftw-wisdom doesn't give me errors for one. Typing which fftw-wisdom
points to my local installation. So far I tried adding -L flags, checking libfftw3.a exists, and adding relevant paths. None of them worked. Any ideas on what I could do here?
Typing make
inside src
directory gives me
(cd ../obj; \
cc -c -static -m64 -O1 -fcommon -DGIT_SNANA_VERSION=\""v11_05d-48-g4f35048a"\" -I//global/homes/u/user/local/cfitsio-4.2.0//include ../src/sntools_output.c )
Error: Unable to determine fftw version.
make: *** [Makefile:907: ../obj/sntools_output.o] Error 1
Typing echo $LD_LIBRARY_PATH
gives me the following output.
/global/homes/u/user/local/fftw/lib:/global/homes/u/user/local/gsl/lib:/global/common/software/dessn/perlmutter/desdm/eups/packages/Linux64/cfitsio/3.370+1/lib:/global/common/software/dessn/perlmutter/desdm/eups/packages/Linux64/openblas/0.3.10+0/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/math_libs/11.7/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/cuda/11.7/extras/CUPTI/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/cuda/11.7/extras/Debugger/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/cuda/11.7/nvvm/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/cuda/11.7/lib64:/opt/cray/pe/papi/7.0.0.1/lib64:/opt/cray/pe/gcc/11.2.0/snos/lib64:/opt/cray/libfabric/1.15.2.0/lib64:/global/common/software/dessn/perlmutter/desdm/eups/packages/Linux64/fftw/3.3.2+5/lib
So my local fftw installation should be accessible. Typing which fftw-wisdom
yields /global/homes/u/user/local/fftw/bin/fftw-wisdom
. I do realize that there are two fftw installed (one locally and one at
/global/common/software/dessn/perlmutter/desdm/eups/packages/Linux64/fftw/3.3.2+5/lib
I tried changing LD_LIBRARY_PATH to only include one of the two but still get the same error.
Since the error isn't not being able to locate fftw but the problem lies with the version, I'm not sure what is causing the problem. The code I am trying to compile is a couple of dozen lines of headers followed by functions.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <time.h>
#include <math.h>
#include <ctype.h>
#include <sys/stat.h>
// #include "sntools.h"
#include "sndata.h"
#include "sntools_output.h"
// include the package-specific code(s) here.
#ifdef USE_HBOOK
#include "sntools_output_hbook.c"
#endif
#ifdef USE_ROOT
#include "sntools_output_root.c"
#endif
#ifdef USE_TEXT
#include "sntools_output_text.c"
#endif
#ifdef USE_MARZ
#include "sntools_output_marz.c"
#endif
Here's a snippet of the header. I don't see anything that particularly stands out.
Upvotes: 1
Views: 88