c++ - Grid engine cluster + OpenCV: strange behaviour -
i'm using grid engine cluster running opencv code. code runs when executed locally, when submitted grid it's not working. extracted here minimal example.
in directory ~/code/
have file test.cpp
containing next code:
#include <opencv2/core.hpp> #include <iterator> #include <string> #include <sys/types.h> #include <sys/stat.h> using namespace cv; using namespace std; int main(int ac, char** av) { /// create random matrix mat m; /// create subfolder string foldername = "sub/"; mkdir(foldername.c_str(),0777); homecoming 0; }
the code compiled without errors.
when executing locally, i.e.
username@machine:~/code$ ./test
it creates subfolder, i.e. ~/code/sub
, expected.
for submitting grid, created job script job.sh
in home directory (i.e. ~/job.sh
) containing
cd code/ ./test
and submit using
qsub job.sh
nothing happened. (and no errors).
however, when removed line
mat m;
it did create folder expected.
what possible reasons behaviour? i'm thinking of shared libs of opencv weren't installed in other computers of grid, i'm not sure , don't know how verify that.
thank in advance suggestions.
the libraries need accessible execution nodes in queue want submit job to. if execution nodes have access shared location, such nfs mount, can install libraries there. otherwise, need install required libs on execution nodes. additional link regarding set_lib_path:
blogs.oracle.com/templedf/entry/inheriting_job_environment
while help point right location, libraries still need accessible
c++ opencv cluster-computing sungridengine
No comments:
Post a Comment