Code Monkey home page Code Monkey logo

Comments (15)

r-barnes avatar r-barnes commented on June 2, 2024

The operator system is good information, but what compiler and compiler version are you using? What git hash are you on? (Top hash value in git log)

from barnes2020-fillspillmerge.

mdp0023 avatar mdp0023 commented on June 2, 2024

I realized I hadn't pulled the most recent code. After doing so, this is what the hash I am on (cdf01f0). I also saw the readme had been updated, so I followed those steps and am getting a different issue that I thought I had resolved yesterday. Below is what I am getting after I run cmake:

-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Check for working C compiler: /usr/local/Cellar/llvm/10.0.0_3/bin/clang
-- Check for working C compiler: /usr/local/Cellar/llvm/10.0.0_3/bin/clang - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/Cellar/llvm/10.0.0_3/bin/clang++
-- Check for working CXX compiler: /usr/local/Cellar/llvm/10.0.0_3/bin/clang++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found NetCDF: /usr/local/lib/libnetcdf.dylib
-- Found GDAL: /Library/Frameworks/gdal.framework (found version "2.4.2")
-- Found OpenMP_C: -fopenmp=libomp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp=libomp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/matthewpreisser/Barnes2020-FillSpillMerge/build

after running make I get:

Scanning dependencies of target richdem
[ 14%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/include/richdem/common/random.cpp.o
[ 28%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/include/richdem/richdem.cpp.o
[ 42%] Linking CXX static library librichdem.a
[ 42%] Built target richdem
Scanning dependencies of target fsm_paper_speed_comparison.exe
Scanning dependencies of target fsm_paper_tests.exe
[ 57%] Building CXX object CMakeFiles/fsm_paper_tests.exe.dir/src/fsm_paper_tests.cpp.o
[ 71%] Building CXX object CMakeFiles/fsm_paper_speed_comparison.exe.dir/src/fsm_paper_speed_comparison.cpp.o
In file included from /Users/matthewpreisser/Barnes2020-FillSpillMerge/src/fsm_paper_tests.cpp:2:
/Users/matthewpreisser/Barnes2020-FillSpillMerge/src/netcdf.hpp:4:10: fatal error: 'netcdf.h' file not found
#include <netcdf.h>
^~~~~~~~~~
In file included from /Users/matthewpreisser/Barnes2020-FillSpillMerge/src/fsm_paper_speed_comparison.cpp:2:
/Users/matthewpreisser/Barnes2020-FillSpillMerge/src/netcdf.hpp:4:10: fatal error: 'netcdf.h' file not found
#include <netcdf.h>
^~~~~~~~~~
1 error generated.
1 error generated.
make[2]: *** [CMakeFiles/fsm_paper_speed_comparison.exe.dir/build.make:83: CMakeFiles/fsm_paper_speed_comparison.exe.dir/src/fsm_paper_speed_comparison.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/fsm_paper_speed_comparison.exe.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/fsm_paper_tests.exe.dir/build.make:83: CMakeFiles/fsm_paper_tests.exe.dir/src/fsm_paper_tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:165: CMakeFiles/fsm_paper_tests.exe.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

gcc -v returns:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
(base) ~/Barnes2020-FillSpillMerge/build MP$

and make -v returns:
GNU Make 4.2.1
Built for x86_64-apple-darwin13.4.0
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
(base) ~/Barnes2020-FillSpillMerge/build MP$

from barnes2020-fillspillmerge.

awickert avatar awickert commented on June 2, 2024

During the configuration step, the output indicated that you did have NetCDF (presumably via brew, per the instructions?):

-- Found NetCDF: /usr/local/lib/libnetcdf.dylib

Could you check if there is a netcdf.h file in this location? There's a problem linking to this header file for the netcdf library.

from barnes2020-fillspillmerge.

mdp0023 avatar mdp0023 commented on June 2, 2024

netcdf.h is not in that location. Reinstalling netcdf using brew does not correct it either.

It is however in /usr/local/Cellar/netcdf/4.7.4/include if that is helpful

from barnes2020-fillspillmerge.

awickert avatar awickert commented on June 2, 2024

usr/local/Cellar is where brew will install dependencies. The problem is that you already have another (obviously incomplete) NetCDF install that is taking priority in your system's PATH. Since it is in /usr/local, it seems to be something that you added to compile yourself. I would suggest removing this.

Good news: this (at least) isn't an FSM problem!

from barnes2020-fillspillmerge.

mdp0023 avatar mdp0023 commented on June 2, 2024

well that's good! So are you recommending that I remove it from the /usr/local/lib location?

from barnes2020-fillspillmerge.

r-barnes avatar r-barnes commented on June 2, 2024

No. It's better if you do something like:

export LD_LIBRARY_PATH=/the/right/path:$LD_LIBRARY_PATH

Removing files other than through a package manager often leads to pain.

from barnes2020-fillspillmerge.

r-barnes avatar r-barnes commented on June 2, 2024

You could also try making the build with, e.g.:

cmake -DCMAKE_BUILD_TYPE=Release -DNETCDF_INCLUDES=/path/to/netcdf.h -DNETCDF_LIBRARIES=/path/to/libnetcdf.so ..

from barnes2020-fillspillmerge.

r-barnes avatar r-barnes commented on June 2, 2024

If this turns out to be inconvenient, I think I can make NetCDF optional.

from barnes2020-fillspillmerge.

mdp0023 avatar mdp0023 commented on June 2, 2024

Great! I have got it to recognize NetCDF now. I am back to my original error:

Undefined symbols for architecture x86_64:
"std::__1::__has_iterator_category<std::__1::iterator_traits >::value", referenced from:
void richdem::dephier::CalculateMarginalVolumes(std::__1::vector<richdem::dephier::Depression, std::__1::allocator<richdem::dephier::Depression > >&, richdem::Array2D const&, richdem::Array2D const&) in fsm_paper_tests.cpp.o
ld: symbol(s) not found for architecture x86_64
Undefined symbols for architecture x86_64:
"std::__1::__has_iterator_category<std::__1::iterator_traits >::value", referenced from:
void richdem::dephier::CalculateMarginalVolumes(std::__1::vector<richdem::dephier::Depression, std::__1::allocator<richdem::dephier::Depression > >&, richdem::Array2D const&, richdem::Array2D const&) in fsm_paper_speed_comparison.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [fsm_paper_tests.exe] Error 1
make[1]: *** [CMakeFiles/fsm_paper_tests.exe.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [fsm_paper_speed_comparison.exe] Error 1
make[1]: *** [CMakeFiles/fsm_paper_speed_comparison.exe.dir/all] Error 2
make: *** [all] Error 2

from barnes2020-fillspillmerge.

r-barnes avatar r-barnes commented on June 2, 2024

This is mysterious, @mdp0023 . I don't know if I'll be able to fix it.

But try make clean followed by VERBOSE=1 make and put the output here. That way we'll be able to see what make is doing.

from barnes2020-fillspillmerge.

mdp0023 avatar mdp0023 commented on June 2, 2024

Here it is below. No clue what is happening but I have access to another machine that I am going to try it on.

/opt/local/bin/cmake -S/Users/matthewpreisser/Barnes2020-FillSpillMerge -B/Users/matthewpreisser/Barnes2020-FillSpillMerge/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/CMakeFiles /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
make -f submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/build.make submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/depend
make[2]: Entering directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
cd /Users/matthewpreisser/Barnes2020-FillSpillMerge/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /Users/matthewpreisser/Barnes2020-FillSpillMerge /Users/matthewpreisser/Barnes2020-FillSpillMerge/submodules/dephier/submodules/richdem /Users/matthewpreisser/Barnes2020-FillSpillMerge/build /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/submodules/dephier/submodules/richdem /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
make -f submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/build.make submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/build
make[2]: Entering directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
[ 14%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/include/richdem/richdem.cpp.o
cd /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/submodules/dephier/submodules/richdem && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -I/Users/matthewpreisser/Barnes2020-FillSpillMerge/submodules/dephier/submodules/richdem/include -I/Library/Frameworks/GDAL.framework/Headers -isystem /usr/local/include -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -F/Library/Frameworks -DRICHDEM_GIT_HASH="349fc363b622e68a652c44211d20fe50094ea43c" -DRICHDEM_COMPILE_TIME="2020-06-03T23:23:14Z" -DUSEGDAL -Xclang -fopenmp -std=gnu++11 -o CMakeFiles/richdem.dir/include/richdem/richdem.cpp.o -c /Users/matthewpreisser/Barnes2020-FillSpillMerge/submodules/dephier/submodules/richdem/include/richdem/richdem.cpp
[ 28%] Building CXX object submodules/dephier/submodules/richdem/CMakeFiles/richdem.dir/include/richdem/common/random.cpp.o
cd /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/submodules/dephier/submodules/richdem && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -I/Users/matthewpreisser/Barnes2020-FillSpillMerge/submodules/dephier/submodules/richdem/include -I/Library/Frameworks/GDAL.framework/Headers -isystem /usr/local/include -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -F/Library/Frameworks -DRICHDEM_GIT_HASH="349fc363b622e68a652c44211d20fe50094ea43c" -DRICHDEM_COMPILE_TIME="2020-06-03T23:23:14Z" -DUSEGDAL -Xclang -fopenmp -std=gnu++11 -o CMakeFiles/richdem.dir/include/richdem/common/random.cpp.o -c /Users/matthewpreisser/Barnes2020-FillSpillMerge/submodules/dephier/submodules/richdem/include/richdem/common/random.cpp
[ 42%] Linking CXX static library librichdem.a
cd /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/submodules/dephier/submodules/richdem && /opt/local/bin/cmake -P CMakeFiles/richdem.dir/cmake_clean_target.cmake
cd /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/submodules/dephier/submodules/richdem && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/richdem.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar qc librichdem.a CMakeFiles/richdem.dir/include/richdem/richdem.cpp.o CMakeFiles/richdem.dir/include/richdem/common/random.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib librichdem.a
make[2]: Leaving directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
[ 42%] Built target richdem
make -f CMakeFiles/fsm_paper_speed_comparison.exe.dir/build.make CMakeFiles/fsm_paper_speed_comparison.exe.dir/depend
make[2]: Entering directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
cd /Users/matthewpreisser/Barnes2020-FillSpillMerge/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /Users/matthewpreisser/Barnes2020-FillSpillMerge /Users/matthewpreisser/Barnes2020-FillSpillMerge /Users/matthewpreisser/Barnes2020-FillSpillMerge/build /Users/matthewpreisser/Barnes2020-FillSpillMerge/build /Users/matthewpreisser/Barnes2020-FillSpillMerge/build/CMakeFiles/fsm_paper_speed_comparison.exe.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
make -f CMakeFiles/fsm_paper_speed_comparison.exe.dir/build.make CMakeFiles/fsm_paper_speed_comparison.exe.dir/build
make[2]: Entering directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
[ 57%] Building CXX object CMakeFiles/fsm_paper_speed_comparison.exe.dir/src/fsm_paper_speed_comparison.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -I/Users/matthewpreisser/Barnes2020-FillSpillMerge/submodules -I/Users/matthewpreisser/Barnes2020-FillSpillMerge/include -I/Users/matthewpreisser/Barnes2020-FillSpillMerge/submodules/dephier/include -I/Users/matthewpreisser/Barnes2020-FillSpillMerge/submodules/dephier/submodules/richdem/include -I/Library/Frameworks/GDAL.framework/Headers -isystem /usr/local/include -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -F/Library/Frameworks -DRICHDEM_GIT_HASH="349fc363b622e68a652c44211d20fe50094ea43c" -DRICHDEM_COMPILE_TIME="2020-06-03T23:23:14Z" -DUSEGDAL -Xclang -fopenmp -std=gnu++17 -o CMakeFiles/fsm_paper_speed_comparison.exe.dir/src/fsm_paper_speed_comparison.cpp.o -c /Users/matthewpreisser/Barnes2020-FillSpillMerge/src/fsm_paper_speed_comparison.cpp
[ 71%] Linking CXX executable fsm_paper_speed_comparison.exe
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/fsm_paper_speed_comparison.exe.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/fsm_paper_speed_comparison.exe.dir/src/fsm_paper_speed_comparison.cpp.o -o fsm_paper_speed_comparison.exe -F/Library/Frameworks submodules/dephier/submodules/richdem/librichdem.a /usr/local/lib/libnetcdf.dylib /usr/local/lib/libomp.dylib -framework gdal
Undefined symbols for architecture x86_64:
"std::__1::__has_iterator_category<std::__1::iterator_traits >::value", referenced from:
void richdem::dephier::CalculateMarginalVolumes(std::__1::vector<richdem::dephier::Depression, std::__1::allocator<richdem::dephier::Depression > >&, richdem::Array2D const&, richdem::Array2D const&) in fsm_paper_speed_comparison.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/fsm_paper_speed_comparison.exe.dir/build.make:107: fsm_paper_speed_comparison.exe] Error 1
make[2]: Leaving directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/fsm_paper_speed_comparison.exe.dir/all] Error 2
make[1]: Leaving directory '/Users/matthewpreisser/Barnes2020-FillSpillMerge/build'
make: *** [Makefile:150: all] Error 2

from barnes2020-fillspillmerge.

r-barnes avatar r-barnes commented on June 2, 2024

@mdp0023 : Were you able to try your other machine?

from barnes2020-fillspillmerge.

mdp0023 avatar mdp0023 commented on June 2, 2024

Yes I have successfully ran it on my Linux machine and now am just working through the outputs. I started going through the threads on here as well as on the depressionhierarchy Repository to better familiarize myself with the outputs and how to use them. Very much looking forward to incorporating this in my own work

from barnes2020-fillspillmerge.

KCallaghan avatar KCallaghan commented on June 2, 2024

@mdp0023 I'm glad to hear you were able to get this working! If you have more questions (about the outputs, etc) feel free to ask here or send me another email.

from barnes2020-fillspillmerge.

Related Issues (13)

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.