nicholst / BSGLMM

Bayesian Spatial Generalised Linear Mixed Model
4 stars 1 forks source link

Problems with compilation due to read_data.cpp #16

Open yizhwan opened 2 years ago

yizhwan commented 2 years ago

Hi,

I am trying to compile BSGLMM on an UBuntu 22.04 running CUDA 11.7. compute 8.6, RTX 3090 TI.

Steps taken are: git clone to /opt/ Modify makefile to reflect compute 86 in gencode. I then ran make, resulting in the following errors:

read_data.cpp: In function ‘int test_ext(const char, const char)’: read_data.cpp:47:11: error: declaration of ‘char ext’ shadows a parameter 47 | char ext = strdup(ext); | ^~~ read_data.cpp:42:47: note: ‘const char ext’ previously declared here 42 | int test_ext(const char img_name,const char ext) | ~~^ read_data.cpp:49:40: error: ‘ext2’ was not declared in this scope; did you mean ‘ext’? 49 | ptr = (char )strstr(img_name2,ext2); | ^~~~ | ext read_data.cpp: In function ‘unsigned char read_nifti1_image(unsigned char, char*)’: read_data.cpp:344:32: warning: too many arguments for format [-Wformat-extra-args] 344 | fprintf(stderr,".",img_nm); | ^~~ make: *** [Makefile:158: read_data.o] Error 1

I have checked with the version on github and this is the most up to date version of the read_data.cpp file.

Please coulf I ask what steps I can do to resolve these errors?

Many thanks,

Yizhou

tdjtdj commented 2 years ago

Yizhou,

Try this version of read_data.cpp. Let us know if it works and we can update the GITHUB website.

Tim Timothy D. Johnson Professor Department of Biostatistics University of Michigan

email: @.*** phone: (734) 936-1007

On Thu, Aug 25, 2022 at 1:16 PM yizhwan @.***> wrote:

Hi,

I am trying to compile BSGLMM on an UBuntu 22.04 running CUDA 11.7. compute 8.6, RTX 3090 TI.

Steps taken are: git clone to /opt/ Modify makefile to reflect compute 86 in gencode. I then ran make, resulting in the following errors:

read_data.cpp: In function ‘int test_ext(const char, const char)’: read_data.cpp:47:11: error: declaration of ‘char* ext’ shadows a parameter 47 | char

ext = strdup(ext); | ^~~ read_data.cpp:42:47: note: ‘const char ext’ previously declared here 42 | int test_ext(const char

img_name,const char ext) | ~~^ read_data.cpp:49:40: error: ‘ext2’ was not declared in this scope; did you mean ‘ext’? 49 | ptr = (char )strstr(img_name2,ext2); | ^~~~ | ext read_data.cpp: In function ‘unsigned char read_nifti1_image(unsigned char, char)’: read_data.cpp:344:32: warning: too many arguments for format [-Wformat-extra-args] 344 | fprintf(stderr,".",img_nm); | ^~~ make: *** [Makefile:158: read_data.o] Error 1

I have checked with the version on github and this is the most up to date version of the read_data.cpp file.

Please coulf I ask what steps I can do to resolve these errors?

Many thanks,

Yizhou

— Reply to this email directly, view it on GitHub https://github.com/nicholst/BSGLMM/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR2ZE5R2F6A57HW7O7UJNLV26S5JANCNFSM57T4ZILQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

yizhwan commented 2 years ago

Hi Tim,

Unfortunately I don't think your new copy of read_data.cpp was attached to your previous message. I have made some modifications to the old copy of read_data.cpp and the coide now seems to work. I am happy to send it across if you would like?

Yizhou yw435@cam.ac.uk

tdjtdj commented 2 years ago

I think it was. Here it is again.

Tim

Timothy D. Johnson Professor Department of Biostatistics University of Michigan

email: @.*** phone: (734) 936-1007

On Thu, Nov 3, 2022 at 9:18 AM yizhwan @.***> wrote:

Hi Tim,

Unfortunately I don't think your new copy of read_data.cpp was attached to your previous message. I have made some modifications to the old copy of read_data.cpp and the coide now seems to work. I am happy to send it across if you would like?

Yizhou @.***

— Reply to this email directly, view it on GitHub https://github.com/nicholst/BSGLMM/issues/16#issuecomment-1302104507, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR2ZE3UY75RCI5MQVVIHXTWGO3RXANCNFSM57T4ZILQ . You are receiving this because you commented.Message ID: @.***>