Closed barracuda156 closed 1 year ago
Also same error from 2.1.1 and master branch.
I hadn't tested ADOL-C for a long time, and an earlier change broke the ability to use its "adouble" type. Now fixed - please try the latest version.
Let me try.
@rjhogan So the error reported above is fixed. gcc12
fails, however, with familiar linking errors (known bug in gcc12
):
libtool: link: /opt/local/bin/g++-mp-12 -fopenmp -pipe -Os -arch ppc -Wl,-headerpad_max_install_names -Wl,-rpath -Wl,/opt/local/lib/libgcc -arch ppc -o autodiff_benchmark autodiff_benchmark-autodiff_benchmark.o -L../adept/.libs -L/opt/local/lib /opt/local/var/macports/build/_opt_PPCRosettaPorts_math_adept2/adept2-devel/work/Adept-2-d9e83012618049bba8d1b9bd0954f60f1bc170a8/adept/.libs/libadept.a /opt/local/lib/libadolc.dylib -lopenblas -fopenmp
Undefined symbols:
"__ZTHN5adept21_stack_current_threadE", referenced from:
__ZN5adept6ActiveIdEaSIdNS_15ActiveReferenceIdEEEENS_8internal9enable_ifIXaasrT0_9is_activeeqsrS7_4rankLi0EERS1_E4typeERKNS_10ExpressionIT_S7_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEaSIdNS_15ActiveReferenceIdEEEENS_8internal9enable_ifIXaasrT0_9is_activeeqsrS7_4rankLi0EERS1_E4typeERKNS_10ExpressionIT_S7_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEaSIdNS_15ActiveReferenceIdEEEENS_8internal9enable_ifIXaasrT0_9is_activeeqsrS7_4rankLi0EERS1_E4typeERKNS_10ExpressionIT_S7_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEpLIdNS_8internal15BinaryOperationIdS1_NS3_8SubtractES1_EEEENS3_9enable_ifIXeqsrT0_4rankLi0EERS1_E4typeERKNS_10ExpressionIT_S8_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEpLIdNS_8internal15BinaryOperationIdS1_NS3_8SubtractES1_EEEENS3_9enable_ifIXeqsrT0_4rankLi0EERS1_E4typeERKNS_10ExpressionIT_S8_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEpLIdNS_8internal15BinaryOperationIdS1_NS3_8SubtractES1_EEEENS3_9enable_ifIXeqsrT0_4rankLi0EERS1_E4typeERKNS_10ExpressionIT_S8_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept15ActiveReferenceIdEaSERKS1_.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept15ActiveReferenceIdEaSERKS1_.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept15ActiveReferenceIdEaSERKS1_.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept15ActiveReferenceIdEaSIdEERS1_RKNS_6ActiveIT_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept15ActiveReferenceIdEaSIdEERS1_RKNS_6ActiveIT_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept15ActiveReferenceIdEaSIdEERS1_RKNS_6ActiveIT_EE.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEaSERKS1_.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEaSERKS1_.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEaSERKS1_.isra.0 in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdED1Ev in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept6ActiveIdEC4Ev in autodiff_benchmark-autodiff_benchmark.o
__Z12lax_wendroffIN5adept6ActiveIdEEdEviT0_PKT_PS4_ in autodiff_benchmark-autodiff_benchmark.o
__Z12lax_wendroffIN5adept6ActiveIdEEdEviT0_PKT_PS4_ in autodiff_benchmark-autodiff_benchmark.o
__Z12lax_wendroffIN5adept6ActiveIdEEdEviT0_PKT_PS4_ in autodiff_benchmark-autodiff_benchmark.o
__Z4toonIN5adept6ActiveIdEEdEviT0_PKT_PS4_ in autodiff_benchmark-autodiff_benchmark.o
__Z4toonIN5adept6ActiveIdEEdEviT0_PKT_PS4_ in autodiff_benchmark-autodiff_benchmark.o
__Z4toonIN5adept6ActiveIdEEdEviT0_PKT_PS4_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept7StorageIdE11remove_linkEv in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE6resizeEPKib in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ES1_EENS_8internal9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ES1_EENS_8internal9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ES1_EENS_8internal9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal18BinaryOpScalarLeftIddNS3_8MultiplyENS3_15BinaryOperationIdNS6_IdS1_NS3_3AddES1_EES7_NS4_IddS5_NS6_IdS1_NS3_8SubtractES1_EEEEEEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal18BinaryOpScalarLeftIddNS3_8MultiplyENS3_15BinaryOperationIdNS6_IdS1_NS3_3AddES1_EES7_NS4_IddS5_NS6_IdS1_NS3_8SubtractES1_EEEEEEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal18BinaryOpScalarLeftIddNS3_8MultiplyENS3_15BinaryOperationIdNS6_IdS1_NS3_3AddES1_EES7_NS4_IddS5_NS6_IdS1_NS3_8SubtractES1_EEEEEEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal7NoAliasIdNS3_15BinaryOperationIdS1_NS3_3AddENS5_IdS1_NS3_8SubtractES1_EEEEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal7NoAliasIdNS3_15BinaryOperationIdS1_NS3_3AddENS5_IdS1_NS3_8SubtractES1_EEEEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal7NoAliasIdNS3_15BinaryOperationIdS1_NS3_3AddENS5_IdS1_NS3_8SubtractES1_EEEEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal15BinaryOperationIdNS4_IdNS4_IdNS3_19BinaryOpScalarRightIdNS3_14UnaryOperationIdNS3_3ExpENS3_18BinaryOpScalarLeftIddNS3_8MultiplyENS6_IdNS3_3LogENS4_IdS1_NS3_6DivideES1_EEEEEEEENS3_8SubtractEdEES9_S1_EES9_S1_EESB_NS4_IdS1_SG_S1_EEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal15BinaryOperationIdNS4_IdNS4_IdNS3_19BinaryOpScalarRightIdNS3_14UnaryOperationIdNS3_3ExpENS3_18BinaryOpScalarLeftIddNS3_8MultiplyENS6_IdNS3_3LogENS4_IdS1_NS3_6DivideES1_EEEEEEEENS3_8SubtractEdEES9_S1_EES9_S1_EESB_NS4_IdS1_SG_S1_EEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept5ArrayILi1EdLb1EE18assign_expression_ILi1ELb1ELb1ENS_8internal15BinaryOperationIdNS4_IdNS4_IdNS3_19BinaryOpScalarRightIdNS3_14UnaryOperationIdNS3_3ExpENS3_18BinaryOpScalarLeftIddNS3_8MultiplyENS6_IdNS3_3LogENS4_IdS1_NS3_6DivideES1_EEEEEEEENS3_8SubtractEdEES9_S1_EES9_S1_EESB_NS4_IdS1_SG_S1_EEEEEENS3_9enable_ifIXaaT0_T1_EvE4typeET2_ in autodiff_benchmark-autodiff_benchmark.o
__ZN19AdeptDifferentiator7adjointE13TestAlgorithmRKSt6vectorIdSaIdEERS3_S5_S6_ in autodiff_benchmark-autodiff_benchmark.o
__ZN19AdeptDifferentiator7adjointE13TestAlgorithmRKSt6vectorIdSaIdEERS3_S5_S6_ in autodiff_benchmark-autodiff_benchmark.o
__ZTHN5adept21_stack_current_threadE$non_lazy_ptr in autodiff_benchmark-autodiff_benchmark.o
__ZN5adept7StorageIdE11remove_linkEv in libadept.a(libadept_la-jacobian.o)
__ZTHN5adept21_stack_current_threadE$non_lazy_ptr in libadept.a(libadept_la-jacobian.o)
(maybe you meant: __ZTHN5adept21_stack_current_threadE$non_lazy_ptr)
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
These have nothing to do with adept
, and should be fixed in next version, hopefully: https://github.com/iains/darwin-toolchains-start-here/discussions/41
Using gcc11
, that is gone, but <cstddef>
header missing:
In file included from test_no_lib.cpp:18:
../include/adept_source.h: In function 'int adept::internal::cpplapack_getri(int, float*, int, const int*)':
../include/adept_source.h:178:43: error: 'size_t' does not name a type
178 | std::vector<float> work(static_cast<size_t>(lwork));
| ^~~~~~
../include/adept_source.h:115:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
114 | #include <vector>
+++ |+#include <cstddef>
115 |
../include/adept_source.h: In function 'int adept::internal::cpplapack_getri(int, double*, int, const int*)':
../include/adept_source.h:191:44: error: 'size_t' does not name a type
191 | std::vector<double> work(static_cast<size_t>(lwork));
| ^~~~~~
../include/adept_source.h:191:44: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
../include/adept_source.h: In function 'int adept::internal::cpplapack_sytrf(char, int, float*, int, int*)':
../include/adept_source.h:206:43: error: 'size_t' does not name a type
206 | std::vector<float> work(static_cast<size_t>(lwork));
| ^~~~~~
../include/adept_source.h:206:43: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
../include/adept_source.h: In function 'int adept::internal::cpplapack_sytrf(char, int, double*, int, int*)':
../include/adept_source.h:219:44: error: 'size_t' does not name a type
219 | std::vector<double> work(static_cast<size_t>(lwork));
| ^~~~~~
../include/adept_source.h:219:44: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
../include/adept_source.h: In function 'int adept::internal::cpplapack_sysv(char, int, int, float*, int, int*, float*, int)':
../include/adept_source.h:267:43: error: 'size_t' does not name a type
267 | std::vector<float> work(static_cast<size_t>(lwork));
| ^~~~~~
../include/adept_source.h:267:43: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
../include/adept_source.h: In function 'int adept::internal::cpplapack_sysv(char, int, int, double*, int, int*, double*, int)':
../include/adept_source.h:281:44: error: 'size_t' does not name a type
281 | std::vector<double> work(static_cast<size_t>(lwork));
| ^~~~~~
../include/adept_source.h:281:44: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
make[1]: *** [test_no_lib.o] Error 1
make: *** [check-recursive] Error 1
@rjhogan Perhaps rather <stddef.h>
needed and not <cstddef>
? Old compilers may not support the latter, I guess. But one of these.
With <cstddef>
added to suggested spot in adept_source.h
and using gcc11
to build, 100% of tests pass on 10.6.8 ppc32:
test_adept... PASSED
test_adept_with_and_without_ad... PASSED
test_radiances... PASSED
test_gsl_interface... PASSED
test_misc... PASSED
test_checkpoint... PASSED
test_thread_safe... PASSED
test_array_speed... PASSED
test_no_lib... PASSED
test_radiances_array... PASSED
test_constructors... PASSED
test_arrays... PASSED
test_arrays_active... PASSED
test_arrays_active_pausable... PASSED
test_fixed_arrays... PASSED
test_fixed_arrays_active... PASSED
test_derivatives... PASSED
test_array_derivatives... PASSED
test_thread_safe_arrays... PASSED
test_complex_arrays... PASSED
test_packet_operations... PASSED
test_fastexp... PASSED
test_reduce_active... PASSED
test_minimizer... PASSED
All test programs ran successfully
@rjhogan So the only remaining issue is missing header in adept_source.h
: should be somehow added into create_adept_source_header
.
Issue more that size_t in cpplapack.h was not prefixed by std:: - try the latest push
All good now, thanks again!
Tests also fail to build with
gcc12
: