Coder Social home page Coder Social logo

Comments (9)

bartoszek avatar bartoszek commented on June 16, 2024 1

It looks like -fopenmp is not getting propagated to Demos builds

make VERBOSE=1

[ 95%] Building CXX object Demos/DynamicBoundaryDemo/CMakeFiles/DynamicBoundaryDemo.dir/main.cpp.o
cd /home/bartus/AUR/splishsplash/src/splishsplash/build/Demos/DynamicBoundaryDemo && /usr/bin/clang++  -DPBD_DATA_PATH=\"../data\" -DPBD_DATA_PATH=\"/home/bartus/AUR/splishsplash/src/splishsplash/extern/install/PositionBasedDynamics/include/data\" -DSPH_DATA_PATH=\"../data\" -DTW_NO_LIB_PRAGMA -DTW_STATIC -DUSE_PBD -D_CRT_SECURE_NO_DEPRECATE -I/home/bartus/AUR/splishsplash/src/splishsplash -I/home/bartus/AUR/splishsplash/src/splishsplash/extern/freeglut/include -I/usr/include/eigen3 -I/home/bartus/AUR/splishsplash/src/splishsplash/extern/install/CompactNSearch/include -I/home/bartus/AUR/splishsplash/src/splishsplash/extern/install/PositionBasedDynamics/include -I/home/bartus/AUR/splishsplash/src/splishsplash/extern/glew/include  -march=native -mtune=native -O2 -pipe -fstack-protector-strong -fno-plt   -std=gnu++11 -o CMakeFiles/DynamicBoundaryDemo.dir/main.cpp.o -c /home/bartus/AUR/splishsplash/src/splishsplash/Demos/DynamicBoundaryDemo/main.cpp

append -fopenmp to CMakeFiles/DynamicBoundaryDemo.dir/flags.make fixes the problem.
Looks like cmake issue... I'm not very strong in cmake sadly
Ok. I bogged up a patch that works for me: Demos.openmp.patch.txt

from splishsplash.

janbender avatar janbender commented on June 16, 2024

Does it help if you add #include <unistd.h> in the beginning of FileSystem.cpp?

from splishsplash.

andrewcoughtrie avatar andrewcoughtrie commented on June 16, 2024

Including unistd.h gets it past that error but it now fail when building DynamicBoundaryDemo. I've included the first part of the error below and attached the entire output from make here -
error.txt - the error is from line 116 of the error.txt file.

<command-line>:0:0: warning: "PBD_DATA_PATH" redefined <command-line>:0:0: note: this is the location of the previous definition In file included from /apps/compilers/GCC/6.2.0/build/include/c++/6.2.0/parallel/algorithmfwd.h:34:0, from /apps/compilers/GCC/6.2.0/build/include/c++/6.2.0/parallel/algorithm:35, from /home/andy/Programs/SPlisHSPlasH/extern/install/CompactNSearch/include/Config.h:14, from /home/andy/Programs/SPlisHSPlasH/extern/install/CompactNSearch/include/CompactNSearch.h:5, from /home/andy/Programs/SPlisHSPlasH/SPlisHSPlasH/FluidModel.h:7, from /home/andy/Programs/SPlisHSPlasH/SPlisHSPlasH/TimeStep.h:5, from /home/andy/Programs/SPlisHSPlasH/Demos/Common/DemoBase.h:7, from /home/andy/Programs/SPlisHSPlasH/Demos/DynamicBoundaryDemo/main.cpp:14: /apps/compilers/GCC/6.2.0/build/include/c++/6.2.0/parallel/tags.h: In member function ‘__gnu_parallel::_ThreadIndex __gnu_parallel::parallel_tag::__get_num_threads()’: /apps/compilers/GCC/6.2.0/build/include/c++/6.2.0/parallel/tags.h:66:38: error: ‘omp_get_max_threads’ was not declared in this scope return omp_get_max_threads();

from splishsplash.

bartoszek avatar bartoszek commented on June 16, 2024

Have the same problem on Archlinux (cmake 3.9.2, gcc6 6.4.1)
build-log.txt
Tried adding -D_GLIBCXX_PARALLEL to {C,CXX}FLAGS but this breaks json.hpp
build-log2.txt

from splishsplash.

janbender avatar janbender commented on June 16, 2024

It seems that the compiler does not find OpenMP. However, since I cannot reproduce this error on my system it is hard to help you.

from splishsplash.

bartoszek avatar bartoszek commented on June 16, 2024

Also when building with gcc7/clang5 there are some minor hiccups:

/home/bartus/AUR/splishsplash/src/splishsplash/extern/partio/src/lib/io/MC.cpp: In function ‘int Partio::CharArrayLen(char**)’
/home/bartus/AUR/splishsplash/src/splishsplash/extern/partio/src/lib/io/MC.cpp:107:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
     if(charArray != false){
                     ^~~~~
/home/bartus/AUR/splishsplash/src/splishsplash/extern/partio/src/lib/io/MC.cpp:108:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
         while(charArray[i] != '\0'){
In file included from /home/bartus/AUR/splishsplash/src/splishsplash/extern/partio/src/lib/io/NEW_BGEO.cpp:45:0:
/home/bartus/AUR/splishsplash/src/splishsplash/extern/partio/src/lib/io/PartioBinaryJson.h: In member function ‘void Partio::JSONParser<DELEGATE>::numberDataNotify()’
/home/bartus/AUR/splishsplash/src/splishsplash/extern/partio/src/lib/io/PartioBinaryJson.h:330:31: error: expected primary-expression before ‘>’ token
         Derived().numberData<T>(currKey,val);
                               ^
/home/bartus/AUR/splishsplash/src/splishsplash/extern/partio/src/lib/io/PartioBinaryJson.h: In member function ‘void Partio::JSONParser<DELEGATE>::uniformArray()’
/home/bartus/AUR/splishsplash/src/splishsplash/extern/partio/src/lib/io/PartioBinaryJson.h:336:37: error: expected primary-expression before ‘>’ token
         if(!Derived().uniformArray<T>(currKey,length)){

gcc7.patch.txt

from splishsplash.

janbender avatar janbender commented on June 16, 2024

I will test your patch and integrate it. Thanks.

Partio is an external library. So it would be helpful if you send your problem to the authors of this lib.

from splishsplash.

bartoszek avatar bartoszek commented on June 16, 2024

from splishsplash.

janbender avatar janbender commented on June 16, 2024

Thanks for the hint. I will try to update partio.

from splishsplash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.