KennthShang / PhaGCN2.0

26 stars 10 forks source link

Command 'cat pred/* > final_prediction.csv' returned non-zero exit status 1. #2

Closed ZhengXiaoxuan11542 closed 1 year ago

ZhengXiaoxuan11542 commented 1 year ago

Hello, thank you for sharing this software. I am planning to use it to complete the new virus classification for ICTV. However, I have a bug when it was run on my server using the contig.fa provided with the software:

---------------------------Generating Knowledge graph--------------------------- Error: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library. Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it. cat: pred/*: No such file or directory folder input exist... cleaning dictionary folder pred exist... cleaning dictionary folder Split_files exist... cleaning dictionary folder network exist... cleaning dictionary Dictionary cleaned Creating Diamond database... Running Diamond... GCN Error for file contig_0 Traceback (most recent call last): File "run_Speed_up.py", line 129, in <module> out = subprocess.check_call(cmd, shell=True) File "/public/home/xiaoxuan/miniconda3/envs/phagcn2/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'cat pred/* > final_prediction.csv' returned non-zero exit status 1.

How should I fix this bug?

Looking forward to your reply. Xiaoxuan

感谢孙老师和姜老师对这款软件的分享!期待二位老师的回复!

Song-Yutong commented 1 year ago

I had the same problem with "mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library.", and type "export MKL_SERVICE_FORCE_INTEL=1 "before runing run_Speed_up.py, but still didn't work.

KennthShang commented 1 year ago

Hey guys,

This is a system error.

One easy way to fix this is to revise the header in run_GCN.py as below:

import  numpy as np
from    data import load_data, preprocess_features, preprocess_adj, sample_mask
import  model
from    config import  args
from    utils import masked_loss, masked_acc
import  pickle as pkl
import  scipy.sparse as sp
import  torch
from    torch import nn
from    torch import optim
from    torch.nn import functional as F

Or you can download the latest run_GCN.py. I have updated them accordingly.

Best, Jiayu

Song-Yutong commented 1 year ago

Now I can run PhaGCN2 successfully, thank you.

KennthShang commented 1 year ago

Good to know.

ZhengXiaoxuan11542 commented 1 year ago

It works now! Thank you !