#### Got it working I think?

Jon Macey <jma...@...>

Building on Mac OS X (Darwin)

seems to work and run but when I try most of the tests it seems to
fail with a bus error

For example (geomath) edit run.py to work with my local paths

geomath]\$./run.py
test.osl:0: warning: Unable to find "/usr/shaders"
sh: line 1: 31148 Bus error testshade -g 2 2 test >>
out.txt
FAIL

however out.txt

Compiled test.osl -> test.oso
hypot (3, 4) = 5
hypot (3, 4, 5) = 7.07107
reflect (0.447214 -0.894427 0, 0 1 0) = 0.447214 0.894427 0
reflect (0.447214 -0.894427 0, -1 0 0) = -0.447214 -0.894427 0
testing total-internal reflection:
refract (0.707107 -0.707107 0, 0 1 0, 1.42) = 0 0 0
frensel: Kr= 1 Kt = 0 R = 0.707107 0.707107 0 T = 0 0 0
testing regular refraction:
refract (-0.436436 -0.218218 -0.872872, 0.267261 0.534522 0.801784,
0.862069) = -0.415346 -0.266336 -0.869801
--> verify refract(): 1/1.16 = sin(18.0549)/sin(21.0705) =>
0.862069 ?= 0.862068
fresnel: Kr= 0.00557254 Kt = 0.739022 R = 0.0623479 0.779349
0.623479 T = -0.415346 -0.266336 -0.869801
--> verify fresnel(): 1/1.16 = sin(18.0549)/sin(21.0705) =>
0.862069 ?= 0.862068
Varying:
hypot (0, 0) = 0
hypot (1, 0) = 1
hypot (0, 1) = 1
hypot (1, 1) = 1.41421
hypot (0, 0, 0) = 0
hypot (1, 0, 1) = 1.41421
hypot (0, 1, 1) = 1.41421
hypot (1, 1, 2) = 2.44949
reflect (0 -1 0, 0 1 0) = 0 1 0
reflect (0.447214 -0.894427 0, 0 1 0) = 0.447214 0.894427 0
reflect (0 -1 0, 0.707107 0.707107 0) = 1 -5.96046e-08 0
reflect (0.447214 -0.894427 0, 0.707107 0.707107 0) = 0.894427
-0.447214 0
refract (0.408248 -0.408248 -0.816497, 0 0 1, 0.75188) = 0.306954
-0.306954 -0.900866
refract (0.801784 -0.267261 -0.534522, 0 0 1, 0.75188) = 0.602845
-0.200948 -0.772138
refract (0.408248 0.408248 -0.816497, 0 0 1, 0.75188) = 0.306954
0.306954 -0.900866
refract (0.801784 0.267261 -0.534522, 0 0 1, 0.75188) = 0.602845
0.200948 -0.772138
--> verify refract(): 1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify refract(): 1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
--> verify refract(): 1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify refract(): 1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
fresnel() -> Kr= 0.0222824 Kt = 0.552726 R = 0 0 0 T = 0.306954
-0.306954 -0.900866
fresnel() -> Kr= 0.0505776 Kt = 0.53673 R = 0 0 0 T = 0.602845
-0.200948 -0.772138
fresnel() -> Kr= 0.0222824 Kt = 0.552726 R = 0 0 0 T = 0.306954
0.306954 -0.900866
fresnel() -> Kr= 0.0505776 Kt = 0.53673 R = 0 0 0 T = 0.602845
0.200948 -0.772138
--> verify fresnel(): 1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify fresnel(): 1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
--> verify fresnel(): 1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify fresnel(): 1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188

which is the same as the ref

Also had to do a couple of hacks in the oiio ivgl.cpp file to cast the
std::max and std::clamp functions to get it all to compile

I will play with the rest of the tests and see what happens

Cheers

Jon

Jon Macey <jma...@...>

I've just run it in gdb and got the following

(gdb) up
#1 0x00009608 in main ()

not familiar with the source yet so will investigate more

On Jan 12, 7:17 pm, Jon Macey <j...@...> wrote:
Building on Mac OS X (Darwin)

seems to work and run but when I try most of the tests it seems to
fail with a bus error

For example (geomath) edit run.py to work with my local paths

geomath]\$./run.py
test.osl:0: warning: Unable to find "/usr/shaders"
sh: line 1: 31148 Bus error               testshade -g 2 2 test >>
out.txt
FAIL

