Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Makefile:123 OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target #983

Closed
typxxi opened this issue Oct 14, 2016 · 17 comments · Fixed by #982

Comments

@typxxi
Copy link

typxxi commented Oct 14, 2016

I have a up to date WIN 10 system with
VM Player 12 running on an INTEL 4 CORE CPU N3520

With both iso of ubuntu 12 and mint 18 I got that sam ERROR 123 while installing torch 7 ....

First I thougt it was a torch problem and in the torch readme was nothing to be found about 123 error

Then I found a reference here in the issues with a solution using the version 0.2.9.rc2

But that regards a mac pro problem and I have windows 10 and Intel CPU.
Tested it on 2 machines with both ISO Files.

How can I set that CPU Target to what value?

Thanks a lot

@martin-frbg
Copy link
Collaborator

N3520 appears to belong to the "Bay Trail" core series of "ATOM" type CPU, so please try building with "make TARGET=ATOM".
If you could post the output of "cat /proc/cpuinfo" from your VM (or at least the "cpu family" and "model" numbers from it) the relevant data could be added to the cpu detection code of the OpenBLAS build system. (Though with a VM it is also possible that the virtual machine does not receive all cpu features of the actual hardware, which might mislead the build system even if it "knows" that type of cpu already)

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

sorry, had a problem cause first I thought that "cat/proc/cpuinfo" would mean a path I could not find but than I copied the string and while inserting I recogniced the "SPACE" and that this is a COMMAND

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 55
model name : Intel(R) Pentium(R) CPU N3520 @ 2.16GHz
stepping : 3
microcode : 0x320
cpu MHz : 2166.663
cache size : 1024 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer rdrand hypervisor lahf_lm 3dnowprefetch epb tsc_adjust smep dtherm ida arat
bugs :
bogomips : 4333.32
clflush size : 64
cache_alignment : 64
address sizes : 42 bits physical, 48 bits virtual
power management:

Sorry, but I am completly "Linux" blind / newbie and I just can imagine that your
"make TARGET=ATOM"
should be a parameter , but I am just aware of what I have to do to install torch7 by this

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh

I think the error occured by the last step so it might be necessary to change the last script / batchfile install.sh

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

Here is what I found in the torch install.sh regarding openblas

*if [[ uname == 'Linux' ]]; then
export CMAKE_LIBRARY_PATH=/opt/OpenBLAS/include:/opt/OpenBLAS/lib:$CMAKE_LI$
fi
export CMAKE_PREFIX_PATH=$PREFIX
*

That maybe environment variable $prefix is a few line later used here with a make command

cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE=Release -DWITH$$
(make 2>&1 >>$PREFIX/install.log || exit 1) && (make install 2>&1 >>$PREFIX/in$_

I hope that might help to find a workaround.

I just want to try to cholorize 100 year old photographs with this
https://github.com/satoshiiizuka/siggraph2016_colorization

and therefore I learned to install vmware player,
download ubuntu ISO and after first failure mint
install git
and then to install torch and more dependencies
and that OPENBAS is a part of torch installation

only to finally start torch and siggraph to get colored pics from the world exhibition chicago 1892

Long journey till now - at least for me

Thanks

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

NO, it happened earlier while executing

bash install-deps

#!/usr/bin/env bash
set -e

######################################################################
# This script installs required dependencies for Torch7
######################################################################
{

install_openblas() {
    # Get and build OpenBlas (Torch is much better with a decent Blas)
    cd /tmp/
    rm -rf OpenBLAS
    git clone https://github.com/xianyi/OpenBLAS.git
    cd OpenBLAS
    if [ $(getconf _NPROCESSORS_ONLN) == 1 ]; then
        make NO_AFFINITY=1 USE_OPENMP=0 USE_THREAD=0
    else
        make NO_AFFINITY=1 USE_OPENMP=1
    fi
    RET=$?;
    if [ $RET -ne 0 ]; then
        echo "Error. OpenBLAS could not be compiled";
        exit $RET;
    fi
    sudo make install
    RET=$?;
    if [ $RET -ne 0 ]; then
        echo "Error. OpenBLAS could not be installed";
        exit $RET;
    fi
}

install_openblas_AUR() {
    # build and install an OpenBLAS package for Archlinux
    cd /tmp && \
    curl https://aur.archlinux.org/cgit/aur.git/snapshot/openblas-lapack.tar.gz | tar zxf - && \
    cd openblas-lapack
    makepkg -csi --noconfirm
    RET=$?;
    if [ $RET -ne 0 ]; then
        echo "Error. OpenBLAS could not be installed";
        exit $RET;
    fi
}

checkupdates_archlinux() {
    # checks if archlinux is up to date
    if [[ -n $(checkupdates) ]]; then
        echo "It seems that your system is not up to date."
        echo "It is recommended to update your system before going any further."
        read -p "Continue installation ? [y/N] " yn
            case $yn in
                Y|y ) echo "Continuing...";;
                * ) echo "Installation aborted."
                    echo "Relaunch this script after updating your system with 'pacman -Syu'."
                    exit 0
            esac
    fi
}

