Looking in src/postamble.js, calledRun is only set to true when actually
running this code:

    ensureInitRuntime();

    preMain();

    if (Module['_main'] && shouldRunNow) {
      Module['callMain'](args);
    }

    postRun();

so if you do not throw in any of those (you would see an exception), or do
not define Module._main at a later time, this should work. (There is also
shouldRunNow, which unless you defined INVOKE_RUN or
Module['noInitialRun'], should not interfere here.) Hope that helps figure
out that issue.

Yes, for performance -O2 -g1 is needed.

- Alon



On Wed, Feb 12, 2014 at 7:22 AM, Chris <[email protected]> wrote:

> Fixed, but it wasn't actually the problem. For some reason
> Module.calledRun was true, so Module.run() did nothing. Setting it now
> manually false before the run.
> To the original problem: The -g1 version works now (index_alon.html),
> without asm.js errors but is ~100 times slower. I guess this is no use in
> determining why the speed loss occurred. Should I compile with -O2 and -g1 ?
>
> Thanks,
> Christian
>
>
>
> On Tuesday, February 11, 2014 7:32:03 PM UTC+1, Alon Zakai wrote:
>
>> I believe FS.unlink is what does that.
>>
>> - Alon
>>
>>
>>
>> On Tue, Feb 11, 2014 at 12:55 AM, Christian H <[email protected]> wrote:
>>
>>> ...just noticed that chrome does complain about FS.deleteFile() not
>>> found? How do I remove a file now?
>>>
>>> Cheers,
>>> C
>>>
>>>
>>> On Tue, Feb 11, 2014 at 9:50 AM, Christian H <[email protected]> wrote:
>>>
>>>> Hi Alon,
>>>> I did recompile with the latest emscripten, the one I compiled with was
>>>> not more than 2 months old. However, now I get nothing. I do see the asm.js
>>>> warnings, but no reaction to Module.run(), also no error (even within
>>>> worker triggering manually), the FS works, Module.print() works too. That
>>>> happens to all versions I compiled with -O2 or -g1. I prepared a site
>>>> loading the new (-g1) version:
>>>>
>>>> http://gaia.respawned.com/index_alon.html
>>>>
>>>> The bitcode is at
>>>> http://gaia.respawned.com/GaiaE.o
>>>>
>>>> You don't need to wait that long, it will run until TS 1000. The
>>>> performance line appears after TS 0.
>>>>
>>>> Thanks,
>>>> Christian
>>>>
>>>>
>>>> On Mon, Feb 10, 2014 at 10:17 PM, Alon Zakai <[email protected]> wrote:
>>>>
>>>>> Thanks. How long should this run? I waited until TS: 100 and it still
>>>>> keeps going it seems.
>>>>>
>>>>> I see an asm.js validation error in the log, this could be related to
>>>>> the performance problem. Was this compiled using latest emscripten? If so,
>>>>> can you make a whitespace-friendly build I could take a look at? emcc -g1
>>>>> will do that. (Even better is if you can provide the bitcode file, but not
>>>>> necessary.)
>>>>>
>>>>> - Alon
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Feb 10, 2014 at 11:13 AM, Chris <[email protected]> wrote:
>>>>>
>>>>>> Yes - you have to switch to the "Run"tab first. That is where the CFD
>>>>>> sim task is controlled, the gnuplot tasks may/should suffer from the same
>>>>>> problem.
>>>>>> The GFlops output comes after the first time step.
>>>>>>
>>>>>> Cheers,
>>>>>> C
>>>>>>
>>>>>>
>>>>>> On Monday, February 10, 2014 7:21:07 PM UTC+1, Alon Zakai wrote:
>>>>>>
>>>>>>> Does it print out the GFlops somewhere?
>>>>>>>
>>>>>>> All I see is "Execution took", which went from 1.628 to 2.172 when I
>>>>>>> reset.
>>>>>>>
>>>>>>> - Alon
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Feb 10, 2014 at 3:04 AM, Chris <[email protected]> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>> I ported a fluid simulation C++ code (command line program) with
>>>>>>>> emscripten and it works quite fantastic. I never thought JS could run 
>>>>>>>> that
>>>>>>>> efficiently.
>>>>>>>> However, to re-run my program I wrapped the compiled version in a
>>>>>>>> function (with pre/post.js) to reset its state. That usually worked 
>>>>>>>> nice,
>>>>>>>> but recently I get at first an awesome performance from FF (~0.3 native
>>>>>>>> speed!), but after a reset it suffers a drastic performance breakdown 
>>>>>>>> of a
>>>>>>>> factor of 20.
>>>>>>>>
>>>>>>>> The site is http://gaia.respawned.com
>>>>>>>>
>>>>>>>> You can observe it just by clicking "Run" in the Run tab, the
>>>>>>>> sparse matrix mul+add performance is measured thoroughly. At first run:
>>>>>>>> Performance (mul+add): 0.377445 GFlops
>>>>>>>>
>>>>>>>> After "Reset" (calling gaia_create() again in the worker):
>>>>>>>> Performance (mul+add): 0.0187213 GFlops
>>>>>>>>
>>>>>>>> On a recent Chrome I do not get a difference, always around 0.26
>>>>>>>> GFlops.
>>>>>>>>
>>>>>>>> Thanks for your help,
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> PS: Native gcc -O3 : 1.17 GFlops.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>  --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "emscripten-discuss" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>>
>>>>>>>
>>>>>>>  --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "emscripten-discuss" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>
>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "emscripten-discuss" group.
>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>>>> topic/emscripten-discuss/UFL7YRfvJQw/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> [email protected].
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to