however out.txt

Compiled test.osl -> test.oso
hypot (3, 4) = 5
hypot (3, 4, 5) = 7.07107
reflect (0.447214 -0.894427 0, 0 1 0) =  0.447214 0.894427 0
reflect (0.447214 -0.894427 0, -1 0 0) =  -0.447214 -0.894427 0
testing total-internal reflection:
refract (0.707107 -0.707107 0, 0 1 0, 1.42) =  0 0 0
frensel:  Kr= 1  Kt = 0  R = 0.707107 0.707107 0  T = 0 0 0
testing regular refraction:
refract (-0.436436 -0.218218 -0.872872, 0.267261 0.534522 0.801784,
0.862069) =  -0.415346 -0.266336 -0.869801
--> verify refract():  1/1.16 = sin(18.0549)/sin(21.0705) =>
0.862069 ?= 0.862068
fresnel:  Kr= 0.00557254  Kt = 0.739022  R = 0.0623479 0.779349
0.623479  T = -0.415346 -0.266336 -0.869801
--> verify fresnel():  1/1.16 = sin(18.0549)/sin(21.0705) =>
0.862069 ?= 0.862068
Varying:
hypot (0, 0) = 0
hypot (1, 0) = 1
hypot (0, 1) = 1
hypot (1, 1) = 1.41421
hypot (0, 0, 0) = 0
hypot (1, 0, 1) = 1.41421
hypot (0, 1, 1) = 1.41421
hypot (1, 1, 2) = 2.44949
reflect (0 -1 0, 0 1 0) =  0 1 0
reflect (0.447214 -0.894427 0, 0 1 0) =  0.447214 0.894427 0
reflect (0 -1 0, 0.707107 0.707107 0) =  1 -5.96046e-08 0
reflect (0.447214 -0.894427 0, 0.707107 0.707107 0) =  0.894427
-0.447214 0
refract (0.408248 -0.408248 -0.816497, 0 0 1, 0.75188) =  0.306954
-0.306954 -0.900866
refract (0.801784 -0.267261 -0.534522, 0 0 1, 0.75188) =  0.602845
-0.200948 -0.772138
refract (0.408248 0.408248 -0.816497, 0 0 1, 0.75188) =  0.306954
0.306954 -0.900866
refract (0.801784 0.267261 -0.534522, 0 0 1, 0.75188) =  0.602845
0.200948 -0.772138
--> verify refract():  1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify refract():  1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
--> verify refract():  1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify refract():  1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
fresnel() -> Kr= 0.0222824  Kt = 0.552726  R = 0 0 0  T = 0.306954
-0.306954 -0.900866
fresnel() -> Kr= 0.0505776  Kt = 0.53673  R = 0 0 0  T = 0.602845
-0.200948 -0.772138
fresnel() -> Kr= 0.0222824  Kt = 0.552726  R = 0 0 0  T = 0.306954
0.306954 -0.900866
fresnel() -> Kr= 0.0505776  Kt = 0.53673  R = 0 0 0  T = 0.602845
0.200948 -0.772138
--> verify fresnel():  1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify fresnel():  1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
--> verify fresnel():  1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify fresnel():  1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188

which is the same as the ref

Also had to do a couple of hacks in the oiio ivgl.cpp file to cast the
std::max and std::clamp functions to get it all to compile

I will play with the rest of the tests and see what happens

Cheers

Jon

Larry Gritz <l...@...>

The "run.py" script takes arguments (which are passed when the testsuite is run). You want:

cd testsuite/YOURTEST
./run.py . ../../build/ARCH

(ARCH in your case is "macosx")

Does that help? If not, can you do a 'make debug' and see if you can figure out the line where it's crashing?

-- lg

On Jan 12, 2010, at 11:17 AM, Jon Macey wrote:

Building on Mac OS X (Darwin)

seems to work and run but when I try most of the tests it seems to
fail with a bus error

For example (geomath) edit run.py to work with my local paths

geomath]\$./run.py
test.osl:0: warning: Unable to find "/usr/shaders"
sh: line 1: 31148 Bus error testshade -g 2 2 test >>
out.txt
FAIL

however out.txt

