Closed HenryLeongStat closed 6 years ago
I am not sure whether it is the reason for the error in association test.
In addition to removing "ENV_INCLUDE_DIRS" and "ENV_LIBRARY_DIRS" from
ext_modules+=cythonize([Extension('variant_tools.io_vcf_read',
sources=['src/variant_tools/io_vcf_read.pyx'],
include_dirs=[np.get_include()],
library_dirs = ["build"])])
I need to remove "ENV_INCLUDE_DIRS" and "ENV_LIBRARY_DIRS" from
Extension('variant_tools._assoTests',
sources = [ASSO_WRAPPER_CPP_FILE] + ASSOC_FILES,
extra_compile_args = gccargs,
libraries = libs + ['gsl', 'stat'], #, 'blas'],
# library_dirs = ["build"] + ENV_LIBRARY_DIRS,
library_dirs = ["build"],
# include_dirs = ["src", "src/variant_tools", "src/gsl"] + ENV_INCLUDE_DIRS,
include_dirs = ["src", "src/variant_tools", "src/gsl"],
)
as well, to make it compile on my local desktop.
Let me try that on my end.
Same error after I remove "ENV_INCLUDE_DIRS" and "ENV_LIBRARY_DIRS" from
Extension('variant_tools._assoTests',
sources = [ASSO_WRAPPER_CPP_FILE] + ASSOC_FILES,
extra_compile_args = gccargs,
libraries = libs + ['gsl', 'stat'], #, 'blas'],
library_dirs = ["build"],
include_dirs = ["src", "src/variant_tools", "src/gsl"],
)
]
Error messages:
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg
removing '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg' (and everything under it)
error removing /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg: [Errno 16] Device or resource busy: '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools/.nfs00000002054938b000000026'
error removing /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg: [Errno 16] Device or resource busy: '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools/.nfs00000002054938a700000024'
error removing /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg: [Errno 16] Device or resource busy: '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools/.nfs00000002054938a000000022'
error removing /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg: [Errno 16] Device or resource busy: '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools/.nfs000000020553350600000023'
error removing /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg: [Errno 16] Device or resource busy: '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools/.nfs00000002054938ae00000025'
error removing /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg: [Errno 16] Device or resource busy: '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools/.nfs000000020553350e00000027'
error removing /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg: [Errno 39] Directory not empty: '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools'
error removing /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg: [Errno 39] Directory not empty: '/home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg'
Extracting variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg to /home/mleong/anaconda3/lib/python3.6/site-packages
variant-tools 3.0.0.dev0 is already the active version in easy-install.pth
Installing vtools script to /home/mleong/anaconda3/bin
Installing vtools_report script to /home/mleong/anaconda3/bin
Not sure what are those .nfsxxxxxxxxxxxxxxx
files...
It seems like a mounting
issue? Let me try to unmount them and then delete them...
Ref : stackexchange
Can't even umount them:
mleong@q1prpfs04:~/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools$ umount .
umount: /home/mleong/anaconda3/lib/python3.6/site-packages/variant_tools-3.0.0.dev0-py3.6-linux-x86_64.egg/variant_tools: umount failed: Operation not permitted
Removed those .nfs
files and complied successfully!
I tried to keep "ENV_INCLUDE_DIRS" and "ENV_LIBRARY_DIRS" from:
Extension('variant_tools._assoTests',
sources = [ASSO_WRAPPER_CPP_FILE] + ASSOC_FILES,
extra_compile_args = gccargs,
libraries = libs + ['gsl', 'stat'], #, 'blas'],
library_dirs = ["build"] + ENV_LIBRARY_DIRS,
include_dirs = [".", "variant_tools", "gsl"] + ENV_INCLUDE_DIRS,
)
]
and compile again on Linux. It still works...
To make it compile on the server running gitlab-ci, I have to remove ENV_INCLUDE_DIRS and ENV_LIBRARY_DIRS:
# ENV_INCLUDE_DIRS = os.environ.get('LD_INCLUDE_PATH', '').split(os.pathsep)
# ENV_LIBRARY_DIRS = os.environ.get('LD_LIBRARY_PATH', '').split(os.pathsep)
ENV_INCLUDE_DIRS = []
ENV_LIBRARY_DIRS = []
Not sure why because if LD_INCLUDE_PATH
is undefined, ENV_INCLUDE_DIRS
should be empty anyway. What is the output of
echo $ENV_INCLUDE_PATH
on gitlab-ci
?
There is no output. There is error if ENV_INCLUDE_DIRS is ['']. SoI changed it to [] .
ENV_INCLUDE_DIRS = os.environ.get('LD_INCLUDE_PATH', '').split(os.pathsep)
ENV_LIBRARY_DIRS = os.environ.get('LD_LIBRARY_PATH', '').split(os.pathsep)
if ENV_INCLUDE_DIRS[0]=='' or ENV_LIBRARY_DIRS[0]=='':
ENV_INCLUDE_DIRS=[]
ENV_LIBRARY_DIRS=[]
I see, then the code should be something like
ENV_INCLUDE_DIRS = [x for x in os.environ.get('LD_INCLUDE_PATH', '').split(os.pathsep) if x]
error only happens on Linux server...
seems like the problem is causing by those
.nfsxxxxxxxxxxxxxxx
files, cannot delete any of them even on command line...