# Based on Platform:
if [[ `uname` == 'Darwin' ]]; then
    # GCC?
    if [[ `which gcc` == '' ]]; then
        echo "MacOS doesn't come with GCC: please install XCode and the command line tools."
        exit 1
    fi

    # Install Homebrew (pkg manager):
    if [[ `which brew` == '' ]]; then
        ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    fi

    # Install dependencies:
    brew update
    brew install git readline cmake wget qt
    brew install libjpeg imagemagick zeromq graphicsmagick openssl
    brew link readline --force
    brew cask install xquartz
    brew list -1 | grep -q "^gnuplot\$" && brew remove gnuplot
    brew install gnuplot --with-wxmac --with-cairo --with-pdflib-lite --with-x11 --without-lua

elif [[ "$(uname)" == 'Linux' ]]; then

    if [[ -r /etc/os-release ]]; then
        # this will get the required information without dirtying any env state
        DIST_VERS="$( ( . /etc/os-release &>/dev/null
                        echo "$ID $VERSION_ID") )"
        DISTRO="${DIST_VERS%% *}" # get our distro name
        VERSION="${DIST_VERS##* }" # get our version number
    elif [[ -r /etc/redhat-release ]]; then
        DIST_VERS=( $( cat /etc/redhat-release ) ) # make the file an array
        DISTRO="${DIST_VERS[0],,}" # get the first element and get lcase
        VERSION="${DIST_VERS[2]}" # get the third element (version)
    elif [[ -r /etc/lsb-release ]]; then
        DIST_VERS="$( ( . /etc/lsb-release &>/dev/null
                        echo "${DISTRIB_ID,,} $DISTRIB_RELEASE") )"
        DISTRO="${DIST_VERS%% *}" # get our distro name
        VERSION="${DIST_VERS##* }" # get our version number
    else # well, I'm out of ideas for now
        echo '==> Failed to determine distro and version.'
        exit 1
    fi

    # Detect fedora
    if [[ "$DISTRO" = "fedora" ]]; then
        distribution="fedora"
        fedora_major_version="$VERSION"
    # Detect archlinux
    elif [[ "$DISTRO" = "arch" ]]; then
        distribution="archlinux"
    # Detect Ubuntu
    elif [[ "$DISTRO" = "ubuntu" ]]; then
        export DEBIAN_FRONTEND=noninteractive
        distribution="ubuntu"
        ubuntu_major_version="${VERSION%%.*}"
    # Detect elementary OS
    elif [[ "$DISTRO" = "elementary" ]]; then
        export DEBIAN_FRONTEND=noninteractive
        distribution="elementary"
        elementary_version="${VERSION%.*}"
    # Detect CentOS
    elif [[ "$DISTRO" = "centos" ]]; then
        distribution="centos"
        centos_major_version="$VERSION"
    # Detect AWS
    elif [[ "$DISTRO" = "amzn" ]]; then
        distribution="amzn"
        amzn_major_version="$VERSION"
    elif [[ "$DISTRO" == "raspbian" ]]; then
        distribution="raspbian"
        debian_major_version="$VERSION"
    else
        echo '==> Only Ubuntu, elementary OS, Fedora, Archlinux and CentOS distributions are supported.'
        exit 1
    fi

    # Install dependencies for Torch:
    if [[ $distribution == 'ubuntu' ]]; then
        if sudo apt-get update ; then
            echo "Updated successfully."
        else
            echo "Some portion of the update is failed"
        fi
        # python-software-properties is required for apt-add-repository
        sudo apt-get install -y python-software-properties
        echo "==> Found Ubuntu version ${ubuntu_major_version}.xx"
        if [[ $ubuntu_major_version -lt '12' ]]; then
            echo '==> Ubuntu version not supported.'
            exit 1
        elif [[ $ubuntu_major_version -lt '14' ]]; then # 12.xx
            sudo -E add-apt-repository -y ppa:chris-lea/zeromq
        elif [[ $ubuntu_major_version -lt '15' ]]; then # 14.xx
        sudo -E apt-get install -y software-properties-common
            sudo -E add-apt-repository -y ppa:jtaylor/ipython
        else
            sudo apt-get install -y software-properties-common \
                libgraphicsmagick1-dev libfftw3-dev sox libsox-dev \
                libsox-fmt-all
        fi

        if sudo apt-get update ; then
            echo "Updated successfully."
        else
            echo "Some portion of the update is failed"
        fi
        sudo apt-get install -y build-essential gcc g++ curl \
            cmake libreadline-dev git-core libqt4-dev libjpeg-dev \
            libpng-dev ncurses-dev imagemagick libzmq3-dev gfortran \
            unzip gnuplot gnuplot-x11 ipython

        gcc_major_version=$(gcc --version | grep ^gcc | awk '{print $4}' | \
                            cut -c 1)
        if [[ $gcc_major_version == '5' ]]; then
            echo '==> Found GCC 5, installing GCC 4.9.'
            sudo apt-get install -y gcc-4.9 libgfortran-4.9-dev g++-4.9
        fi

        if [[ $ubuntu_major_version -lt '15' ]]; then
            sudo apt-get install libqt4-core libqt4-gui
        fi

        install_openblas || true

    elif [[ $distribution == 'raspbian' ]]; then
        echo "==> Found Raspbian version ${debian_major_version}.xx"
        if sudo apt-get update ; then
            echo "Updated successfully."
        else
            echo "Some portion of the update is failed"
        fi
        sudo apt-get install -y build-essential gcc g++ curl \
            cmake libreadline-dev git-core libqt4-dev libjpeg-dev \
            libpng-dev ncurses-dev imagemagick libzmq3-dev gfortran \
            unzip gnuplot gnuplot-x11 ipython

        install_openblas || true

    elif [[ $distribution == 'elementary' ]]; then
        declare -a target_pkgs
        target_pkgs=( build-essential gcc g++ curl \
                      cmake libreadline-dev git-core libqt4-core libqt4-gui \
                      libqt4-dev libjpeg-dev libpng-dev ncurses-dev \
                      imagemagick libzmq3-dev gfortran unzip gnuplot \
                      gnuplot-x11 ipython )
        if sudo apt-get update ; then
            echo "Updated successfully."
        else
            echo "Some portion of the update is failed"
        fi
        # python-software-properties is required for apt-add-repository
        sudo apt-get install -y python-software-properties
        if [[ $elementary_version == '0.3' ]]; then
            echo '==> Found Ubuntu version 14.xx based elementary installation, installing dependencies'
            sudo apt-get install -y software-properties-common \
                libgraphicsmagick1-dev libfftw3-dev sox libsox-dev \
                libsox-fmt-all

            sudo -E add-apt-repository -y ppa:jtaylor/ipython
        else
            sudo -E add-apt-repository -y ppa:chris-lea/zeromq
        fi
        if sudo apt-get update ; then
            echo "Updated successfully."
        else
            echo "Some portion of the update is failed"
        fi
        sudo apt-get install -y "${target_pkgs[@]}"

        install_openblas || true

    elif [[ $distribution == 'archlinux' ]]; then
        echo "Archlinux installation"
        checkupdates_archlinux
        sudo pacman -S --quiet --noconfirm --needed \
            cmake curl readline ncurses git \
            gnuplot unzip libjpeg-turbo libpng libpng \
            imagemagick graphicsmagick fftw sox zeromq \
            ipython qt4 qtwebkit || exit 1
        pacman -Sl multilib &>/dev/null
        if [[ $? -ne 0 ]]; then
            gcc_package="gcc"
        else
            gcc_package="gcc-multilib"
        fi
        sudo pacman -S --quiet --noconfirm --needed \
            ${gcc_package} gcc-fortran || exit 1
        # if openblas is not installed yet
        pacman -Qs openblas &> /dev/null
        if [[ $? -ne 0 ]]; then
            install_openblas_AUR || true
        else
            echo "OpenBLAS is already installed"
        fi

    elif [[ $distribution == 'fedora' ]]; then
        if [[ $fedora_major_version == '20' ]]; then
            sudo yum install -y cmake curl readline-devel ncurses-devel \
                                gcc-c++ gcc-gfortran git gnuplot unzip \
                                libjpeg-turbo-devel libpng-devel \
                                ImageMagick GraphicsMagick-devel fftw-devel \
                                sox-devel sox zeromq3-devel \
                                qt-devel qtwebkit-devel sox-plugins-freeworld \
                                ipython
            install_openblas || true
        elif [[ $fedora_major_version == '22' ||  $fedora_major_version == '23' ]]; then
            #using dnf - since yum has been deprecated
            #sox-plugins-freeworld is not yet available in repos for F22
            sudo dnf install -y make cmake curl readline-devel ncurses-devel \
                                gcc-c++ gcc-gfortran git gnuplot unzip \
                                libjpeg-turbo-devel libpng-devel \
                                ImageMagick GraphicsMagick-devel fftw-devel \
                                sox-devel sox qt-devel qtwebkit-devel \
                                python-ipython czmq czmq-devel
            install_openblas || true
        elif [[ $fedora_major_version == '24' ]]; then
            sudo dnf install -y make cmake curl readline-devel ncurses-devel \
                                gcc-c++ gcc-gfortran git gnuplot unzip \
                                libjpeg-turbo-devel libpng-devel \
                                ImageMagick GraphicsMagick-devel fftw-devel \
                                sox-devel sox qt-devel qtwebkit-devel \
                                python-ipython czmq czmq-devel
            install_openblas || true
        else
            echo "Only Fedora 20-24 are supported for now, aborting."
            exit 1
        fi
    elif [[ $distribution == 'centos' ]]; then
        if [[ $centos_major_version == '7' ]]; then
            sudo yum install -y epel-release # a lot of things live in EPEL
            sudo yum install -y make cmake curl readline-devel ncurses-devel \
                                gcc-c++ gcc-gfortran git gnuplot unzip \
                                libjpeg-turbo-devel libpng-devel \
                                ImageMagick GraphicsMagick-devel fftw-devel \
                                sox-devel sox zeromq3-devel \
                                qt-devel qtwebkit-devel sox-plugins-freeworld
            sudo yum install -y python-ipython
            install_openblas || true
        else
            echo "Only CentOS 7 is supported for now, aborting."
            exit 1
        fi
    elif [[ $distribution == 'amzn' ]]; then
        sudo yum install -y cmake curl readline-devel ncurses-devel \
                            gcc-c++ gcc-gfortran git gnuplot unzip \
                            libjpeg-turbo-devel libpng-devel \
                            ImageMagick GraphicsMagick-devel fftw-devel \
                            libgfortran python27-pip git openssl-devel

        #
        # These libraries are missing from amzn linux
        # sox-devel sox sox-plugins-freeworld qt-devel qtwebkit-devel
        #

        sudo yum --enablerepo=epel install -y zeromq3-devel
        sudo pip install ipython

        install_openblas || true
    fi

