Csound Csound-dev Csound-tekno Search About

[Csnd] with ccmake when OPENMP_FOUND is FALSE

Date2013-11-12 14:41
FromDavid Worrall
Subject[Csnd] with ccmake when OPENMP_FOUND is FALSE
Trying to learn the new  Csound6 built on OSX….

In 
CMakeLists.txt in the top directory of the sources
at
## MAIN TARGETS ##
is these lines:

check_deps(USE_OPEN_MP OPENMP_FOUND PTHREAD_BARRIER_INIT_EXISTS)
if(USE_OPEN_MP)
   list(APPEND libcsound_CFLAGS -DUSE_OPENMP)
….

By default, USE_OPEN_MP is set to ON
but my ccmake tells me OPENMP_FOUND is FALSE

so when I set
option(FAIL_MISSING "Fail when a required external dependency is not present (useful for packagers)" ON)
(it is OFF by default)
ccmake stops, as expected:
CMake Error at CMakeLists.txt:113 (message):
   USE_OPEN_MP is enabled, but OPENMP_FOUND="FALSE"
 Call Stack (most recent call first):
   CMakeLists.txt:489 (check_deps)


I don't actually know what OPENMP is, but my question: Is the above correct logic?
 i.e. is it correct that an APPEND libcsound_ is called when OPENMP_FOUND is TRUE or FALSE?
 
thanks,
David



______________________________________
Prof. Dr. David Worrall
Emerging Audio Research (EAR)
Audio Department
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
Telefon  +49 (0) 91 31 / 7 76-62 44
Fax      +49 (0) 91 31 / 7 76-20 99
E-Mail: david.worrall@iis.fraunhofer.de
Internet: www.iis.fraunhofer.de 





Date2013-11-12 14:50
FromMichael Gogins
SubjectRe: [Csnd] with ccmake when OPENMP_FOUND is FALSE
OpenMP is an industry standard facility for parallel programming in multi-core computers. It is implemented using compiler pragmas. It greatly simplifies multi-threaded programming. OpenMP exists in standard C++ compilers on Unix, Linux, Windows, but not OS X (yet).

I think the CMakeLists.txt logic is correct, so I think you should set USE_OPEN_MP to false and FAIL_MISSING also to false. OpenMP is required for only a few plugin opcodes. Most of Csound uses pthreads for the same purposes. In particular, OpenMP is not used to implement "parallel Csound." 

If you still can't build in this case, then there is an error in CMakeLists.txt and the deps call should be fixed so the build does not fail if OpenMP does not exist on the system.

Hope this helps,
Mike




-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, Nov 12, 2013 at 9:41 AM, David Worrall <david.worrall@iis.fraunhofer.de> wrote:
Trying to learn the new  Csound6 built on OSX….

In 
CMakeLists.txt in the top directory of the sources
at
## MAIN TARGETS ##
is these lines:

check_deps(USE_OPEN_MP OPENMP_FOUND PTHREAD_BARRIER_INIT_EXISTS)
if(USE_OPEN_MP)
   list(APPEND libcsound_CFLAGS -DUSE_OPENMP)
….

By default, USE_OPEN_MP is set to ON
but my ccmake tells me OPENMP_FOUND is FALSE

so when I set
option(FAIL_MISSING "Fail when a required external dependency is not present (useful for packagers)" ON)
(it is OFF by default)
ccmake stops, as expected:
CMake Error at CMakeLists.txt:113 (message):
   USE_OPEN_MP is enabled, but OPENMP_FOUND="FALSE"
 Call Stack (most recent call first):
   CMakeLists.txt:489 (check_deps)


I don't actually know what OPENMP is, but my question: Is the above correct logic?
 i.e. is it correct that an APPEND libcsound_ is called when OPENMP_FOUND is TRUE or FALSE?
 
thanks,
David



______________________________________
Prof. Dr. David Worrall
Emerging Audio Research (EAR)
Audio Department
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
Telefon  +49 (0) 91 31 / 7 76-62 44
Fax      +49 (0) 91 31 / 7 76-20 99
E-Mail: david.worrall@iis.fraunhofer.de
Internet: www.iis.fraunhofer.de 






Date2013-11-12 15:12
FromDavid Worrall
SubjectRe: [Csnd] with ccmake when OPENMP_FOUND is FALSE
Incredibly helpful, thanks, Mike!
the default csound6 builds with the Make - I was just curious before I started adding non-default OPcodes.

David


On 12.11.2013, at 15:50, Michael Gogins <michael.gogins@gmail.com> wrote:

OpenMP is an industry standard facility for parallel programming in multi-core computers. It is implemented using compiler pragmas. It greatly simplifies multi-threaded programming. OpenMP exists in standard C++ compilers on Unix, Linux, Windows, but not OS X (yet).

I think the CMakeLists.txt logic is correct, so I think you should set USE_OPEN_MP to false and FAIL_MISSING also to false. OpenMP is required for only a few plugin opcodes. Most of Csound uses pthreads for the same purposes. In particular, OpenMP is not used to implement "parallel Csound." 

If you still can't build in this case, then there is an error in CMakeLists.txt and the deps call should be fixed so the build does not fail if OpenMP does not exist on the system.

