From 06c805955d6d59fdc5fa72d6c41722362c4da8c8 Mon Sep 17 00:00:00 2001 From: Yohan Chatelain Date: Wed, 23 Jun 2021 15:06:13 -0400 Subject: [PATCH] New release v0.5.0 (#37) * New release v0.5.0 - Use verificarlo:v0.5.0 instead of v0.4.1 - Fix issue #34 on vectorized instructions with numpy - Add CHANGELOG - Add verificarlo_version as parameter in Dockerfile files * Add conservative mode in libmath --- .github/workflows/build-fuzzy.yml | 36 +++++++------ CHANGELOG | 23 ++++++++ .../Dockerfile.ubuntu20.04-0-lapack-libmath | 21 ++++---- docker/base/Dockerfile.ubuntu20.04-1-python | 16 +++++- docker/base/Dockerfile.ubuntu20.04-2-numpy | 23 ++++++-- docker/base/Dockerfile.ubuntu20.04-3-scipy | 15 +++++- docker/base/Dockerfile.ubuntu20.04-4-sklearn | 16 +++++- docker/resources/libmath/Makefile | 6 ++- docker/resources/verificarlo.patch | 53 ++++++++++++++----- docker/resources/vfcwrapper.patch | 53 ------------------- 10 files changed, 157 insertions(+), 105 deletions(-) create mode 100644 CHANGELOG delete mode 100644 docker/resources/vfcwrapper.patch diff --git a/.github/workflows/build-fuzzy.yml b/.github/workflows/build-fuzzy.yml index 618c5b9..95680ad 100644 --- a/.github/workflows/build-fuzzy.yml +++ b/.github/workflows/build-fuzzy.yml @@ -1,3 +1,4 @@ +--- name: Build Fuzzy Environments on: @@ -17,32 +18,32 @@ jobs: include: - NAME: Lapack + Libmath DOCKER_FROM: "" - DOCKER_TO: fuzzy_v0.4.1-lapack - DOCKER_IMAGE: verificarlo/fuzzy:v0.4.1-lapack + DOCKER_TO: fuzzy_v0.5.0-lapack + DOCKER_IMAGE: verificarlo/fuzzy:v0.5.0-lapack DOCKER_FILE: ./docker/base/Dockerfile.ubuntu20.04-0-lapack-libmath - NAME: Python - DOCKER_FROM: fuzzy_v0.4.1-lapack - DOCKER_TO: fuzzy_v0.4.1-lapack-python3.8.5 - DOCKER_IMAGE: verificarlo/fuzzy:v0.4.1-lapack-python3.8.5 + DOCKER_FROM: fuzzy_v0.5.0-lapack + DOCKER_TO: fuzzy_v0.5.0-lapack-python3.8.5 + DOCKER_IMAGE: verificarlo/fuzzy:v0.5.0-lapack-python3.8.5 DOCKER_FILE: ./docker/base/Dockerfile.ubuntu20.04-1-python - NAME: Numpy - DOCKER_FROM: fuzzy_v0.4.1-lapack-python3.8.5 - DOCKER_TO: fuzzy_v0.4.1-lapack-python3.8.5-numpy - DOCKER_IMAGE: verificarlo/fuzzy:v0.4.1-lapack-python3.8.5-numpy + DOCKER_FROM: fuzzy_v0.5.0-lapack-python3.8.5 + DOCKER_TO: fuzzy_v0.5.0-lapack-python3.8.5-numpy + DOCKER_IMAGE: verificarlo/fuzzy:v0.5.0-lapack-python3.8.5-numpy DOCKER_FILE: ./docker/base/Dockerfile.ubuntu20.04-2-numpy - NAME: Scipy - DOCKER_FROM: fuzzy_v0.4.1-lapack-python3.8.5-numpy - DOCKER_TO: fuzzy_v0.4.1-lapack-python3.8.5-numpy-scipy - DOCKER_IMAGE: verificarlo/fuzzy:v0.4.1-lapack-python3.8.5-numpy-scipy + DOCKER_FROM: fuzzy_v0.5.0-lapack-python3.8.5-numpy + DOCKER_TO: fuzzy_v0.5.0-lapack-python3.8.5-numpy-scipy + DOCKER_IMAGE: verificarlo/fuzzy:v0.5.0-lapack-python3.8.5-numpy-scipy DOCKER_FILE: ./docker/base/Dockerfile.ubuntu20.04-3-scipy - NAME: Scikit-Learn - DOCKER_FROM: fuzzy_v0.4.1-lapack-python3.8.5-numpy-scipy - DOCKER_TO: fuzzy_v0.4.1-lapack-python3.8.5-numpy-scipy-sklearn - DOCKER_IMAGE: verificarlo/fuzzy:v0.4.1-lapack-python3.8.5-numpy-scipy-sklearn + DOCKER_FROM: fuzzy_v0.5.0-lapack-python3.8.5-numpy-scipy + DOCKER_TO: fuzzy_v0.5.0-lapack-python3.8.5-numpy-scipy-sklearn + DOCKER_IMAGE: verificarlo/fuzzy:v0.5.0-lapack-python3.8.5-numpy-scipy-sklearn DOCKER_FILE: ./docker/base/Dockerfile.ubuntu20.04-4-sklearn name: ${{ matrix.NAME }} @@ -94,7 +95,8 @@ jobs: fi docker build ./ -t ${{ matrix.DOCKER_IMAGE }} \ - -f ${{ matrix.DOCKER_FILE }} + -f ${{ matrix.DOCKER_FILE }} \ + --build-arg VERIFICARLO_VERSION=v0.5.0 docker save ${{ matrix.DOCKER_IMAGE }} -o /tmp/${{ matrix.DOCKER_TO }}.tar @@ -115,9 +117,9 @@ jobs: runs-on: ubuntu-20.04 env: RUN_IF_CHANGED: docker - DOCKER_FROM: fuzzy_v0.4.1-lapack-python3.8.5-numpy-scipy-sklearn + DOCKER_FROM: fuzzy_v0.5.0-lapack-python3.8.5-numpy-scipy-sklearn DOCKER_IMAGE: verificarlo/fuzzy - DOCKER_FROM_TAG: v0.4.1-lapack-python3.8.5-numpy-scipy-sklearn + DOCKER_FROM_TAG: v0.5.0-lapack-python3.8.5-numpy-scipy-sklearn steps: - name: Checkout repository diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..aa1a35b --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,23 @@ +# [v0.5.0] 2021/06/18 + +## Changed + * Changed verificarlo version to compile fuzzy images [v0.4.1 -> v0.5.0] + +## Deprecated + * Version v0.4.1 should not be used anymore because it contains a bug + on vectorized instructions. + +# [v0.4.1] 2021/06/18 + +## Added + * Add build script to wrap an existing docker image with the fuzzy-libmath + * Add dockerfile for base3 + sklearn:0.23.2 (base 4) + * Add dockerfile for base2 + scipy:1.5.4 (base 3) + * Add dockerfile for base1 + numpy:1.19.1 (base 2) + * Add dockerfile for base0 + python:3.8.5 (base 1) + * Add dockerfile for fuzzy lapack:3.9.0 + libmath (base 0) + * Add fuzzy libmath project from https://github.com/big-data-lab-team/MCA-libmath + +# [v0] 2021/05/12 + + This release is merely being issued such that the project can begin indexing on Zenodo, and a DOI can be referenced for this project. \ No newline at end of file diff --git a/docker/base/Dockerfile.ubuntu20.04-0-lapack-libmath b/docker/base/Dockerfile.ubuntu20.04-0-lapack-libmath index 7d7298c..15b59dc 100644 --- a/docker/base/Dockerfile.ubuntu20.04-0-lapack-libmath +++ b/docker/base/Dockerfile.ubuntu20.04-0-lapack-libmath @@ -1,4 +1,8 @@ -FROM verificarlo/verificarlo:v0.4.1 +ARG VERIFICARLO_VERSION=v0.5.0 +FROM verificarlo/verificarlo:${VERIFICARLO_VERSION} + +RUN cat /proc/cpuinfo | grep flags | uniq +RUN cat /proc/cpuinfo | grep "model name" | uniq # Setup build dependencies RUN apt-get update -qqq &&\ @@ -12,13 +16,8 @@ RUN apt-get update -qqq &&\ # Copy verificarlo's exclusion file for Python 3 COPY docker/resources/python-vfc-exclude.txt /tmp/python-vfc-exclude.txt - -# Copy and apply verificarlo patch for adding VFC_BACKENDS_FROM_FILE option -# Could be removed when verificarlo-v0.4.2 will be available COPY docker/resources/verificarlo.patch /tmp/verificarlo.patch -COPY docker/resources/vfcwrapper.patch /tmp/vfcwrapper.patch RUN patch $(which verificarlo) /tmp/verificarlo.patch -RUN patch /usr/local/include/vfcwrapper.c /tmp/vfcwrapper.patch # Setting compilers and linkers to use verificarlo ENV CC "verificarlo-c" @@ -33,7 +32,7 @@ RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE # Create instrumented shared mathematical library COPY docker/resources/libmath/ /opt/mca-libmath/ RUN cd /opt/mca-libmath/ &&\ - make &&\ + make CONSERVATIVE=True &&\ make test @@ -52,20 +51,20 @@ RUN cd /opt/build/ &&\ mkdir build &&\ cd /opt/build/lapack-3.9.0/build &&\ cmake FC=verificarlo-f -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_COMPILER=verificarlo-c -DCMAKE_Fortran_COMPILER=verificarlo-f \ - -DCBLAS=ON -DBUILD_SHARED_LIBS=ON .. &&\ + -DCBLAS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="--conservative" -DCMAKE_Fortran_FLAGS="--conservative" .. &&\ make &&\ make install # Remove temporary files RUN rm -rf /opt/build/* -# Preloading the instrumented shared library -ENV LD_PRELOAD="/opt/mca-libmath/libmath.so:/usr/local/lib/libblas.so:/usr/local/lib/libcblas.so" - # Restore default behavior for verificarlo's CC ENV CC "verificarlo-c" ENV VFC_BACKENDS_SILENT_LOAD="True" RUN echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE +# Preloading the instrumented shared library +ENV LD_PRELOAD="/opt/mca-libmath/libmath.so:/usr/local/lib/libblas.so:/usr/local/lib/libcblas.so" + # Set bash shell as entrypoint ENTRYPOINT [ "/bin/bash"] diff --git a/docker/base/Dockerfile.ubuntu20.04-1-python b/docker/base/Dockerfile.ubuntu20.04-1-python index 4903d9d..54478f0 100644 --- a/docker/base/Dockerfile.ubuntu20.04-1-python +++ b/docker/base/Dockerfile.ubuntu20.04-1-python @@ -1,4 +1,14 @@ -FROM verificarlo/fuzzy:v0.4.1-lapack +ARG VERIFICARLO_VERSION=v0.5.0 +FROM verificarlo/fuzzy:${VERIFICARLO_VERSION}-lapack + +RUN cat /proc/cpuinfo | grep flags | uniq +RUN cat /proc/cpuinfo | grep "model name" | uniq + + +# Unset LD_PRELOAD because it will open VFC_BACKENDS_FROM_FILE +# and causes bug +RUN LD_PRELOAD_OLD=${LD_PRELOAD} +ENV LD_PRELOAD="" # Use IEEE mode for compiling with verificarlo RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE @@ -11,7 +21,7 @@ RUN cd /opt/build/ && \ wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz && \ tar xvf Python-3.8.5.tgz && \ cd Python-3.8.5 && \ - CFLAGS="--exclude-file=/tmp/python-vfc-exclude.txt" ./configure --enable-optimizations --with-ensurepip=install &&\ + CFLAGS="--exclude-file=/tmp/python-vfc-exclude.txt --conservative" ./configure --enable-optimizations --with-ensurepip=install &&\ make -j &&\ make install &&\ wget https://bootstrap.pypa.io/get-pip.py &&\ @@ -23,5 +33,7 @@ RUN rm -rf /opt/build/* # Restore default MCA mode RUN echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE +ENV LD_PRELOAD=${LD_PRELOAD_OLD} + # Set entrypoint ENTRYPOINT [ "/bin/bash"] diff --git a/docker/base/Dockerfile.ubuntu20.04-2-numpy b/docker/base/Dockerfile.ubuntu20.04-2-numpy index 87d8748..88a29cf 100644 --- a/docker/base/Dockerfile.ubuntu20.04-2-numpy +++ b/docker/base/Dockerfile.ubuntu20.04-2-numpy @@ -1,4 +1,14 @@ -FROM verificarlo/fuzzy:v0.4.1-lapack-python3.8.5 +ARG VERIFICARLO_VERSION=v0.5.0 +FROM verificarlo/fuzzy:${VERIFICARLO_VERSION}-lapack-python3.8.5 + +RUN cat /proc/cpuinfo | grep flags | uniq +RUN cat /proc/cpuinfo | grep "model name" | uniq + + +# Unset LD_PRELOAD because it will open VFC_BACKENDS_FROM_FILE +# and causes bug +RUN LD_PRELOAD_OLD=${LD_PRELOAD} +ENV LD_PRELOAD="" # Use IEEE mode for compiling with verificarlo RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE @@ -11,22 +21,29 @@ RUN git config --global user.email "fake@mail.com" &&\ git config --global user.name "Anonymous Patcher" # Build numpy from sources and link with the local BLAS and LAPACK -RUN pip3.8 install cython +RUN python3 -m pip install cython RUN cd /opt/build &&\ git clone -b v1.19.1 --depth=1 https://github.com/numpy/numpy.git &&\ cd /opt/build/numpy &&\ git checkout v1.19.1 &&\ git am /tmp/numpy-verificarlo.patch &&\ - CFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ + OPT="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument --conservative" \ + FOPT="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument --conservative" \ NPY_BLAS_ORDER=BLAS NPY_LAPACK_ORDER=LAPACK \ python3 setup.py config --compiler=verificarlo --fcompiler=verificarlof build_clib \ --compiler=verificarlo --fcompiler=verificarlof build_ext \ --compiler=verificarlo --fcompiler=verificarlof build -j 4 install +# Smoked test for vectorization. +# We should run the full numpy test suit in next versions +RUN python3 -c "import numpy as np; x = np.array(range(4),dtype=np.float64); z=[i**2 for i in range(4)]; assert((x**2==z).all())" + # Remove temporary files RUN rm -rf /opt/build/* # Restore default MCA mode RUN echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE +ENV LD_PRELOAD=${LD_PRELOAD_OLD} + ENTRYPOINT [ "/bin/bash"] diff --git a/docker/base/Dockerfile.ubuntu20.04-3-scipy b/docker/base/Dockerfile.ubuntu20.04-3-scipy index d46ed4b..9af7cb1 100644 --- a/docker/base/Dockerfile.ubuntu20.04-3-scipy +++ b/docker/base/Dockerfile.ubuntu20.04-3-scipy @@ -1,5 +1,14 @@ -FROM verificarlo/fuzzy:v0.4.1-lapack-python3.8.5-numpy +ARG VERIFICARLO_VERSION=v0.5.0 +FROM verificarlo/fuzzy:${VERIFICARLO_VERSION}-lapack-python3.8.5-numpy +RUN cat /proc/cpuinfo | grep flags | uniq +RUN cat /proc/cpuinfo | grep "model name" | uniq + + +# Unset LD_PRELOAD because it will open VFC_BACKENDS_FROM_FILE +# and causes bug +RUN LD_PRELOAD_OLD=${LD_PRELOAD} +ENV LD_PRELOAD="" # Load backend IEEE RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE @@ -10,7 +19,7 @@ RUN cd /opt/build/ &&\ git clone https://github.com/scipy/scipy.git &&\ cd /opt/build/scipy &&\ git checkout v1.5.4 &&\ - CFLAGS="--disable-debug-flag" FFLAGS="--disable-debug-flag" NPY_NUM_BUILD_JOBS=4 \ + CFLAGS="--conservative" FFLAGS="--conservative" NPY_NUM_BUILD_JOBS=4 \ python3 setup.py config --compiler=verificarlo --fcompiler=verificarlof build_clib \ --compiler=verificarlo --fcompiler=verificarlof build_ext \ --compiler=verificarlo --fcompiler=verificarlof build -j 4 install @@ -22,4 +31,6 @@ RUN rm -rf /opt/build/* ENV CC "verificarlo-c" RUN echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE +ENV LD_PRELOAD=${LD_PRELOAD_OLD} + ENTRYPOINT [ "/bin/bash"] diff --git a/docker/base/Dockerfile.ubuntu20.04-4-sklearn b/docker/base/Dockerfile.ubuntu20.04-4-sklearn index 47224c4..3cbead1 100644 --- a/docker/base/Dockerfile.ubuntu20.04-4-sklearn +++ b/docker/base/Dockerfile.ubuntu20.04-4-sklearn @@ -1,4 +1,14 @@ -FROM verificarlo/fuzzy:v0.4.1-lapack-python3.8.5-numpy-scipy +ARG VERIFICARLO_VERSION=v0.5.0 +FROM verificarlo/fuzzy:${VERIFICARLO_VERSION}-lapack-python3.8.5-numpy-scipy + +RUN cat /proc/cpuinfo | grep flags | uniq +RUN cat /proc/cpuinfo | grep "model name" | uniq + + +# Unset LD_PRELOAD because it will open VFC_BACKENDS_FROM_FILE +# and causes bug +RUN LD_PRELOAD_OLD=${LD_PRELOAD} +ENV LD_PRELOAD="" # Load backend IEEE RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE @@ -7,7 +17,7 @@ RUN cd /opt/build &&\ git clone https://github.com/scikit-learn/scikit-learn.git &&\ cd scikit-learn &&\ git checkout 0.23.2 &&\ - python3 setup.py build -j 4 install + CFLAGS="--conservative" python3 setup.py build -j 4 install # Remove temporary files RUN rm -rf /opt/build/* @@ -16,4 +26,6 @@ RUN rm -rf /opt/build/* ENV CC "verificarlo-c" RUN echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE +ENV LD_PRELOAD=${LD_PRELOAD_OLD} + ENTRYPOINT [ "/bin/bash"] diff --git a/docker/resources/libmath/Makefile b/docker/resources/libmath/Makefile index 8d48e81..9f9be9f 100755 --- a/docker/resources/libmath/Makefile +++ b/docker/resources/libmath/Makefile @@ -13,10 +13,14 @@ SRCS = src/wrapping_script.c # source files OBJS = $(SRCS:.c=.o) ROOT = $(PWD) +ifdef CONSERVATIVE +CFLAGS += --conservative +endif + .PHONY: tracer $(TARGET_LIB): $(OBJS) - $(CC) ${LDFLAGS} -ldl -o $@ $^ + $(CC) ${LDFLAGS} ${CFLAGS} -ldl -o $@ $^ tracer: $(CC) ${TRACER_FLAGS} ${CFLAGS} ${LDFLAGS} ${LIBS} -o ${TARGET_LIB} $(SRCS) diff --git a/docker/resources/verificarlo.patch b/docker/resources/verificarlo.patch index 5761b52..2ede252 100644 --- a/docker/resources/verificarlo.patch +++ b/docker/resources/verificarlo.patch @@ -1,20 +1,45 @@ ---- verificarlo 2020-12-17 11:27:57.074070576 -0500 -+++ /home/yohan/local/bin/verificarlo 2020-12-16 18:37:46.866142995 -0500 -@@ -294,11 +294,17 @@ +diff --git a/verificarlo.in.in b/verificarlo.in.in +index 14cd655..a9090b8 100644 +--- a/verificarlo.in.in ++++ b/verificarlo.in.in +@@ -136,7 +136,8 @@ def compile_vfcwrapper(source, output, args, emit_llvm=False): + + internal_options = (" -S -emit-llvm " if emit_llvm else "") + \ + f" -c -Wno-varargs -I {mcalib_includes} " +- shell(f'{clang} -O3 -march=native {internal_options} {extra_args} {source} -o {output} ') ++ conservative = '-march=x86-64' if args.conservative else '-march=native' ++ shell(f'{clang} -O3 {conservative} {internal_options} {extra_args} {source} -o {output} ') + + + def linker_mode(sources, options, libraries, output, args): +@@ -204,9 +205,11 @@ def compiler_mode(sources, options, output, args): + compile_only([source], ' -c ' + options, basename_output, args) + continue + ++ conservative = '-march=x86-64' if args.conservative else '' ++ + # Compile to ir (fortran uses flang, c uses clang) + shell( +- f'{compiler} -c -S {debug} {source} {include} -emit-llvm {options} -o {ir.name}') ++ f'{compiler} -c -S {debug} {source} {include} -emit-llvm {options} -o {ir.name} {conservative}') + + selectfunction = "" + if args.function: +@@ -246,7 +249,7 @@ def compiler_mode(sources, options, output, args): + basename_output = output + + # Produce object file +- shell(f'{compiler} -c {basename_output} {ins.name} {options}') ++ shell(f'{compiler} -c {basename_output} {ins.name} {options} {conservative}') + + + if __name__ == "__main__": +@@ -282,6 +285,8 @@ if __name__ == "__main__": parser.add_argument('--version', action='version', version=PACKAGE_STRING) parser.add_argument('--linker', choices=linkers.keys(), default=default_linker, help="linker to use, {dl} by default".format(dl=default_linker)) -+ parser.add_argument('--disable-debug-flag', action="store_true", -+ help="Remove -g from the flag since it can cause error with flang") ++ parser.add_argument( ++ '--conservative', action='store_true', help='conservative') args, other = parser.parse_known_args() - sources, llvm_options = parse_extra_args(other) - -+ if args.disable_debug_flag: -+ if "-g" in llvm_options: -+ llvm_options = llvm_options.replace("-g", "") -+ - # check input files - if (args.E or args.S or args.c) and len(sources) > 1 and args.o: - fail('cannot specify -o when generating multiple output files') diff --git a/docker/resources/vfcwrapper.patch b/docker/resources/vfcwrapper.patch deleted file mode 100644 index 773fb97..0000000 --- a/docker/resources/vfcwrapper.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- ./src/vfcwrapper/vfcwrapper.c 2020-12-17 11:27:56.926070979 -0500 -+++ /home/yohan/local/include/vfcwrapper.c 2020-12-16 18:37:46.526141852 -0500 -@@ -269,11 +269,40 @@ - /* Initialize the logger */ - logger_init(); - -+ /* Parse VFC_BACKENDS_FROM_FILE */ -+ char *vfc_backends_fromfile = NULL; -+ char *vfc_backends_fromfile_file = getenv("VFC_BACKENDS_FROM_FILE"); -+ if (vfc_backends_fromfile_file != NULL) { -+ FILE *fi = fopen(vfc_backends_fromfile_file, "r"); -+ if (fi == NULL) { -+ logger_error( -+ "Error while opening file pointed by VFC_BACKENDS_FROM_FILE: %s", -+ strerror(errno)); -+ } else { -+ size_t len = 0; -+ ssize_t nread; -+ nread = getline(&vfc_backends_fromfile, &len, fi); -+ if (nread == -1) { -+ logger_error( -+ "Error while reading file pointed by VFC_BACKENDS_FROM_FILE: %s", -+ strerror(errno)); -+ } else { -+ if (vfc_backends_fromfile[nread - 1] == '\n') { -+ vfc_backends_fromfile[nread - 1] = '\0'; -+ } -+ } -+ } -+ } -+ - /* Parse VFC_BACKENDS */ - char *vfc_backends = getenv("VFC_BACKENDS"); - if (vfc_backends == NULL) { -- logger_error( -- "VFC_BACKENDS is empty, at least one backend should be provided"); -+ if (vfc_backends_fromfile == NULL) { -+ logger_error( -+ "VFC_BACKENDS is empty, at least one backend should be provided"); -+ } else { -+ vfc_backends = vfc_backends_fromfile; -+ } - } - - /* Environnement variable to disable loading message */ -@@ -289,7 +318,6 @@ - char *semicolonptr; - char *token = strtok_r(vfc_backends, ";", &semicolonptr); - while (token) { -- - /* Parse each backend arguments, argv[0] is the backend name */ - int backend_argc = 0; - char *backend_argv[MAX_ARGS];