External Email - Use Caution
Hello Kazuhiro, With the old configure/automake tools, I used the following configure command on a CentOS7 machine (release 7.4.17-8) to build with the 5.0.35 Cuda distribution with the CentOS6 packages archive. (My cuda 5 distribution was installed under /home/osboxes/unzip/centos6-x86_64-packages/CUDA/5.0.35-rh5).
$ ./configure —disable-Werror —enable-fermi-gpu —with-cuda=/home/osboxes/unzip/centos6-x86_64-packages/CUDA/5.0.35-rh5 —with-pkgs-dir=/home/osboxes/unzip/centos6-x86_64-packages My understanding is you need to use the —enable-fermi-gpu configure option.
I have not yet tried building with cuda in the new cmake build with the new packages archive (see previous thread postings with Christian). Please be aware that the automake build may no longer be as up to date as the cmake build, and we also do not technically support building with cuda. On Nov 1, 2018, at 09:52, Nakamura Kazuhiro <knam@akita-noken.jp> wrote: External Email - Use Caution Hi, I'm Kazuhiro.I also met trouble for compilation of freesurfer stable6 repository under my Ubuntu 18.04 LTS machine.Even the binary package of freesurfer6.0(freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz) can workunder Ubuntu 18.04, option of '-use-gpu' required cuda runtime library of ver 5.0(libcudart.so.5.0).I have tried to link cuda runtime library of Ubuntu 18.04 (ver9.1) to ver5.0 filename.(ln -s libcudart..so.9.0 libcudart.so.5.0 )It cannot work well.
External Email - Use Caution
Thank you for information of build parameter at CentOS6 packages archive.
I also remember. Ubuntu 18.04 Default gcc/g++/gfortran compiler is now version 7.3.0-27. Therefore, at the compilation of freesurfer in Ubuntu 18.04, I have installed gfortran-4.8 packages in addition to install gcc-4.8 and g++-4.8 packages. And I set default compiler of fortran change to gfortran-4.8. sudo apt-get install gcc-4.8 g++-4.8 gfortran-4.8 libgfortran-4.8-dev sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-4.8 50
With the old configure/automake tools, I used the following configure command on a CentOS7 machine (release 7.4.17-8) to build with the 5.0.35 Cuda distribution with the CentOS6 packages archive. (My cuda 5 distribution was installed under /home/osboxes/unzip/centos6-x86_64-packages/CUDA/5.0.35-rh5).
$ ./configure -disable-Werror -enable-fermi-gpu -with-cuda=/home/osboxes/ unzip/centos6-x86_64-packages/CUDA/5.0.35-rh5 -with-pkgs-dir=/home/osboxes/ unzip/centos6-x86_64-packages
My understanding is you need to use the -enable-fermi-gpu configure option.
I have not yet tried building with cuda in the new cmake build with the new packages archive (see previous thread postings with Christian). Please be aware that the automake build may no longer be as up to date as the cmake build, and we also do not technically support building with cuda.
----------------------------------------- 地方独立行政法人 秋田県立病院機構 秋田県立脳血管研究センター 放射線医学研究部 研究員 中村 和浩 018-833-0115 ext.769 Email: knam@akita-noken.jp
External Email - Use Caution
Thank you to all who are providing input for these issues. After ensuring the correct versions of gcc, g++, and gfortran were installed and being used, I am able to complete the `make` command. However, when I conduct `make test`, I receive the following output:
56% tests passed, 57 tests failed out of 130
Total Test time (real) = 200.72 sec
The following tests FAILED: 2 - test_TriangleFile_readWrite (Failed) 4 - utils_test (Failed) 5 - voronoi_test (Failed) 6 - border_values_test (Failed) 9 - soapbubble_test (Failed) 10 - lineprof_test (Failed) 13 - mri_annotation2label_test (Failed) 15 - mri_aparc2aseg_test (Failed) 16 - mri_binarize_test (Failed) 18 - mri_ca_label_test (Failed) 20 - mri_ca_normalize_test (Failed) 22 - mri_ca_register_test (Failed) 25 - mri_concat_test (Failed) 28 - mri_convert_test (Failed) 29 - mri_coreg_test (Failed) 30 - mri_diff_test (Failed) 32 - mri_em_register_test (Failed) 36 - mri_fuse_segmentations_test (Failed) 37 - mri_fwhm_test (Failed) 39 - mri_label2label_test (Failed) 40 - mri_label2vol_test (Failed) 42 - mri_matrix_multiply_test (Failed) 43 - mri_mc_test (Failed) 47 - mri_normalize_test (Failed) 49 - mri_relabel_hypointensities_test (Failed) 53 - mri_robust_template_test (Failed) 58 - mri_segment_test (Failed) 61 - mri_surf2surf_test (Failed) 62 - mri_surf2vol_test (Failed) 63 - mri_surfcluster_test (Failed) 68 - mris_anatomical_stats_test (Failed) 70 - mris_ca_label_test (Failed) 72 - mris_convert_test (Failed) 73 - mris_convert_gifti_test (Failed) 75 - mris_curvature_test (Failed) 76 - mris_curvature_stats_test (Failed) 77 - mris_diff_test (Failed) 78 - mris_divide_parcellation_test (Failed) 81 - mris_fix_topology_test (Failed) 84 - mris_inflate_posix_test (Failed) 86 - mris_jacobian_posix_test (Failed) 87 - mris_label2annot_test (Failed) 89 - mris_make_surfaces_test (Failed) 91 - mris_register_test (Failed) 93 - mris_smooth_posix_test (Failed) 95 - mris_sphere_test (Failed) 96 - mris_sphere_posix_test (Failed) 97 - mris_surface_stats_test (Failed) 99 - mris_volmask_test (Failed) 106 - talairach_avi_test (Failed) 110 - mri_concatenate_gcam_test (Failed) 112 - mri_glmfit_test (Failed) 116 - mri_seg_diff_test (Failed) 118 - mri_segcentroids_test (Failed) 120 - mri_warp_convert_test (Failed) 123 - mris_expand_test (Failed) 127 - mris_transform_test (Failed) Errors while running CTest Makefile:85: recipe for target 'test' failed make: *** [test] Error 8
I have installed the datafiles in the annex repo. Do you have any suggestions for alleviating these failures?
I must add that I, too, am performing this build from source in hopes to be able to use CUDA (I have 9.1) and my GPUs (GeForce Titan X) when running freesurfer. I understand that CUDA is not directly supported, but do you believe that building from source is the best option to try to get Freesurfer to work with the CUDA software and GPU’s on my system?
I could not get them to work together from the prebuilt software and I have concerns about downloading CUDA 5.0 on my Ubuntu 18.04 system, since the archived CUDA 5.0 download on NVIDIA only has options for up to Ubuntu 11.10.
If you have other suggestions besides building from source to get Freesurfer to use my GPUs for processing, I’m open to them. Otherwise, any advise you have re: my current `make test` issues are much appreciated!
Many thanks, Christian McDaniel
P.S. Kazuhiro, I tried your 8-step procedure above, but on step 2 I got an error building vxl that it could not find the '-lgeotiff' flag used in one of the cmake commands. I tried debugging but found no help online. Any advice?
___________________________________________
Christian McDaniel President, Deep Learning @ UGA Data Scientist, UGA CVIOG ITOS Data Analytics Team Master’s Student, Institute for Artificial Intelligence Boyd GSRC University of Georgia Athens, GA ________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu on behalf of fsbuild fsbuild@contbay.com Sent: Thursday, November 1, 2018 5:26:06 PM To: freesurfer@nmr.mgh.harvard.edu Cc: knam@akita-noken.jp Subject: Re: [Freesurfer] Third party dependencies directory not found when building from source
External Email - Use Caution
Hello Kazuhiro,
With the old configure/automake tools, I used the following configure command on a CentOS7 machine (release 7.4.17-8) to build with the 5.0.35 Cuda distribution with the CentOS6 packages archive. (My cuda 5 distribution was installed under /home/osboxes/unzip/centos6-x86_64-packages/CUDA/5.0.35-rh5).
$ ./configure —disable-Werror —enable-fermi-gpu —with-cuda=/home/osboxes/unzip/centos6-x86_64-packages/CUDA/5.0.35-rh5 —with-pkgs-dir=/home/osboxes/unzip/centos6-x86_64-packages
My understanding is you need to use the —enable-fermi-gpu configure option.
I have not yet tried building with cuda in the new cmake build with the new packages archive (see previous thread postings with Christian). Please be aware that the automake build may no longer be as up to date as the cmake build, and we also do not technically support building with cuda.
On Nov 1, 2018, at 09:52, Nakamura Kazuhiro knam@akita-noken.jp wrote:
External Email - Use Caution
Hi, I'm Kazuhiro. I also met trouble for compilation of freesurfer stable6 repository under my Ubuntu 18.04 LTS machine.
Even the binary package of freesurfer6.0(freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz) can work under Ubuntu 18.04, option of '-use-gpu' required cuda runtime library of ver 5.0(libcudart.so.5.0).
I have tried to link cuda runtime library of Ubuntu 18.04 (ver9.1) to ver5.0 filename. (ln -s libcudart.so.9.0 libcudart.so.5.0 ) It cannot work well.
External Email - Use Caution
Hello Christian,
I have not checked 'make check' procedure, 'recon-all' with my compiled binary was finished without error and segmentation results looks nice. It may be OK for my environment.
Using '-use-gpu' and '-openmp 8' flag, the time of 'recon-all' reduced to around 4 hours from 12 hours without flag in my PC environment (Xenon E5-2620 [2.00GHz/15M/6Core-12Thread] x 2 + Tesla C2075 6GB x2 ).
At the first time in build freesurfer, I have not known my Tesla GPU (fermi-architecture of sm_20) was not supported in CUDA 9.1 (distribution in Ubuntu 18.04 package). I have tried to configure with '--with-cuda = /usr'. 'make -j4 'was completely finished but cuda related binary (such as 'mri_em_register_cuda') have not compiled and not installed.
Then I made '/usr/local/cuda' directory and include and library path was linked in '/usr/local/cuda' directory cd /usr/local/cuda sudo ln -s /usr/include include sudo ln -s /usr/lib/x86_64-linux-gnu lib sudo ln -s /usr/bin bin
and NVIDIA_ARCH in 'configure.in' was edited to sm_11 to sm_30, configure with '--with-cuda=/usr/local/cuda' flag. It can compiled cuda related binary.
However my GPU architecture does not support sm_30, 'recon-all' was stopped with error of ---------------------------------------------------------------------------------- CUDA Error in file '../include/ctfactory.hpp' on line 96 : invalid texture reference. Abort (core dumped) --------------------------------------------------------------------------------- After that, I did extract cuda_cluster_pkgs_8.0.61_ubuntu1604.tar.gz and compiled freesufer binary again.
GPU architecture and related CUDA version was reffered in the following URL http://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidi...
P.S. Kazuhiro, I tried your 8-step procedure above, but on step 2 I got an error building vxl that it could not find the '-lgeotiff' flag used in one of the cmake commands. I tried debugging but found no help online. Any advice?
I remeber ubuntu 18.04 package of libgeotiff-dev was installed after vxl compilation error appeared. You might require sudo apt install libgeotiff-dev.
-------------------------------------------------------------- Kazuhiro Nakamura, Ph.D. Research Institute for Brain and Blood Vessels-Akita 6-10 Senshukubota machi, Akita 010-0874 JAPAN phone +81-18-833-0115 ext 769, fax +81-18-833-2104 E-mail: knam@akita-noken.jp
freesurfer@nmr.mgh.harvard.edu