Repository: mlcommons/inference
Issue: GCC error with 'Getting Started' | 'run_and_time.sh'
Root cause: Environment Incompatibility

Which benchmark is the easiest to get up and running?
I tried the Jupyter Notebook and manually downloading models and datasets to try 'run_and_time.sh' but I keep running into this issue. I have tried this on three different environments/machines. 

`[classification_and_detection]# ./run_and_time.sh onnxruntime mobilenet cpu --accuracy
`
`./run_and_time.sh tf mobilenet gpu`

```
[classification_and_detection]# git branch
  master
* r0.7
```

```
building 'mlperf_loadgen' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/bindings
creating build/temp.linux-x86_64-3.7/generated
gcc -pthread -B /opt/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++14 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/opt/an
aconda3/include/python3.7m -c issue_query_controller.cc -o build/temp.linux-x86_64-3.7/issue_query_controller.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++14 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/opt/an
aconda3/include/python3.7m -c loadgen.cc -o build/temp.linux-x86_64-3.7/loadgen.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++14 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/opt/an
aconda3/include/python3.7m -c logging.cc -o build/temp.linux-x86_64-3.7/logging.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++14 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/opt/an
aconda3/include/python3.7m -c test_settings_internal.cc -o build/temp.linux-x86_64-3.7/test_settings_internal.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++14 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/opt/an
aconda3/include/python3.7m -c utils.cc -o build/temp.linux-x86_64-3.7/utils.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++14 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/opt/an
aconda3/include/python3.7m -c version.cc -o build/temp.linux-x86_64-3.7/version.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++14 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/opt/an
aconda3/include/python3.7m -c bindings/python_api.cc -o build/temp.linux-x86_64-3.7/bindings/python_api.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
bindings/python_api.cc:26:33: fatal error: pybind11/functional.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
The command '/bin/sh -c cd /tmp &&     git clone https://github.com/mlperf/inference &&     cd inference/loadgen &&     pip install pybind11 &&     CFLAGS="-std=c++14" python setup.py install &&     rm -rf mlper
f' returned a non-zero code: 1
Unable to find image 'mlperf-infer-imgclassify-cpu:latest' locally
Trying to pull repository registry.access.redhat.com/mlperf-infer-imgclassify-cpu ...
Trying to pull repository registry.redhat.io/mlperf-infer-imgclassify-cpu ...
Trying to pull repository docker.io/library/mlperf-infer-imgclassify-cpu ...
Trying to pull repository docker.io/library/mlperf-infer-imgclassify-cpu ...
/usr/bin/docker-current: repository docker.io/mlperf-infer-imgclassify-cpu not found: does not exist or no pull access.
See '/usr/bin/docker-current run --help'.
```

> `bindings/python_api.cc:26:33: fatal error: pybind11/functional.h: No such file or directory`

Could you try `git submodule update --init --recursive` to pull all the submodules?

I'm still getting the same error message after running: `git submodule update --init --recursive`

Also, I love your profile picture. 

In terms of which benchmark is the easiest to run, I would recommend BERT: https://github.com/mlcommons/inference/tree/master/language/bert

> I'm still getting the same error message after running: git submodule update --init --recursive

Could you make sure `inference/third_party/pybind/include/pybind11/functional.h` exist? Or try these commands instead: https://github.com/mlcommons/inference/blob/master/language/bert/Dockerfile#L20

The file exists. I'll try the other commands. 

```
[root@cent7-vm inference]# find . -name functional.h
./third_party/pybind/include/pybind11/functional.h
```

The MLCommons CLA link goes to a 404 page. 

https://github.com/mlcommons/inference/pull/794

CentOS 7:
Adding the follwing helped to setup loadgen. 
`pip3 install absl-py`
`export CFLAGS='-std=c++14'`

`Finished processing dependencies for mlperf-loadgen==0.5a0`

'run_and_time.sh' is still running into the same issues for me. 

Tried 'GettingStarted.ipynb' again after 'git submodule update --init --recursive ' on my Ubuntu system:
`docker: Error response from daemon: pull access denied for mlperf-infer-imgclassify-cpu, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.`
I'm getting the same error message here as well. 

`make setup: initialize submodule, download datasets, and download models.`

I added the following and 'make setup' is running now. 
```
Ubuntu:
pip3 install absl-py
apt-get install cmake
apt-get install protobuf-compiler. 
```

Interesting, I couldn't run 'make setup' in '/inference/language/bert/' for my 'CentOS' system but I was able to in my 'Ubuntu' system.

`[+] Building 1211.5s (8/8) FINISHED `
BERT built fine on Ubuntu. 

I'll reattempt the steps on the CentOS machine. 

Which benchmark is easy to get working on CPU?
The BERT benchmark only works with GPU correct?
If so, which one is the next easy benchmark to get up and running without a GPU?

speech_recognition was easy to use after setting up the conda environment.