bioinfomaticsCSU / deepsignal

Detecting methylation using signal-level features from Nanopore sequencing reads
GNU General Public License v3.0
108 stars 21 forks source link

Deepsingal not running on gpu #40

Closed avitalsteiman closed 4 years ago

avitalsteiman commented 4 years ago

Hi, I'm running deepsignal with the following command: deepsignal call_mods --input_path deepSignal_NPmeT1_fast5_CpG_signalFeature.tsv --model_path deepSignalModel/model.CpG.R9.4_1D.human_hx1.bn17.sn360.v0.1.7+/bn_17.sn_360.epoch_9.ckpt --result_file deepSignal_NPmeT1_fast5.CpG.call_mods.tsv --nproc 10 --is_gpu yes

It is running (with many warnings) but for some reason rather than running on the gpu it is running on the cpu(s) and taking a very long time. I though this may be similar to issue #38 however, I checked and I am using the model for deepsignal v0.1.7 (which is what I seem to be running).

I'm pasting the warnings, below. Thank you for your help, Avital

/home/miniconda3/envs/deepsignalenv/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/miniconda3/envs/deepsignalenv/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/miniconda3/envs/deepsignalenv/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:521: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/miniconda3/envs/deepsignalenv/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:522: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /home/miniconda3/envs/deepsignalenv/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /home/miniconda3/envs/deepsignalenv/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)])

===============================================

parameters:

input_path: deepSignal_NPmeT1_fast5_CpG_signalFeature.tsv model_path: /home/bioinformatics/faige/nanopore/deepSignalModel/model.CpG.R9.4_1D.human_hx1.bn17.sn360.v0.1.7+/bn_17.sn_360.epoch_9.ckpt is_cnn: yes is_rnn: yes is_base: yes kmer_len: 17 cent_signals_len: 360 batch_size: 512 learning_rate: 0.001 class_num: 2 result_file: deepSignal_test.tsv recursively: yes corrected_group: RawGenomeCorrected_000 basecall_subgroup: BaseCalled_template reference_path: None is_dna: yes normalize_method: mad methy_label: 1 motifs: CG mod_loc: 0 f5_batch_num: 100 positions: None nproc: 10 is_gpu: yes

===============================================

write_process started.. 2020-04-03 01:02:23.840665: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA 2020-04-03 01:02:23.841327: I tensorflow/core/common_runtime/process_util.cc:63] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.

PengNi commented 4 years ago

Hi @avitalsteiman ,

What is the version of your GPU and CUDA? Maybe you can add "CUDA_VISIABLE_DEVICES=0" in front of the command like: CUDA_VISIABLE_DEVICES=0 deepsignal call_mods --input_path deepSignal_NPmeT1_fast5_CpG_signalFeature.tsv --model_path deepSignalModel/model.CpG.R9.4_1D.human_hx1.bn17.sn360.v0.1.7+/bn_17.sn_360.epoch_9.ckpt --result_file deepSignal_NPmeT1_fast5.CpG.call_mods.tsv --nproc 10 --is_gpu yes

and see what happens.

Best, Peng

avitalsteiman commented 4 years ago

Hi, Thanks for the reply. I am using NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 I installed tensorflow 1.8 (after trying with the most updated version of tensorflow, and older versions and not getting deepsignal to run at all). I tried your suggestion, it did not seem to work.

I'm getting this message:

write_process started.. 2020-04-05 11:54:31.412546: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA 2020-04-05 11:54:31.413228: I tensorflow/core/common_runtime/process_util.cc:63] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.

Could it have something to do with it?

Thank you again, Avital

On Fri, Apr 3, 2020 at 4:06 AM Peng Ni notifications@github.com wrote:

Hi @avitalsteiman https://github.com/avitalsteiman ,

What is the version of your GPU and CUDA? Maybe you can add "CUDA_VISIABLE_DEVICES=0" in front of the command like: CUDA_VISIABLE_DEVICES=0 deepsignal call_mods --input_path deepSignal_NPmeT1_fast5_CpG_signalFeature.tsv --model_path deepSignalModel/model.CpG.R9.4_1D.human_hx1.bn17.sn360.v0.1.7+/bn_17.sn_360.epoch_9.ckpt --result_file deepSignal_NPmeT1_fast5.CpG.call_mods.tsv --nproc 10 --is_gpu yes

and see what happens.

Best, Peng

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bioinfomaticsCSU/deepsignal/issues/40#issuecomment-608173459, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALD3LR5G7H6HLYSYBIZ4IHLRKUZCHANCNFSM4L267U3A .

--

PengNi commented 4 years ago

@avitalsteiman , I suggest that you install tensorflow-gpu 1.13.1 for your cuda version:

# install using conda
conda install -c anaconda tensorflow-gpu==1.13.1
# or install using pip
pip install 'tensorflow-gpu==1.13.1'

It should work.

Best, Peng

avitalsteiman commented 4 years ago

Thank you. That seems to have done the trick. Just adding that to get it to work, I had to uninstall tensorflow-gpu 1.8 and then re-install tensorflow 1.13.1 (as per your instructions).

Regards, Avital

On Sun, Apr 5, 2020 at 2:30 PM Peng Ni notifications@github.com wrote:

@avitalsteiman https://github.com/avitalsteiman , I suggest that you install tensorflow-gpu 1.13.1 for your cuda version:

install using conda

conda install -c anaconda tensorflow-gpu==1.13.1

or install using pip

pip install 'tensorflow-gpu==1.13.1'

It should work.

Best, Peng

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bioinfomaticsCSU/deepsignal/issues/40#issuecomment-609401719, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALD3LRZP2YEJEPYTXO37SRTRLBTV7ANCNFSM4L267U3A .

--