IGI combiner utility with source code

General questions about Indigo, the scene format, rendering etc...
Post Reply
11 posts • Page 1 of 1
mgix
Posts: 12
Joined: Thu Jun 26, 2008 10:35 am

IGI combiner utility with source code

Post by mgix » Fri Feb 13, 2009 9:12 am

I have hit a scalability glass ceiling with the current Indigo network
rendering model for (sadly, master explodes past ~600 slaves, and
even when it doesn't, it becomes the bottleneck).

This has reduced me to have each "slave" dump IGIs to local disk,
collect them via scp and "manually" accumulate them into one final IGI.

To perform the final accumulation step, I wrote a litte tool that I thought
others might find useful.

There already is a tool that does this somewhere else in the forums, but
since I don't use windows and since the other tool that does has no source
code attached, I went a rewrote one myself.

It should work with recent IGIs (version 4, with layers).

Source code is here:

http://www.mgix.com/snippets/igiacc.cpp

Compile with:

Code: Select all

g++ -g0 -O3 -fomit-frame-pointer -o igiacc igiacc.cpp
Windows binary is here:

http://www.mgix.com/snippets/igiacc.exe.bz2

Use as follows:

Code: Select all

igiacc *.igi
Enjoy,

- Mgix
Last edited by mgix on Tue Feb 17, 2009 11:54 am, edited 3 times in total.

User avatar
PureSpider
Posts: 1459
Joined: Tue Apr 08, 2008 9:37 am
Location: Karlsruhe, BW, Germany
Contact:

Post by PureSpider » Fri Feb 13, 2009 9:24 am

Does this compile on windows?

mgix
Posts: 12
Joined: Thu Jun 26, 2008 10:35 am

Post by mgix » Fri Feb 13, 2009 9:37 am

PureSpider wrote:Does this compile on windows?

Now it does.
Last edited by mgix on Tue Feb 17, 2009 11:55 am, edited 1 time in total.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Fri Feb 13, 2009 9:39 am

Your contribution is much apreciated mgix... necessity is the mother of all innovations ;)

You can find the equivalent for windows, from dougal2:

http://www.indigorenderer.com/joomla/fo ... t=igimerge
obsolete asset

User avatar
SATtva_
1st Place Winner
Posts: 179
Joined: Sat Sep 27, 2008 6:44 am
Location: Russia, Siberia
Contact:

Post by SATtva_ » Fri Feb 13, 2009 11:34 pm

mgix, I have trouble compiling it under amd64 with both GCC 3.4:

Code: Select all

/tmp/ccoQbIYZ.o:(.gnu.linkonce.d.DW.ref.__gxx_personality_v0+0x0): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
...and 4.1/4.2:

Code: Select all

/tmp/ccxKzTLI.o: In function `isBigEndian()':
igiacc.cpp:(.text+0x26): undefined reference to `__cxa_guard_acquire'
igiacc.cpp:(.text+0x42): undefined reference to `__cxa_guard_release'
/tmp/ccxKzTLI.o: In function `main':
igiacc.cpp:(.text+0x406): undefined reference to `__cxa_guard_acquire'
igiacc.cpp:(.text+0x42b): undefined reference to `__cxa_guard_acquire'
igiacc.cpp:(.text+0x44b): undefined reference to `__cxa_guard_release'
igiacc.cpp:(.text+0x45a): undefined reference to `__cxa_guard_acquire'
igiacc.cpp:(.text+0x47a): undefined reference to `__cxa_guard_release'
igiacc.cpp:(.text+0x4d4): undefined reference to `__cxa_guard_release'
igiacc.cpp:(.text+0x54a): undefined reference to `__cxa_guard_acquire'
igiacc.cpp:(.text+0x56a): undefined reference to `__cxa_guard_release'
igiacc.cpp:(.text+0x579): undefined reference to `__cxa_guard_acquire'
igiacc.cpp:(.text+0x599): undefined reference to `__cxa_guard_release'
igiacc.cpp:(.text+0x5b7): undefined reference to `__cxa_guard_acquire'
igiacc.cpp:(.text+0x5d7): undefined reference to `__cxa_guard_release'
igiacc.cpp:(.text+0x683): undefined reference to `__cxa_guard_acquire'
igiacc.cpp:(.text+0x69f): undefined reference to `__cxa_guard_release'
/tmp/ccxKzTLI.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Any assumptions or prerequisites I failed to met?

mgix
Posts: 12
Joined: Thu Jun 26, 2008 10:35 am

Post by mgix » Sat Feb 14, 2009 12:32 am

SATtva_ wrote:mgix, I have trouble compiling it under amd64
Any assumptions or prerequisites I failed to met?
No, I just wrote my post too hastily.

The correct command line to compile should read 'g++' instead of 'gcc'.

I'll go correct my post now.

Cheers

User avatar
SATtva_
1st Place Winner
Posts: 179
Joined: Sat Sep 27, 2008 6:44 am
Location: Russia, Siberia
Contact:

Post by SATtva_ » Sat Feb 14, 2009 12:46 am

:D

Yeah, this makes much difference. =)

User avatar
OnoSendai
Developer
Posts: 6244
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Sat Feb 14, 2009 2:40 pm

Hi Mgix,
I've updated the IGI spec here:
http://www.indigorenderer.com/joomla/fo ... sc&start=0

mgix
Posts: 12
Joined: Thu Jun 26, 2008 10:35 am

Post by mgix » Tue Feb 17, 2009 10:39 am

OnoSendai wrote:Hi Mgix,
I've updated the IGI spec here:
http://www.indigorenderer.com/joomla/fo ... sc&start=0
Hey Ono,

Thanks for taking the time to update the specs, but ...
if you happen to have time, a little more is needed :)

Because the compiler is free to align and pad things any way it
chooses, only giving a C++ class layout isn't enough: it makes
your spec compiler dependent.

As a practical example of what I mean, gcc and VC++ currently
have different ideas of what sizeof(IndigoImageHeader) version 4 is.

I copied the class code verbatim from your spec into a small c++
program, and ...

With GCC: sizeof(IndigoImageHeader) is 5028
With VC++: sizeof(IndigoImageHeader) is 5032

Which is the correct answer ?
Does the image data start at offset 5032 or at offset 5028 ?

It could potentially be inferred from the overall size of the file
and the spec'd size of the pixel data, but I don't think that'd be
a very nice thing to have to rely on.

Also, if you do rely on sizeof(IndigoImageHeader) inside indigo's code
when writing out IGIs, your format will not be stable across platforms,
compilers or even different releases of the same compiler ...

mgix
Posts: 12
Joined: Thu Jun 26, 2008 10:35 am

Post by mgix » Tue Feb 17, 2009 11:56 am

Update: to answer the plea of the pour souls still stuck with windows,
I have ported igiacc. I've also added a link to a binary in the original
post.

User avatar
OnoSendai
Developer
Posts: 6244
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Thu Feb 19, 2009 3:18 pm

mgix wrote:
OnoSendai wrote:Hi Mgix,
I've updated the IGI spec here:
http://www.indigorenderer.com/joomla/fo ... sc&start=0
Hey Ono,

Thanks for taking the time to update the specs, but ...
if you happen to have time, a little more is needed :)
You are of course quite right mgix. I've updated the IGI spec to add another 4 bytes to the padding, to reflect the size of the structure that VS was producing. I've also added a more explicit description of the padding, or lack thereof, that should be expected on disk.
Sorry about that!

Post Reply
11 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 95 guests