Compiled test.osl -> test.oso
hypot (3, 4) = 5
hypot (3, 4, 5) = 7.07107
reflect (0.447214 -0.894427 0, 0 1 0) = 0.447214 0.894427 0
reflect (0.447214 -0.894427 0, -1 0 0) = -0.447214 -0.894427 0
testing total-internal reflection:
refract (0.707107 -0.707107 0, 0 1 0, 1.42) = 0 0 0
frensel: Kr= 1 Kt = 0 R = 0.707107 0.707107 0 T = 0 0 0
testing regular refraction:
refract (-0.436436 -0.218218 -0.872872, 0.267261 0.534522 0.801784,
0.862069) = -0.415346 -0.266336 -0.869801
--> verify refract(): 1/1.16 = sin(18.0549)/sin(21.0705) =>
0.862069 ?= 0.862068
fresnel: Kr= 0.00557254 Kt = 0.739022 R = 0.0623479 0.779349
0.623479 T = -0.415346 -0.266336 -0.869801
--> verify fresnel(): 1/1.16 = sin(18.0549)/sin(21.0705) =>
0.862069 ?= 0.862068
Varying:
hypot (0, 0) = 0
hypot (1, 0) = 1
hypot (0, 1) = 1
hypot (1, 1) = 1.41421
hypot (0, 0, 0) = 0
hypot (1, 0, 1) = 1.41421
hypot (0, 1, 1) = 1.41421
hypot (1, 1, 2) = 2.44949
reflect (0 -1 0, 0 1 0) = 0 1 0
reflect (0.447214 -0.894427 0, 0 1 0) = 0.447214 0.894427 0
reflect (0 -1 0, 0.707107 0.707107 0) = 1 -5.96046e-08 0
reflect (0.447214 -0.894427 0, 0.707107 0.707107 0) = 0.894427
-0.447214 0
refract (0.408248 -0.408248 -0.816497, 0 0 1, 0.75188) = 0.306954
-0.306954 -0.900866
refract (0.801784 -0.267261 -0.534522, 0 0 1, 0.75188) = 0.602845
-0.200948 -0.772138
refract (0.408248 0.408248 -0.816497, 0 0 1, 0.75188) = 0.306954
0.306954 -0.900866
refract (0.801784 0.267261 -0.534522, 0 0 1, 0.75188) = 0.602845
0.200948 -0.772138
--> verify refract(): 1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify refract(): 1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
--> verify refract(): 1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify refract(): 1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
fresnel() -> Kr= 0.0222824 Kt = 0.552726 R = 0 0 0 T = 0.306954
-0.306954 -0.900866
fresnel() -> Kr= 0.0505776 Kt = 0.53673 R = 0 0 0 T = 0.602845
-0.200948 -0.772138
fresnel() -> Kr= 0.0222824 Kt = 0.552726 R = 0 0 0 T = 0.306954
0.306954 -0.900866
fresnel() -> Kr= 0.0505776 Kt = 0.53673 R = 0 0 0 T = 0.602845
0.200948 -0.772138
--> verify fresnel(): 1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify fresnel(): 1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
--> verify fresnel(): 1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify fresnel(): 1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188

which is the same as the ref

Also had to do a couple of hacks in the oiio ivgl.cpp file to cast the
std::max and std::clamp functions to get it all to compile

I will play with the rest of the tests and see what happens

Cheers

Jon
--
You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To post to this group, send email to osl...@....
To unsubscribe from this group, send email to osl...@....
For more options, visit this group at http://groups.google.com/group/osl-dev?hl=en.

--
Larry Gritz
l...@...

Jon Macey <jma...@...>

still getting the fails,

If I do a make debug I get loads of boost Undefined symbols: errors
(for example)

Undefined symbols:
"boost::detail::get_tss_data(void const*)", referenced from:

"boost::detail::set_tss_data(void const*,
boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)",
referenced from:

and

Undefined symbols:
"boost::filesystem::detail::status_api(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
boost::system::error_code&)", referenced from:

boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> >, bool>::type
boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> >
(boost::filesystem::basic_path<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::filesystem::path_traits> const&)in oslcomp.cpp.o

Will need to check my boost install and get back to you (tomorrow now)
as the non debug version compile fine

Cheers

Jon

On Jan 12, 7:35 pm, Larry Gritz <l...@...> wrote:
The "run.py" script takes arguments (which are passed when the testsuite is run).  You want:

cd testsuite/YOURTEST
./run.py . ../../build/ARCH

(ARCH in your case is "macosx")