elif [[ "$(uname)" == 'FreeBSD' ]]; then
    pkg install ImageMagick cmake curl fftw3 git gnuplot libjpeg-turbo \
        libzmq3 ncurses openblas openssl png py27-ipython \
        py27-pip qt4-corelib qt4-gui readline unzip

else
    # Unsupported
    echo '==> platform not supported, aborting'
    exit 1
fi

ipython_exists=$(command -v ipython) || true
if [[ $ipython_exists ]]; then {
    ipython_version=$(ipython --version|cut -f1 -d'.')
    if [[ $ipython_version -lt 2 ]]; then {
        echo 'WARNING: Your ipython version is too old.  Type "ipython --version" to see this.  Should be at least version 2'
    } fi
} fi

# Done.
echo "==> Torch7's dependencies have been installed"

}

And here is the echo of that script and the way to that error

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libqt4-core is already the newest version.
libqt4-gui is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Cloning into 'OpenBLAS'...
remote: Counting objects: 22940, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 22940 (delta 3), reused 0 (delta 0), pack-reused 22926
Receiving objects: 100% (22940/22940), 17.78 MiB | 58.00 KiB/s, done.
Resolving deltas: 100% (16841/16841), done.
Checking connectivity... done.
Checking out files: 100% (8249/8249), done.
getarch_2nd.c: In function ‘main’:
getarch_2nd.c:12:35: error: ‘SGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function)
     printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
                                   ^
