How to do task-level parallelism in Windows?

I want to achieve better performance through parallelism. The
thread-level parallelism is not an option, because it is not really
parallel.

In Linux, kernel.fork makes it easy to achieve task level parallelism.

In windows, kernel.spawn seems to be the most closed equivalent.
However, it requires to specify the ruby.exe location and script
location explicitly, which may be not available at runtime.

Is there a better way to achieve task level parallelism in Windows?

On 05/10/2011 08:38 PM, Zd Yu wrote:

I want to achieve better performance through parallelism. The
thread-level parallelism is not an option, because it is not really
parallel.

Is jruby acceptable? Jruby threads do make use of multiple processors.

Joel VanderWerf wrote in post #997899:

On 05/10/2011 08:38 PM, Zd Yu wrote:

I want to achieve better performance through parallelism. The
thread-level parallelism is not an option, because it is not really
parallel.

Is jruby acceptable? Jruby threads do make use of multiple processors.

I need to use win32ole. I am afraid JRuby cannot do this.

On Tue, May 10, 2011 at 9:43 PM, Zd Yu [email protected] wrote:

Joel VanderWerf wrote in post #997899:

On 05/10/2011 08:38 PM, Zd Yu wrote:

I want to achieve better performance through parallelism. The
thread-level parallelism is not an option, because it is not really
parallel.

Is jruby acceptable? Jruby threads do make use of multiple processors.

I need to use win32ole. I am afraid JRuby cannot do this.

There is a jruby-win32ole gem – I haven’t used it, but it sounds like
it may do what you want.

Christopher D. wrote in post #997903:

On Tue, May 10, 2011 at 9:43 PM, Zd Yu [email protected] wrote:

Joel VanderWerf wrote in post #997899:

On 05/10/2011 08:38 PM, Zd Yu wrote:

I want to achieve better performance through parallelism. The
thread-level parallelism is not an option, because it is not really
parallel.

Is jruby acceptable? Jruby threads do make use of multiple processors.

I need to use win32ole. I am afraid JRuby cannot do this.

There is a jruby-win32ole gem – I haven’t used it, but it sounds like
it may do what you want.

I just tried it. It seems there are some compatible problems. My code
does not work with JRuby + jruby-win32ole, although it works well with
ruby + win32ole.

The error looks like:

Dispatch.java:-2:in `invokev’: org.racob.com.ComFailException: Invoke
of: Find
Source:
Description:

    from Dispatch.java:243:in `invokev'
    from Dispatch.java:187:in `callN'
    from RubyWIN32OLE.java:203:in `invokeMethodOrGet'
    from RubyWIN32OLE.java:112:in `method_missing'
    from RubyWIN32OLE$i$0$0$method_missing.gen:65535:in `call'
    from JavaMethod.java:642:in `call'
    from RuntimeHelpers.java:497:in `call'
    from CachingCallSite.java:345:in `callMethodMissing'
    from CachingCallSite.java:249:in `cacheAndCall'
    from CachingCallSite.java:71:in `call'
    from C:\my_tool.rb:1362:in `method__98$RUBY$find'

my code: (Excel manipulation)

keys = @workbook.Worksheets(“sheet name”).Range( “A1” ).EntireRow

current = keys.Find( value,
nil,
WIN32OLE::XlValues,
WIN32OLE::XlPart,
WIN32OLE::XlByColumns,
WIN32OLE::XlNext,
false,
false,
false )

==================
it seems the ‘Find’ method cannot be invoked.

Yes, ge ridden of windows.

2011/5/11 Zd Yu [email protected]