Hope this helps,
Mike




-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, Nov 12, 2013 at 9:41 AM, David Worrall <david.worrall@iis.fraunhofer.de> wrote:
Trying to learn the new  Csound6 built on OSX….

In 
CMakeLists.txt in the top directory of the sources
at
## MAIN TARGETS ##
is these lines:

check_deps(USE_OPEN_MP OPENMP_FOUND PTHREAD_BARRIER_INIT_EXISTS)
if(USE_OPEN_MP)
   list(APPEND libcsound_CFLAGS -DUSE_OPENMP)
….

By default, USE_OPEN_MP is set to ON
but my ccmake tells me OPENMP_FOUND is FALSE

so when I set
option(FAIL_MISSING "Fail when a required external dependency is not present (useful for packagers)" ON)
(it is OFF by default)
ccmake stops, as expected:
CMake Error at CMakeLists.txt:113 (message):
   USE_OPEN_MP is enabled, but OPENMP_FOUND="FALSE"
 Call Stack (most recent call first):
   CMakeLists.txt:489 (check_deps)


I don't actually know what OPENMP is, but my question: Is the above correct logic?
 i.e. is it correct that an APPEND libcsound_ is called when OPENMP_FOUND is TRUE or FALSE?
 
thanks,
David



______________________________________
Prof. Dr. David Worrall
Emerging Audio Research (EAR)
Audio Department
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
Telefon  +49 (0) 91 31 / 7 76-62 44
Fax      +49 (0) 91 31 / 7 76-20 99
E-Mail: david.worrall@iis.fraunhofer.de
Internet: www.iis.fraunhofer.de 






______________________________________
Prof. Dr. David Worrall
Emerging Audio Research (EAR)
Audio Department
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
Telefon  +49 (0) 91 31 / 7 76-62 44
Fax      +49 (0) 91 31 / 7 76-20 99
E-Mail: david.worrall@iis.fraunhofer.de
Internet: www.iis.fraunhofer.de 





Date2013-11-12 18:28
FromSteven Yi
SubjectRe: [Csnd] with ccmake when OPENMP_FOUND is FALSE
OpenMP certainly isn't a required library and doesn't exist on OSX.  Just FYI, I do not use FAIL_MISSING when building.  y


On Tue, Nov 12, 2013 at 10:12 AM, David Worrall <david.worrall@iis.fraunhofer.de> wrote:
Incredibly helpful, thanks, Mike!
the default csound6 builds with the Make - I was just curious before I started adding non-default OPcodes.

David


On 12.11.2013, at 15:50, Michael Gogins <michael.gogins@gmail.com> wrote:

OpenMP is an industry standard facility for parallel programming in multi-core computers. It is implemented using compiler pragmas. It greatly simplifies multi-threaded programming. OpenMP exists in standard C++ compilers on Unix, Linux, Windows, but not OS X (yet).

I think the CMakeLists.txt logic is correct, so I think you should set USE_OPEN_MP to false and FAIL_MISSING also to false. OpenMP is required for only a few plugin opcodes. Most of Csound uses pthreads for the same purposes. In particular, OpenMP is not used to implement "parallel Csound." 

If you still can't build in this case, then there is an error in CMakeLists.txt and the deps call should be fixed so the build does not fail if OpenMP does not exist on the system.

Hope this helps,
Mike




-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, Nov 12, 2013 at 9:41 AM, David Worrall <david.worrall@iis.fraunhofer.de> wrote:
Trying to learn the new  Csound6 built on OSX….

In 
CMakeLists.txt in the top directory of the sources
at
## MAIN TARGETS ##
is these lines:

check_deps(USE_OPEN_MP OPENMP_FOUND PTHREAD_BARRIER_INIT_EXISTS)
if(USE_OPEN_MP)
   list(APPEND libcsound_CFLAGS -DUSE_OPENMP)
….

By default, USE_OPEN_MP is set to ON
but my ccmake tells me OPENMP_FOUND is FALSE

so when I set
option(FAIL_MISSING "Fail when a required external dependency is not present (useful for packagers)" ON)
(it is OFF by default)
ccmake stops, as expected:
CMake Error at CMakeLists.txt:113 (message):
   USE_OPEN_MP is enabled, but OPENMP_FOUND="FALSE"
 Call Stack (most recent call first):
   CMakeLists.txt:489 (check_deps)


I don't actually know what OPENMP is, but my question: Is the above correct logic?
 i.e. is it correct that an APPEND libcsound_ is called when OPENMP_FOUND is TRUE or FALSE?
 
thanks,
David



______________________________________
Prof. Dr. David Worrall
Emerging Audio Research (EAR)
Audio Department
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
Telefon  +49 (0) 91 31 / 7 76-62 44
Fax      +49 (0) 91 31 / 7 76-20 99
E-Mail: david.worrall@iis.fraunhofer.de
Internet: www.iis.fraunhofer.de 






______________________________________
Prof. Dr. David Worrall
Emerging Audio Research (EAR)
Audio Department
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
Telefon  +49 (0) 91 31 / 7 76-62 44
Fax      +49 (0) 91 31 / 7 76-20 99
E-Mail: david.worrall@iis.fraunhofer.de
Internet: www.iis.fraunhofer.de