getarch_2nd.c:12:35: note: each undeclared identifier is reported only once for each function it appears in
getarch_2nd.c:13:35: error: ‘SGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function)
     printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
                                   ^
getarch_2nd.c:14:35: error: ‘DGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function)
     printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
                                   ^
getarch_2nd.c:15:35: error: ‘DGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function)
     printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
                                   ^
getarch_2nd.c:19:35: error: ‘CGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function)
     printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
                                   ^
getarch_2nd.c:20:35: error: ‘CGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function)
     printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
                                   ^
getarch_2nd.c:21:35: error: ‘ZGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function)
     printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
                                   ^
getarch_2nd.c:22:35: error: ‘ZGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function)
     printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
                                   ^
getarch_2nd.c:69:50: error: ‘SGEMM_DEFAULT_Q’ undeclared (first use in this function)
     printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 *  sizeof(float)));
                                                  ^
getarch_2nd.c:70:50: error: ‘DGEMM_DEFAULT_Q’ undeclared (first use in this function)
     printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 *  sizeof(double)));
                                                  ^
getarch_2nd.c:71:50: error: ‘CGEMM_DEFAULT_Q’ undeclared (first use in this function)
     printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 *  sizeof(float)));
                                                  ^
getarch_2nd.c:72:50: error: ‘ZGEMM_DEFAULT_Q’ undeclared (first use in this function)
     printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNROLL_N * 2 * 2 *  sizeof(double)));
                                                  ^