Does that help?  If not, can you do a 'make debug' and see if you can figure out the line where it's crashing?

-- lg

On Jan 12, 2010, at 11:17 AM, Jon Macey wrote:

Building on Mac OS X (Darwin)
seems to work and run but when I try most of the tests it seems to
fail with a bus error
For example (geomath) edit run.py to work with my local paths
geomath]\$./run.py
test.osl:0: warning: Unable to find "/usr/shaders"
sh: line 1: 31148 Bus error               testshade -g 2 2 test >>
out.txt
FAIL
however out.txt
Compiled test.osl -> test.oso
hypot (3, 4) = 5
hypot (3, 4, 5) = 7.07107
reflect (0.447214 -0.894427 0, 0 1 0) =  0.447214 0.894427 0
reflect (0.447214 -0.894427 0, -1 0 0) =  -0.447214 -0.894427 0
testing total-internal reflection:
refract (0.707107 -0.707107 0, 0 1 0, 1.42) =  0 0 0
frensel:  Kr= 1  Kt = 0  R = 0.707107 0.707107 0  T = 0 0 0
testing regular refraction:
refract (-0.436436 -0.218218 -0.872872, 0.267261 0.534522 0.801784,
0.862069) =  -0.415346 -0.266336 -0.869801
--> verify refract():  1/1.16 = sin(18.0549)/sin(21.0705) =>
0.862069 ?= 0.862068
fresnel:  Kr= 0.00557254  Kt = 0.739022  R = 0.0623479 0.779349
0.623479  T = -0.415346 -0.266336 -0.869801
--> verify fresnel():  1/1.16 = sin(18.0549)/sin(21.0705) =>
0.862069 ?= 0.862068
Varying:
hypot (0, 0) = 0
hypot (1, 0) = 1
hypot (0, 1) = 1
hypot (1, 1) = 1.41421
hypot (0, 0, 0) = 0
hypot (1, 0, 1) = 1.41421
hypot (0, 1, 1) = 1.41421
hypot (1, 1, 2) = 2.44949
reflect (0 -1 0, 0 1 0) =  0 1 0
reflect (0.447214 -0.894427 0, 0 1 0) =  0.447214 0.894427 0
reflect (0 -1 0, 0.707107 0.707107 0) =  1 -5.96046e-08 0
reflect (0.447214 -0.894427 0, 0.707107 0.707107 0) =  0.894427
-0.447214 0
refract (0.408248 -0.408248 -0.816497, 0 0 1, 0.75188) =  0.306954
-0.306954 -0.900866
refract (0.801784 -0.267261 -0.534522, 0 0 1, 0.75188) =  0.602845
-0.200948 -0.772138
refract (0.408248 0.408248 -0.816497, 0 0 1, 0.75188) =  0.306954
0.306954 -0.900866
refract (0.801784 0.267261 -0.534522, 0 0 1, 0.75188) =  0.602845
0.200948 -0.772138
--> verify refract():  1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify refract():  1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
--> verify refract():  1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify refract():  1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
fresnel() -> Kr= 0.0222824  Kt = 0.552726  R = 0 0 0  T = 0.306954
-0.306954 -0.900866
fresnel() -> Kr= 0.0505776  Kt = 0.53673  R = 0 0 0  T = 0.602845
-0.200948 -0.772138
fresnel() -> Kr= 0.0222824  Kt = 0.552726  R = 0 0 0  T = 0.306954
0.306954 -0.900866
fresnel() -> Kr= 0.0505776  Kt = 0.53673  R = 0 0 0  T = 0.602845
0.200948 -0.772138
--> verify fresnel():  1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify fresnel():  1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
--> verify fresnel():  1/1.33 = sin(25.7279)/sin(35.2644) =>
0.75188 ?= 0.75188
--> verify fresnel():  1/1.33 = sin(39.4537)/sin(57.6885) =>
0.75188 ?= 0.75188
which is the same as the ref
Also had to do a couple of hacks in the oiio ivgl.cpp file to cast the
std::max and std::clamp functions to get it all to compile
I will play with the rest of the tests and see what happens
Cheers
Jon
--
You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To post to this group, send email to osl...@....
To unsubscribe from this group, send email to osl...@....
For more options, visit this group athttp://groups.google.com/group/osl-dev?hl=en.
--
Larry Gritz
l...@...

 1 - 4 of 4