I converted my py
code to c
with cython
, and I compiled to a executable application in ubuntu
environment as below:
cython mmd_ai_release.py --embed
gcc `python3.7-config --cflags --ldflags` mmd_ai_release.c -o ai_module -v -I /usr/include/python3.7/ -L /usr/lib/python3.7 -lpython3.7
I can get the executable software, and I can run it successfully, but the application was invoked many times in one call as below, I cannot make sure who called it, and how to prevent the wrong invoking. Anyone can help me for it?
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9970 xx 20 0 2949576 706176 125276 R 80.8 1.1 0:02.44 ai_module
9991 xx 20 0 2316072 211048 112616 R 53.0 0.3 0:01.60 ai_module
The print info in the Terminal is as below:
usage: ai_module [-h] [--input INPUT_FILEPATH] [--label LABEL_FILE] [--output OUTPUT_FILEPATH]
ai_module: error: unrecognized arguments: -c from multiprocessing.semaphore_tracker import main;main(5)
usage: ai_module [-h] [--input INPUT_FILEPATH] [--label LABEL_FILE] [--output OUTPUT_FILEPATH]
ai_module: error: unrecognized arguments: -c from multiprocessing.semaphore_tracker import main;main(4)
usage: ai_module [-h] [--input INPUT_FILEPATH] [--label LABEL_FILE] [--output OUTPUT_FILEPATH]