make: *** [getarch_2nd] Error 1
Makefile:123: *** OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail..  Stop.
Error. OpenBLAS could not be compiled

Hope that will help to find where I have to insert / change what.

Thanks a lot
WOLF

@martin-frbg
Copy link
Collaborator

Alright then, try adding the "TARGET=ATOM" to the end of the line
make NO_AFFINITY=1 USE_OPENMP=1
in the install_openblas() function (top of first script you posted) and rerun the whole thing...

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

Hey,

I edited the install-deps FILE here in the last line

install_openblas() {
    # Get and build OpenBlas (Torch is much better with a decent Blas)
    cd /tmp/
    rm -rf OpenBLAS
    git clone https://github.com/xianyi/OpenBLAS.git
    cd OpenBLAS
    if [ $(getconf _NPROCESSORS_ONLN) == 1 ]; then
        make NO_AFFINITY=1 USE_OPENMP=0 USE_THREAD=0
    else
#       make NO_AFFINITY=1 USE_OPENMP=1
        make NO_AFFINITY=1 USE_OPENMP=1 "TARGET=ATOM"

BUT: I still got the same error

Or do I have to remove the quotations to TARGET=ATOM?

@martin-frbg
Copy link
Collaborator

martin-frbg commented Oct 14, 2016

Yes, sorry for that - no quotation marks around the TARGET=ATOM
Also best add it to the make options in the other branch of the "if" as well, as long as we cannot be sure what the _NPROCESSORS_ONLN value is (I'd guess it to be the number of cpu cores, but if it is 1 for
the single cpu any changes in the "else" branch would be ignored).
If you still get the error after that, try with TARGET=NEHALEM

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

Sorry, even with no quotation marks I still got the same error

Just checked it line by line - error is still the same

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

In that function there is question for processors = 1

So I was wondering why I have to put that "Arguments" not into the first option

cause I remembered that the ubuntu settings in my VM Player were 1
So I looked there again under Menu
#1 PLAYER
#2 MANAGE
#3 VIRTUAL MACHINE SETTINGS

There I found
MEMORY: 2 GB
PROCESSORS: 1
.......

If I click on processor then I get more information like

Number of cores 1

I did not change anything here - it's just the ubuntu iso image I downloaded.

If TARGET=ATOM shall work in my environment doesn't the TARGET=ATOM in the 2 line here for processors = 1 ?

    if [ $(getconf _NPROCESSORS_ONLN) == 1 ]; then
        make NO_AFFINITY=1 USE_OPENMP=0 USE_THREAD=0 TARGET=ATOM
    else
#       make NO_AFFINITY=1 USE_OPENMP=1
        make NO_AFFINITY=1 USE_OPENMP=1 TARGET=ATOM

Shall I try that?
I don't want to mix things and codes... while dicussing

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

Now the system is still running but I see a lot of messages I did not see before.

Seems to me that the script is using the first line after if and not the ELSE

   if [ $(getconf _NPROCESSORS_ONLN) == 1 ]; then
        make NO_AFFINITY=1 USE_OPENMP=0 USE_THREAD=0 TARGET=ATOM

Maybe I have to move the TARGET=ATOM in the line ?

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

I canceled the previous run .
during the next run I canceled while crossing the former "error barrier"

Reading package lists... Done
Updated successfully.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-software-properties is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
==> Found Ubuntu version 14.xx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
software-properties-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
gpg: keyring `/tmp/tmpq48vptms/secring.gpg' created
gpg: keyring `/tmp/tmpq48vptms/pubring.gpg' created
gpg: requesting key 58B80F90 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpq48vptms/trustdb.gpg: trustdb created
gpg: key 58B80F90: public key "Launchpad PPA for Julian Taylor" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

Right now it is running again and I will let it run through .... and see what happens

many lines of this are still running - just marked while still running , then copy ... to paste it here.

BER=1 -DASMNAME=dsyr2 -DASMFNAME=dsyr2_ -DNAME=dsyr2_ -DCNAME=dsyr2 -DCHAR_NAME=\"dsyr2_\" -DCHAR_CNAME=\"dsyr2\" -DNO_AFFINITY -I.. -I. -DDOUBLE  -UCOMPLEX syr2.c -o dsyr2.o
gcc -c -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DNO_WARMUP -DMAX_CPU_NUMBER=1 -DASMNAME=dgbmv -DASMFNAME=dgbmv_ -DNAME=dgbmv_ -DCNAME=dgbmv -DCHAR_NAME=\"dgbmv_\" -DCHAR_CNAME=\"dgbmv\" -DNO_AFFINITY -I.. -I. -DDOUBLE  -UCOMPLEX -o dgbmv.o gbmv.c
gcc -c -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DNO_WARMUP -DMAX_CPU_NUMBER=1 -DASMNAME=dsbmv -DASMFNAME=dsbmv_ -DNAME=dsbmv_ -DCNAME=dsbmv -DCHAR_NAME=\"dsbmv_\" -DCHAR_CNAME=\"dsbmv\" -DNO_AFFINITY -I.. -I. -DDOUBLE  -UCOMPLEX sbmv.c -o dsbmv.o
gcc -c -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DNO_WARMUP -DMAX_CPU_NUMBER=1 -DASMNAME=dspmv -DASMFNAME=dspmv_ -DNAME=dspmv_ -DCNAME=dspmv -DCHAR_NAME=\"dspmv_\" -DCHAR_CNAME=\"dspmv\" -DNO_AFFINITY -I.. -I. -DDOUBLE  -UCOMPLEX spmv.c -o dspmv.o
gcc -c -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DNO_WARMUP -DMAX_CPU_NUMBER=1 -DASMNAME=dspr -DASMFNAME=dspr_ -DNAME=dspr_ -DCNAME=dspr -DCHAR_NAME=\"dspr_\" -DCHAR_CNAME=\"dspr\" -DNO_AFFINITY -I.. -I. -DDOUBLE  -UCOMPLEX spr.c -o dspr.o

@martin-frbg
Copy link
Collaborator

Yep. Did not really think through about the implications of the VM, i.e. that you might have just one core assigned to it, and only edited what I wrote earlier instead of creating a new message so you probably did not see it in time. Think it will run to completion now that you found out yourself what needed to be changed. (I'll see if I get around to creating a patch to recognize intel cpu code 55 - 37 in hexadecimal meaning extended model 3, model 7 - similar to 52eba81 )

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

I got tons of lines on the screens - some warnings ... it is running and running

BUT: Is it really only a question of cores that if

if [ $(getconf _NPROCESSORS_ONLN) == 1 ]; then

Then I will change my ubuntu settings from 1 core to 2 cores and see what will happen - maybe / hopefully without all these warnings

@martin-frbg
Copy link
Collaborator

The tons of lines of output are harmless - OpenBLAS is quite a big library and this is mostly just the normal feedback from compiling each of the many source files. You may get an occasional warning about some unused local variable, and towards the end of the build process it will also build and run some automated tests to check its accuracy, but as long as it does not terminate with an error message everything should be alright.

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

Hey,

finally I stopped the 1 processor virtual ubuntu machine and started a new run as 2 processor machine

That is still running ...
The vm player ubuntu system settings regarding processor always means CORES.
After I changed the core to 2 the VM Player displays now 2 PROCESSORS.

Let's wait and see ... at least much better than the last 2 or 3 days regarding progress and feelings.

@typxxi
Copy link
Author

typxxi commented Oct 14, 2016

DID IT

but what does this mean - appeared shortly before the end

  Library Name     ... libopenblas_atom-r0.2.20.dev.a (Single threaded)  
To install the library, you can run "make PREFIX=/path/to/your/installation install".

@martin-frbg
Copy link
Collaborator

Seems the build went through correctly (the "make install" step is a few lines below the one we edited and will probably not have generated any output except perhaps asking for the system password), but the script still recognized only a single core. Depending on what torch and/or that siggraph code does, a single-threaded openblas may actually be all you need.
If you want to try a multithreaded version for comparison, you could edit that "if" block so that it has the USE_OPENMP=1 USE_THREAD=1 in both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants