-
Notifications
You must be signed in to change notification settings - Fork 4
Replace Makefile build back end with SConstruct #330
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Fix variant directories and env defines - Add source files to ANN and src
- Modified `solver.py` to reference SCons - Fixed debugging errors in compile method - Updated SCons files to define lib in main script
BryanRumsey
requested changes
Feb 8, 2023
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Examples failed on MacOS
Compiler
bryanrumsey@Bryans-MacBook-Pro stochss % g++ --version
Apple clang version 14.0.0 (clang-1400.0.29.201)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Errors
scons: Entering directory `/var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_build_dxo110kt'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_build_dxo110kt/3DCylinderDemo_generated_model.o -c -std=c++14 -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/include -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/external/ANN/include /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_build_dxo110kt/3DCylinderDemo_generated_model.cpp
g++ -o /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey/count_cores.o -c -std=c++14 -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/include -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/external/ANN/include /Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/count_cores.cpp
g++ -o /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey/model.o -c -std=c++14 -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/include -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/external/ANN/include /Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/model.cpp
g++ -o /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey/NRMConstant_v5.o -c -std=c++14 -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/include -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/external/ANN/include /Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/NRMConstant_v5.cpp
g++ -o /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey/output.o -c -std=c++14 -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/include -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/external/ANN/include /Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/output.cpp
/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/output.cpp:37:9: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(filename,"output_%u.csv",current_step);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/output.cpp:111:13: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(filename, "output0_boundingBox.vtk");
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/output.cpp:129:9: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(filename,"output%u.vtk", output_index++);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
3 warnings generated.
g++ -o /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey/particle.o -c -std=c++14 -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/include -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/external/ANN/include /Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/particle.cpp
g++ -o /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey/pthread_barrier.o -c -std=c++14 -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/include -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/external/ANN/include /Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/pthread_barrier.cpp
g++ -o /var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey/read_lammps_input_file.o -c -std=c++14 -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/include -I/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/external/ANN/include /Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/read_lammps_input_file.cpp
/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/read_lammps_input_file.cpp:97:14: error: use of undeclared identifier 'create_particle'
me = create_particle(id);
^
/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/src/read_lammps_input_file.cpp:105:9: error: use of undeclared identifier 'add_particle'
add_particle(me,system);
^
2 errors generated.
scons: *** [/var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey/read_lammps_input_file.o] Error 1
scons: building terminated because of errors.
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
File ~/SpatialPy/spatialpy/solvers/solver.py:492, in Solver.compile(self, debug, profile)
491 try:
--> 492 result = subprocess.check_output(make_cmd, stderr=subprocess.STDOUT)
493 if self.debug_level > 1:
File /opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py:420, in check_output(timeout, *popenargs, **kwargs)
418 kwargs['input'] = empty
--> 420 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
421 **kwargs).stdout
File /opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py:524, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
523 if check and retcode:
--> 524 raise CalledProcessError(retcode, process.args,
525 output=stdout, stderr=stderr)
526 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['/opt/homebrew/opt/[email protected]/bin/python3.10', '-m', 'SCons', '-C/var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_build_dxo110kt', '-f/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine/build/SConstruct', 'ROOT=/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine', 'ROOTINC=/Users/bryanrumsey/SpatialPy/spatialpy/solvers/c_base/ssa_sdpd-c-simulation-engine', 'COREDIR=/var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_core/bryanrumsey', 'MODEL=/var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_build_dxo110kt/3DCylinderDemo_generated_model.cpp', 'BUILD=/var/folders/z4/bqpnd_kx7xg3s3c9jtz0pnfh0000gn/T/spatialpy_build_dxo110kt']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
SimulationError Traceback (most recent call last)
File <timed exec>:1
File ~/SpatialPy/spatialpy/core/model.py:1055, in Model.run(self, number_of_trajectories, seed, timeout, number_of_threads, debug_level, debug, profile)
1051 from spatialpy.solvers.solver import Solver # pylint: disable=import-outside-toplevel
1053 sol = Solver(self, debug_level=debug_level)
-> 1055 return sol.run(number_of_trajectories=number_of_trajectories, seed=seed, timeout=timeout,
1056 number_of_threads=number_of_threads, debug=debug, profile=profile)
File ~/SpatialPy/spatialpy/solvers/solver.py:547, in Solver.run(self, number_of_trajectories, seed, timeout, number_of_threads, debug, profile, verbose)
545 # Check if compiled, call compile() if not.
546 if not self.is_compiled:
--> 547 self.compile(debug=debug, profile=profile)
549 # Execute the solver
550 for run_ndx in range(number_of_trajectories):
File ~/SpatialPy/spatialpy/solvers/solver.py:500, in Solver.compile(self, debug, profile)
498 except Exception:
499 pass
--> 500 raise SimulationError(f"Compilation of solver failed, return_code={err.returncode}")
501 except OSError as err:
502 cmd = " ".join(make_cmd)
SimulationError: Compilation of solver failed, return_code=2
Member
|
I also get the same error with: |
briandrawert
approved these changes
Feb 9, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces the Makefile scripts with corresponding SCons ones. The build artifacts should be roughly equivalent. Tested on Windows, still needs to be tested on Linux and Mac.