gflow / GFlow

Software for modeling circuit theory-based connectivity
GNU General Public License v3.0
22 stars 5 forks source link

Errors compiling on Ubuntu 16.04 #10

Closed gioman closed 7 years ago

gioman commented 7 years ago

Hi, thanks for the updated Readme for Linux. I followed the instructions and changed the Makefile in order to point to the petsc installation folder, in the case of Ubuntu 16.04

/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real

When running make beside the warnings also a lot of "too many arguments to function" errors are shown. Any idea of what could be the issue?

Thanks in advance


giovanni@sibirica:~/Desktop/GFlow$ make mpicc -g -Wall -O2 -std=c11 -D_GNU_SOURCE -isystem /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include -c gflow.c -o gflow.o gflow.c: In function ‘parse_args’: gflow.c:80:65: warning: passing argument 4 of ‘PetscOptionsGetString’ makes integer from pointer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-habitat", habitat_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:80:83: warning: passing argument 5 of ‘PetscOptionsGetString’ makes pointer from integer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-habitat", habitat_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:80:4: error: too many arguments to function ‘PetscOptionsGetString’ PetscOptionsGetString(PETSC_NULL, NULL, "-habitat", habitat_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:81:65: warning: passing argument 4 of ‘PetscOptionsGetString’ makes integer from pointer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-nodes", node_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:81:83: warning: passing argument 5 of ‘PetscOptionsGetString’ makes pointer from integer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-nodes", node_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:81:4: error: too many arguments to function ‘PetscOptionsGetString’ PetscOptionsGetString(PETSC_NULL, NULL, "-nodes", node_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:82:65: warning: passing argument 4 of ‘PetscOptionsGetString’ makes integer from pointer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-node_pairs", node_pair_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:82:83: warning: passing argument 5 of ‘PetscOptionsGetString’ makes pointer from integer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-node_pairs", node_pair_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:82:4: error: too many arguments to function ‘PetscOptionsGetString’ PetscOptionsGetString(PETSC_NULL, NULL, "-node_pairs", node_pair_file, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:83:65: warning: passing argument 4 of ‘PetscOptionsGetString’ makes integer from pointer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-output_directory", output_directory, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:83:83: warning: passing argument 5 of ‘PetscOptionsGetString’ makes pointer from integer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-output_directory", output_directory, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:83:4: error: too many arguments to function ‘PetscOptionsGetString’ PetscOptionsGetString(PETSC_NULL, NULL, "-output_directory", output_directory, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:84:65: warning: passing argument 4 of ‘PetscOptionsGetString’ makes integer from pointer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-output_prefix", output_prefix, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:84:83: warning: passing argument 5 of ‘PetscOptionsGetString’ makes pointer from integer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-output_prefix", output_prefix, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:84:4: error: too many arguments to function ‘PetscOptionsGetString’ PetscOptionsGetString(PETSC_NULL, NULL, "-output_prefix", output_prefix, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:85:44: warning: passing argument 3 of ‘PetscOptionsGetReal’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetReal(PETSC_NULL, NULL, "-output_threshold",&output_threshold, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:12:29: note: expected ‘PetscReal {aka double }’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(const char[],const char[],PetscReal ,PetscBool ); ^ gflow.c:85:64: warning: passing argument 4 of ‘PetscOptionsGetReal’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetReal(PETSC_NULL, NULL, "-output_threshold",&output_threshold, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:12:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘double ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(const char[],const char[],PetscReal ,PetscBool ); ^ gflow.c:85:4: error: too many arguments to function ‘PetscOptionsGetReal’ PetscOptionsGetReal(PETSC_NULL, NULL, "-output_threshold",&output_threshold, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:12:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(const char[],const char[],PetscReal ,PetscBool ); ^ gflow.c:86:72: warning: passing argument 4 of ‘PetscOptionsGetString’ makes integer from pointer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-effective_resistance", reff_path, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:86:86: warning: passing argument 5 of ‘PetscOptionsGetString’ makes pointer from integer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-effective_resistance", reff_path, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:86:4: error: too many arguments to function ‘PetscOptionsGetString’ PetscOptionsGetString(PETSC_NULL, NULL, "-effective_resistance", reff_path, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:87:44: warning: passing argument 3 of ‘PetscOptionsGetBool’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetBool(PETSC_NULL, NULL, "-use_mpi_io", &use_mpiio, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:11:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool ,PetscBool ); ^ gflow.c:87:4: error: too many arguments to function ‘PetscOptionsGetBool’ PetscOptionsGetBool(PETSC_NULL, NULL, "-use_mpi_io", &use_mpiio, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:11:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool ,PetscBool ); ^ gflow.c:88:44: warning: passing argument 3 of ‘PetscOptionsGetBool’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetBool(PETSC_NULL, NULL, "-output_final_current_only", &output_final_current_only, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:11:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool ,PetscBool ); ^ gflow.c:88:4: error: too many arguments to function ‘PetscOptionsGetBool’ PetscOptionsGetBool(PETSC_NULL, NULL, "-output_final_current_only", &output_final_current_only, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:11:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool ,PetscBool ); ^ gflow.c:89:44: warning: passing argument 3 of ‘PetscOptionsGetReal’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetReal(PETSC_NULL, NULL, "-max_distance", &max_distance, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:12:29: note: expected ‘PetscReal {aka double }’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(const char[],const char[],PetscReal ,PetscBool ); ^ gflow.c:89:64: warning: passing argument 4 of ‘PetscOptionsGetReal’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetReal(PETSC_NULL, NULL, "-max_distance", &max_distance, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:12:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘PetscReal {aka double }’ PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(const char[],const char[],PetscReal ,PetscBool ); ^ gflow.c:89:4: error: too many arguments to function ‘PetscOptionsGetReal’ PetscOptionsGetReal(PETSC_NULL, NULL, "-max_distance", &max_distance, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:12:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetReal(const char[],const char[],PetscReal ,PetscBool ); ^ gflow.c:90:44: warning: passing argument 3 of ‘PetscOptionsGetBool’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetBool(PETSC_NULL, NULL, "-nearest_first", &nearest_first, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:11:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool ,PetscBool ); ^ gflow.c:90:4: error: too many arguments to function ‘PetscOptionsGetBool’ PetscOptionsGetBool(PETSC_NULL, NULL, "-nearest_first", &nearest_first, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:11:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool ,PetscBool ); ^ gflow.c:91:44: warning: passing argument 3 of ‘PetscOptionsGetBool’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetBool(PETSC_NULL, NULL, "-furthest_first", &furthest_first, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:11:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool ,PetscBool ); ^ gflow.c:91:4: error: too many arguments to function ‘PetscOptionsGetBool’ PetscOptionsGetBool(PETSC_NULL, NULL, "-furthest_first", &furthest_first, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:11:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetBool(const char[],const char [],PetscBool ,PetscBool ); ^ gflow.c:92:43: warning: passing argument 3 of ‘PetscOptionsGetInt’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetInt(PETSC_NULL, NULL, "-shuffle_node_pairs", &shuffle_node_pairs, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:10:29: note: expected ‘PetscInt {aka int }’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(const char[],const char [],PetscInt ,PetscBool ); ^ gflow.c:92:67: warning: passing argument 4 of ‘PetscOptionsGetInt’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetInt(PETSC_NULL, NULL, "-shuffle_node_pairs", &shuffle_node_pairs, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:10:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘PetscInt {aka int }’ PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(const char[],const char [],PetscInt ,PetscBool ); ^ gflow.c:92:4: error: too many arguments to function ‘PetscOptionsGetInt’ PetscOptionsGetInt(PETSC_NULL, NULL, "-shuffle_node_pairs", &shuffle_node_pairs, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:10:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetInt(const char[],const char [],PetscInt ,PetscBool ); ^ gflow.c:93:65: warning: passing argument 4 of ‘PetscOptionsGetString’ makes integer from pointer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-converge_at", convergence, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:93:78: warning: passing argument 5 of ‘PetscOptionsGetString’ makes pointer from integer without a cast [-Wint-conversion] PetscOptionsGetString(PETSC_NULL, NULL, "-converge_at", convergence, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int’ PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:93:4: error: too many arguments to function ‘PetscOptionsGetString’ PetscOptionsGetString(PETSC_NULL, NULL, "-converge_at", convergence, PATH_MAX, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:18:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetString(const char[],const char[],char[],size_t,PetscBool ); ^ gflow.c:94:44: warning: passing argument 3 of ‘PetscOptionsGetEList’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetEList(PETSC_NULL, NULL, "-output_format", ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:20:29: note: expected ‘const char const’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(const char[],const char[],const charconst,PetscInt,PetscInt,PetscBool *); ^ gflow.c:95:38: warning: passing argument 4 of ‘PetscOptionsGetEList’ makes integer from pointer without a cast [-Wint-conversion] output_formats, 3, &output_format, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:20:29: note: expected ‘PetscInt {aka int}’ but argument is of type ‘const char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(const char[],const char[],const charconst,PetscInt,PetscInt,PetscBool ); ^ gflow.c:95:54: warning: passing argument 5 of ‘PetscOptionsGetEList’ makes pointer from integer without a cast [-Wint-conversion] output_formats, 3, &output_format, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:20:29: note: expected ‘PetscInt {aka int }’ but argument is of type ‘int’ PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(const char[],const char[],const charconst,PetscInt,PetscInt,PetscBool ); ^ gflow.c:95:58: warning: passing argument 6 of ‘PetscOptionsGetEList’ from incompatible pointer type [-Wincompatible-pointer-types] output_formats, 3, &output_format, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:20:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(const char[],const char[],const charconst,PetscInt,PetscInt,PetscBool ); ^ gflow.c:94:4: error: too many arguments to function ‘PetscOptionsGetEList’ PetscOptionsGetEList(PETSC_NULL, NULL, "-output_format", ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:20:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetEList(const char[],const char[],const charconst,PetscInt,PetscInt,PetscBool ); ^ gflow.c: In function ‘init_node_pair_sequence’: gflow.c:164:46: warning: passing argument 3 of ‘PetscOptionsGetIntArray’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetIntArray(PETSC_NULL, NULL, "-range", nps->seq, &nps->count, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:14:29: note: expected ‘PetscInt {aka int }’ but argument is of type ‘char ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(const char[],const char[],PetscInt[],PetscInt ,PetscBool ); ^ gflow.c:164:66: warning: passing argument 5 of ‘PetscOptionsGetIntArray’ from incompatible pointer type [-Wincompatible-pointer-types] PetscOptionsGetIntArray(PETSC_NULL, NULL, "-range", nps->seq, &nps->count, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:14:29: note: expected ‘PetscBool {aka enum }’ but argument is of type ‘int ’ PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(const char[],const char[],PetscInt[],PetscInt ,PetscBool ); ^ gflow.c:164:4: error: too many arguments to function ‘PetscOptionsGetIntArray’ PetscOptionsGetIntArray(PETSC_NULL, NULL, "-range", nps->seq, &nps->count, &flg); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:14:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsGetIntArray(const char[],const char[],PetscInt[],PetscInt ,PetscBool ); ^ gflow.c: In function ‘update_matrix’: gflow.c:220:18: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘long unsigned int’ [-Wformat=] message("Infinite value found. R[%zu][%zu] = %lf; R[%llu][%llu] = %lf\n", i, j, val1, i+a, j+b, val2); ^ gflow.c:220:18: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘long unsigned int’ [-Wformat=] gflow.c: In function ‘main’: gflow.c:542:4: error: too many arguments to function ‘PetscOptionsInsertString’ PetscOptionsInsertString(NULL, common_options); ^ In file included from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscsys.h:1643:0, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscbag.h:4, from /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petsc.h:5, from gflow.c:27: /usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/include/petscoptions.h:40:29: note: declared here PETSC_EXTERN PetscErrorCode PetscOptionsInsertString(const char[]); ^ gflow.c: In function ‘parse_args’: gflow.c:112:7: warning: ignoring return value of ‘truncate’, declared with attribute warn_unused_result [-Wunused-result] truncate(reff_path, 0); / Empty the file now, we'll have to repoen and append to it every iteration / ^ Makefile:12: recipe for target 'gflow.o' failed make: [gflow.o] Error 1

gioman commented 7 years ago

@Pbleonard it compiled fine on Ubuntu 16.10. As 16.10 is not a LTR release would be good to have GFlow compilable also on LTR Ubuntu releases, but of course feel free to close this ticket.

gioman commented 7 years ago

@Pbleonard I tried to make things a little more clear for Linux with this PR

https://github.com/Pbleonard/GFlow/pull/12