I need to use win32ole. I am afraid JRuby cannot do this.
Dispatch.java:-2:in invokev': org.racob.com.ComFailException: Invoke from RuntimeHelpers.java:497:in call’
current = keys.Find( value,
==================
it seems the ‘Find’ method cannot be invoked.


Posted via http://www.ruby-forum.com/.


Analista de Sistemas http://birthdays.causes.com/wishes/87999
MBA em Logística, Mobilização e Meio Ambiente/GETRAM – Gerência
Executiva
de Transportes e Mobilização

*
*
Provedor de Serviços na InterNet

Atenção: Esta carta pode conter anexos no formato ODF (Open Document
Format
)/ABNT (extensões odt, ods, odp, odb, odg). Antes de
pedir os anexos em outro formato, você pode instalar gratuita e
livremente
o BrOffice (http://www.broffice.org) ou o seguinte Aditivo para
Microsoft
Office (R) (Hardware | Oracle).

Contato em [email protected]
*
Participe http://www.institutofederalista.com/debate/ do
IF
D*Fhttp://www.institutofederalista.com/ifdf/
.

Você sabe o que é a SUA
liberdadehttp://www.jonathangullible.com/mmedia/PoL.Portuguese.A.Filosofia.da.Liberdade.swf
?

Participe da Comunidade dos Profissionais
Liberais
http://CLPLBR.WordPress.com/ na
InterNet
*

» Jornal ACORDA BRASIL http://www.jornalacordabrasil.com.br/ -
liberdade, desenvolvimento e política.

» Ponto Crítico http://www.pontocritico.com/ - e-jornalismo
brasileiro, em
edições diárias.

» Instituto Liberal do Rio de Janeiro
http://www.institutoliberal.org.br/ -
Se você acha que neoliberalismo e liberalismo são a mesma coisa, é
melhor
visitar esse endereço.
» Instituto Liberdade http://www.il-rs.org.br/ » The Federalist
Patriothttp://www.federalist.com/
» Banco de Dados http://www.georgetown.edu/pdba Políticos das
Américas

» Meira Penna http://www.meirapenna.org/ - Um dos mais eminentes
pensadores liberais do País, respeitado internacionalmente.

» Você acha o voto eletrônico seguro? Se sim, melhor conhecer estes
argumentos
técnicos http://www.votoseguro.org/

» Pro Ratio Libertas http://www.rplib.com.br/ - estudos sobre a
Liberdade,
Cidadania e Sociedade

» Sobre Economia, visite a Fundação Regional de
Economiahttp://www.funre.org/ de Santa
Maria/RS

»
Impostoshttp://www.ibpt.com.br/content/estudos/CARGA%20TRIBUT�RIA%201�%20TRIMESTRE%202004.pdf:
constatação de como se pratica a concentração de renda por aqueles que
falam
em distribuição de renda…

» Jornalista Diego Casagrande http://www.diegocasagrande.com.br/: Um
site
com uma excelente visão crítica sobre a política e economia nacional.

» Polêmico, ousado, conhecimento invejável,
Olavohttp://olavodecarvalho.org/ de
Carvalho deve ser lido por quem quer ver além das linhas da imprensa e
dos
movimentos políticos.

» Landell de Moura http://www.rlandell.hpg.ig.com.br/ - Conheça um
grande
brasileiro, que não entrou para a História mundial por
causa de…brasileiros.

» Quer ver a mídia nua em pelo? Midia Sem
Máscarahttp://www.midiasemmascara.org/

» Se você quer saber como se faz uma “obra faraônica” sem um centavo dos
cofres públicos, conheça a Chesapeak Bay
http://www.cbbt.com/http://pensadoresbrasileiros.home.comcast.net/filosofia_liberdade.html

» Nunca leu o livro "O Caminho da Servidão" de Friederich Hayeck? O
livro
é imperdível mas pode começar lendo um ótimo e animado
resumohttp://pensadoresbrasileiros.home.comcast.net/caminhoservidao/index.html
.

Você acredita em
profeciashttp://www.youtube.com/watch?v=xSbnBhASTtQ&feature=related
?

O abôrto é
evangélicohttp://veja.abril.com.br/blog/reinaldo/geral/dilma-vai-se-enrolando-na-teia-que-os-proprios-petistas-teceram-ou-por-que-os-petistas-nao-dizem-simplesmente-a-verdade/
?

Um País é feito de homens e
livroshttp://www.youtube.com/watch?v=El9ujoIe1QM.
“Monteiro Lobato”
… mas êle é de “direita” … né?

A
energiahttp://revistaepoca.globo.com/Revista/Epoca/0,,EMI179908-18176,00-COM+A+BENCAO+DE+CARDEAL.html
e
a
honestidadehttp://revistaepoca.globo.com/Revista/Epoca/0,,EMI179908-18176,00-COM+A+BENCAO+DE+CARDEAL.html
de
Dilmahttp://gentedecente.com.br/notic/brasil/politica/1787-agora-nao-tem-ere-e-direto-com-dona-dilma.html
.

A dignidade de Dilma!

[image: Dilmaldade.png]

On Wed, May 11, 2011 at 2:42 AM, Zd Yu [email protected] wrote:

I just tried it. It seems there are some compatible problems. My code
does not work with JRuby + jruby-win32ole, although it works well with
ruby + win32ole.

Please report this bug at http://bugs.jruby.org. We intend for
jruby-win32ole to be 100% compatible with MRI win32ole, and we would
like to fix this. Thank you!

  • Charlie

Charles Nutter wrote in post #998732:

On Wed, May 11, 2011 at 2:42 AM, Zd Yu [email protected] wrote:

I just tried it. It seems there are some compatible problems. My code
does not work with JRuby + jruby-win32ole, although it works well with
ruby + win32ole.

Please report this bug at http://bugs.jruby.org. We intend for
jruby-win32ole to be 100% compatible with MRI win32ole, and we would
like to fix this. Thank you!

  • Charlie

I have filed a bug to jruby-win32ole@github:

On Sun, May 15, 2011 at 7:58 PM, Zd Yu [email protected] wrote:

I have filed a bug to jruby-win32ole@github:
Compatability issue? · Issue #3 · enebo/jruby-win32ole · GitHub

Thank you! Hopefully Tom will be able to look into it some time soon
(with RailsConf this week, it may be a bit).

  • Charlie