Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with example data #1

Open
steve-petersen opened this issue Mar 30, 2021 · 13 comments
Open

Problem with example data #1

steve-petersen opened this issue Mar 30, 2021 · 13 comments

Comments

@steve-petersen
Copy link

Dear devs,

Before install all required R libraries on my Ubuntu computer I tried to run the minimal example included in this web but I got an error that I don't know what it could be related to, please, could you give me some idea?. This is my complete output.

R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

library( brainAgeR )
Loading required package: ANTsRCore

Attaching package: ‘ANTsRCore’

The following objects are masked from ‘package:stats’:

sd, var

The following objects are masked from ‘package:base’:

all, any, apply, max, min, prod, range, sum

Loading required package: ANTsR
Loading required package: ANTsRNet
Loading required package: keras
Loading required package: tensorflow
Loading required package: zip

Attaching package: ‘zip’

The following objects are masked from ‘package:utils’:

unzip, zip

Attaching package: ‘brainAgeR’

The following objects are masked from ‘package:ANTsRNet’:

brainAge, brainExtraction

library( ANTsR )
library( tensorflow )
library( keras )
filename = system.file("extdata", "test_image.nii.gz", package = "brainAgeR", mustWork = TRUE)
img = antsImageRead( filename ) # T1 image
mdl = getBrainAgeModel( tempfile() )
trying URL 'https://ndownloader.figshare.com/files/22365378'
Content type 'application/zip' length 199504379 bytes (190.3 MB)
==================================================
downloaded 190.3 MB

2021-03-30 14:17:23.137571: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:23.137600: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2021-03-30 14:17:24.651865: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-30 14:17:24.652773: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2021-03-30 14:17:24.661953: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-30 14:17:24.662250: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 960M computeCapability: 5.0
coreClock: 1.176GHz coreCount: 5 deviceMemorySize: 1.96GiB deviceMemoryBandwidth: 74.65GiB/s
2021-03-30 14:17:24.662347: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:24.662416: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcublas.so.11'; dlerror: libcublas.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:24.662480: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcublasLt.so.11'; dlerror: libcublasLt.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:24.662551: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:24.662616: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcurand.so.10'; dlerror: libcurand.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:24.662680: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:24.662742: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcusparse.so.11'; dlerror: libcusparse.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:24.662805: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/lib/fsl/5.0
2021-03-30 14:17:24.662817: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-03-30 14:17:24.663087: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-03-30 14:17:24.663644: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-30 14:17:24.663673: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-30 14:17:24.663688: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]
Error in inputX * (wt) : non-numeric argument to binary operator

bage = brainAge( img, batch_size = 10, sdAff = 0.01, model = mdl )
WARNING:tensorflow:No training configuration found in the save file, so the model was not compiled. Compile it manually.
2021-03-30 14:17:55.032628: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2021-03-30 14:17:55.049998: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2599990000 Hz
Error in predict(model, myX) : object 'mdl' not found
bage[[1]][,1:4]
Error: object 'bage' not found

Thank you very much in advance.

Best wishes,

Steve

@ntustison
Copy link
Member

Are you able to run any of the ANTsRNet functions? e.g., brainExtraction or brainAge?

@steve-petersen
Copy link
Author

It seems that there are problems with some libraries libcusolver.so.10. Despite this, BrainExtraction seems to worked fine, I used this command:

Rscript Scripts/doBrainExtraction.R Data/Example/1097782_defaced_MPRAGE.nii.gz outputProbabilityMask.nii.gz Data/Template/S_template3_resampled.nii.gz

Loading required package: ANTsRCore

Attaching package: ‘ANTsRCore’

The following objects are masked from ‘package:stats’:

sd, var

The following objects are masked from ‘package:base’:

all, any, apply, max, min, prod, range, sum

