UCBerkeleySETI / bl_sigproc

Breakthrough Listen fork of SigProc tools
2 stars 0 forks source link

Compilation fails, wrong usage of parallel pragma #2

Closed gijzelaerr closed 6 years ago

gijzelaerr commented 6 years ago
ake[3]: Entering directory '/packaging/kern/upstream_repos/bl_sigproc/src'
depbase=`echo dedisperse_all.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I.. . -DPSRFITS -I/include  -DFFTW_THREADS  -I/usr/include  -march=native -O2 -pipe -fopenmp -DHAVE_OPENMP -MT dedisperse_all.o -MD -MP -MF $depbase.Tpo -c -o dedisperse_all.o dedisperse_all.C &&\
mv -f $depbase.Tpo $depbase.Po
dedisperse_all.C: In function ‘void inline_dedisperse_all_help()’:
dedisperse_all.C:26:73: warning: unknown conversion type character ‘=’ in format [-Wformat=]
   fprintf(stderr,"-tol [1.25]        smear tolerance, e.g. 25% = 1.25\n");
                                                                         ^
dedisperse_all.C: In function ‘void do_dedispersion(short unsigned int**, short unsigned int*, int, int, int, float, int*)’:
dedisperse_all.C:173:34: error: ‘j’ has not been declared
 #pragma omp parallel for private(j)
                                  ^
dedisperse_all.C: In function ‘int main(int, char**)’:
dedisperse_all.C:262:129: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
    fprintf(stderr,"ERROR: sofware has been compiled with LONG64BIT as a datatype of %d bytes, needs to be 8\n",sizeof(LONG64BIT));
                                                                                                                                 ^
dedisperse_all.C:462:54: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘FILE* {aka _IO_FILE*}’ [-Wformat=]
       fprintf(stderr,"Error opening file %s\n",output);
                                                      ^
dedisperse_all.C:605:116: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘FILE* {aka _IO_FILE*}’ [-Wformat=]
    fprintf(stderr,"Error opening giant search results output file %s.\nWILL NOT RUN GIANT SEARCH.\n\n",Gresultsfile);
                                                                                                                    ^
Makefile:1494: recipe for target 'dedisperse_all.o' failed
gijzelaerr commented 6 years ago

This can be solved by declaring j before the pragma statement.

gijzelaerr commented 6 years ago

in the package this has been fixed with this following patch

https://github.com/kernsuite-debian/bl-sigproc/blob/master/debian/patches/fix_pragma