Reading reorientation template Data/Template/S_template3_resampled.nii.gz (elapsed time: 0.1615124 seconds)
2021-03-30 19:32:43.597349: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-03-30 19:32:45.018644: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-30 19:32:45.019381: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2021-03-30 19:32:45.049508: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-30 19:32:45.049788: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 960M computeCapability: 5.0
coreClock: 1.176GHz coreCount: 5 deviceMemorySize: 1.96GiB deviceMemoryBandwidth: 74.65GiB/s
2021-03-30 19:32:45.049817: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-03-30 19:32:45.052667: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-03-30 19:32:45.052721: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-03-30 19:32:45.053603: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-03-30 19:32:45.053863: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-03-30 19:32:45.053998: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/local/cuda/extras/CUPTI/lib64:/usr/lib/fsl/5.0
2021-03-30 19:32:45.054636: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2021-03-30 19:32:45.054725: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/local/cuda/extras/CUPTI/lib64:/usr/lib/fsl/5.0
2021-03-30 19:32:45.054738: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-03-30 19:32:45.055010: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-03-30 19:32:45.055495: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-30 19:32:45.055524: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-30 19:32:45.055534: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]
Loading weights file (elapsed time: 0.04657459 seconds)
Reading Data/Example/1097782_defaced_MPRAGE.nii.gz (elapsed time: 0.2490969 seconds)
Normalizing to template (elapsed time: 0.568753 seconds)
Prediction and decoding2021-03-30 19:32:46.795947: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2021-03-30 19:32:46.815488: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2599990000 Hz
(elapsed time: 3.082726 seconds)
Renormalize to native space (elapsed time: 0.09434485 seconds)
Writing outputProbabilityMask.nii.gz (elapsed time: 1.911588 seconds)

Total elapsed time: 6.33902 seconds

(base) miguel@miguel-GP62-6QF:~/Desktop/BrainExtraction$ Rscript Scripts/doBrainExtraction.R Data/Example/1097782_defaced_MPRAGE.nii.gz outputProbabilityMask.nii.gz Data/Template/S_template3_resampled.nii.gz
Loading required package: ANTsRCore

Attaching package: ‘ANTsRCore’

The following objects are masked from ‘package:stats’:

sd, var

The following objects are masked from ‘package:base’:

all, any, apply, max, min, prod, range, sum

Reading reorientation template Data/Template/S_template3_resampled.nii.gz (elapsed time: 0.1565659 seconds)
2021-03-30 19:33:11.061187: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-03-30 19:33:12.431066: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-30 19:33:12.431778: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2021-03-30 19:33:12.461522: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-30 19:33:12.461783: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 960M computeCapability: 5.0
coreClock: 1.176GHz coreCount: 5 deviceMemorySize: 1.96GiB deviceMemoryBandwidth: 74.65GiB/s
2021-03-30 19:33:12.461809: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-03-30 19:33:12.464588: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-03-30 19:33:12.464640: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-03-30 19:33:12.465526: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-03-30 19:33:12.465789: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-03-30 19:33:12.465925: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/local/cuda/extras/CUPTI/lib64:/usr/lib/fsl/5.0
2021-03-30 19:33:12.466566: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2021-03-30 19:33:12.466651: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/local/cuda/extras/CUPTI/lib64:/usr/lib/fsl/5.0
2021-03-30 19:33:12.466666: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-03-30 19:33:12.466936: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-03-30 19:33:12.467353: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-30 19:33:12.467387: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-30 19:33:12.467399: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]
Loading weights file (elapsed time: 0.04328108 seconds)
Reading Data/Example/1097782_defaced_MPRAGE.nii.gz (elapsed time: 0.2453451 seconds)
Normalizing to template (elapsed time: 0.5647607 seconds)
Prediction and decoding2021-03-30 19:33:14.180282: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2021-03-30 19:33:14.199610: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2599990000 Hz
(elapsed time: 3.065268 seconds)
Renormalize to native space (elapsed time: 0.08908319 seconds)
Writing outputProbabilityMask.nii.gz (elapsed time: 1.757728 seconds)

Total elapsed time: 6.145734 seconds

BRAINAGE R EXAMPLE

In the case of brainAgeR, this is the output

library( ANTsR )

library( keras )
filename = system.file("extdata", "test_image.nii.gz", package = "brainAgeR", mustWork = TRUE)
img = antsImageRead( filename ) # T1 image
mdl = getBrainAgeModel( tempfile() )
trying URL 'https://ndownloader.figshare.com/files/22365378'
Content type 'application/zip' length 199504379 bytes (190.3 MB)
==================================================
downloaded 190.3 MB

2021-03-30 19:42:43.376899: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-03-30 19:42:44.766717: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-30 19:42:44.767430: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2021-03-30 19:42:44.798434: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-30 19:42:44.798727: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 960M computeCapability: 5.0
coreClock: 1.176GHz coreCount: 5 deviceMemorySize: 1.96GiB deviceMemoryBandwidth: 74.65GiB/s
2021-03-30 19:42:44.798768: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-03-30 19:42:44.801865: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-03-30 19:42:44.801929: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-03-30 19:42:44.802948: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-03-30 19:42:44.803252: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-03-30 19:42:44.803397: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/local/cuda/extras/CUPTI/lib64:/usr/lib/fsl/5.0
2021-03-30 19:42:44.804204: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2021-03-30 19:42:44.804292: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/miguel/.local/share/r-miniconda/envs/r-reticulate/lib:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server:/usr/local/cuda/extras/CUPTI/lib64:/usr/lib/fsl/5.0
2021-03-30 19:42:44.804305: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-03-30 19:42:44.804587: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-03-30 19:42:44.805256: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-30 19:42:44.805289: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-30 19:42:44.805300: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]
Error in inputX * (wt) : non-numeric argument to binary operator

bage = brainAge( img, batch_size = 10, sdAff = 0.01, model = mdl )
WARNING:tensorflow:No training configuration found in the save file, so the model was not compiled. Compile it manually.
2021-03-30 19:43:13.984013: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2021-03-30 19:43:14.003498: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2599990000 Hz
Error in predict(model, myX) : object 'mdl' not found
bage[[1]][,1:4]
Error: object 'bage' not found

Thanks.

@ntustison
Copy link
Member

@stnava --- It looks like the problem is here but I don't see a quick fix.

@stnava
Copy link
Member

stnava commented Mar 30, 2021

I could not reproduce this error on either OS X or Linux - @ntustison - could you?

@stnava
Copy link
Member

stnava commented Mar 30, 2021

anyway, I would guess that R 3.x is the issue.

@stnava
Copy link
Member

stnava commented Mar 30, 2021

although I can't reproduce the issue , the question is whether this:

library( keras )
i1 = layer_input( list(NULL,NULL,2) )
i2 = layer_input( list(NULL,NULL,2) )
i3 = i1 * 0.5 + i2 * 0.5

is valid code. it works in every case that I've tried recently.

@ntustison
Copy link
Member

Ah, that's the issue. I'm guessing this is a recent change.

> i1 = layer_input( list(NULL,NULL,2) )
> i2 = layer_input( list(NULL,NULL,2) )
> i3 = i1 * 0.5 + i2 * 0.5
Error in i1 * 0.5 : non-numeric argument to binary operator

@ntustison
Copy link
Member

What keras/tensorflow?

> sessionInfo()
tensorflow_2.2.0   
keras_2.3.0.0.9000

@stnava
Copy link
Member

stnava commented Mar 30, 2021

[1] keras_2.3.0.0 tensorflow_2.2.0

@stnava
Copy link
Member

stnava commented Mar 30, 2021

but also R version 4.0.2 (2020-06-22)

@ntustison
Copy link
Member

Hmmm, interesting. R version 4.0.3 (2020-10-10)

I'll have to see if it runs on my other machine.

@stnava
Copy link
Member

stnava commented Mar 30, 2021

d343f6f

might be more generally consistent with tf

@jlhanson5
Copy link

Hello all,

I was potentially running into some similar/connected issues...

A follow-up question (to maybe troubleshoot)... what library version (of keras and tensorflow) is this code predicated on? Has anyone just tried to install older versions of those packages to see if this cured the issue? (As I'm presuming that the whole brainAgeR function isn't going to be recoded, etc.).

If someone pings me with this info, I can try to see if rolling back/installing older library versions fixes things...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants