hi Ife,
thanks for reporting this. I was able to retrieve both of your problematic simulations using the provided job IDs, and here is what I found:
1. for your first job (using pattern source), although the mcx
docker image used in the backend of mcxcloud does support pattern
source, the front-end of mcxcloud - i.e. the in-browser json
editor, however, does not currently support this input JSON field.
the mcxcloud javascript uses JSON schema to define what it allows
users to use, here is the JSON schema for the supported
"Optode.Source" field:
https://github.com/fangq/mcx/blob/v2023/mcxcloud/frontend/index.html#L767-L870
as you can see, the "Pattern" field is not defined here. so, when you paste your locally generated JSON file to the editor, and click the "Update Form", the editor will automatically remove this field as it is not defined in the schema.
To fix this, I will need to define the schema for this data
field, which is possible. Give me some time and I will add this
support (possibly next week).
2. for your second job, "pencil beam", mcx cloud actually completed the job quickly. However, your simulation has a somewhat large domain of 300x300x40 voxels and 100x time gates. This produced a huge data file (30MB .jnii after compression, 1.5GB before compression).
although the mcxcloud javascript frontend was able to download the 30MB compressed .jnii output, but the decompression using javascript consumes a huge amount of resources (>6GB memory) and eventually chrome killed the tab.
this is just an example showing that doing simulations in the
browser is still have limits. try not to use large sized domains,
try not to use many time gates. your browser is still not quite as
powerful as running mcx locally.
Qianqian
--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/2b4ec6f1-88ed-4f1f-b3a5-5b17302ddb21n%40googlegroups.com.
hi Ife,
I just updated json schema to support "Pattern" field under Optode.Source.
I looked up your job ID, and noticed that the submitted job is just the built in skinvessel example. can you confirm if this is the case?
when I resubmit the json settings for the same benchmark, mcxcloud correctly identified that this is a cached simulation and immediately returned the cached results, which is expected
11:44:54 AM Successfully submitted job
AC5E525937EC627923C4FD0BFE6391C0EBD47CDF
11:45:03 AM use cached data
11:45:03 AM log
###############################################################################
# Monte Carlo eXtreme (MCX) --
CUDA #
# Copyright (c) 2009-2020 Qianqian Fang <q.fang at
neu.edu> #
#
http://mcx.space/ #
#
#
# Computational Optics & Translational Imaging (COTI) Lab-
http://fanglab.org #
# Department of Bioengineering, Northeastern University,
Boston, MA, USA #
###############################################################################
# The MCX Project is funded by the NIH/NIGMS under grant
R01-GM114365 #
###############################################################################
$Rev::0313d4$ v2020 $Date::2020-09-06 23:25:03 -04$ by
$Author::Qianqian Fang $
###############################################################################
- variant name: [Fermi] compiled by nvcc [9.0] with CUDA [9000]
- compiled with: RNG [xorshift128+] with Seed Length [4]
GPU=1 (GeForce GTX 1080) threadph=24 extra=16960 np=1000000
nthread=40960 maxgate=1 repetition=1
initializing streams ... init complete : 5 ms
requesting 1024 bytes of shared memory
launching MCX simulation for time window [0.00e+00ns
5.00e+01ns] ...
simulation run# 1 ...
kernel complete: 645 ms
retrieving fields ... transfer complete: 655 ms
normalizing raw data ... source 1, normalization factor
alpha=0.040000
data normalization complete : 794 ms
saving data to file ... saving data complete : 2593 ms
simulated 1000000 photons (1000000) with 40960 threads (repeat
x1)
MCX simulation speed: 1582.28 photon/ms
total simulated energy: 1000000.00 absorbed: 39.72081%
(loss due to initial specular reflection is excluded in the
total)
11:45:03 AM output data received
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/28f7d626-58f0-42fa-89fd-32da737da975n%40googlegroups.com.

you don't need special setup or plugin. mcx cloud should work directly in your browser.
please report your web browser version and OS version. it is possible that the javascript does not work well on your browser. I did most of my tests on Chrome.
if you really want to debug what had triggered this, you can use the Development tools in Chrome (... menu -> More tools -> Development tools), go to the Sources tab on the top, set a break point on line#2457 of the script (click on the js/cloud/ tree view to show source), then submit your simulation. if the error is triggered again, go to the "Network" tab on the top (expand ">>" to see more tabs), and select the last mcxserver.cgi communication and use the Response tab to find out what was returned from the server.
two screenshots are shown here, first show the break point in the source, second shows the mcxserver.cgi response source data.
if the response is simply parsererror, that means the submitted
data was invalid JSON, you need to click the mcxserver.cgi link
right above the last in the Network tab to see what your browser
actually sent in the Payload tab.


To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/6a180e41-0377-46ce-bccb-7659e540f0f6n%40googlegroups.com.







thanks for the screenshots - I still don't have an explanation
why this happens in your browser but not mine. looks like the job
status update triggered the error() handler and complains it can
not find the callback function "addlog()"
I made the following minor code change
https://github.com/fangq/mcx/commit/20b0aa2a0122ba923e8066be1c71c7768ee69715
please try again and let me know if you still see this error.
if you this error still persists, please set the same break-point
as you did in the error function as in your screenshots
1-1/1-2/2-1, and switch to the Network tab, and find what did the
server responded for that ajax call (in the
payload/preview/response tabs)
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/67803b36-42d6-4572-abe2-acfccf8ff53dn%40googlegroups.com.




sorry, I just can't reproduce this error.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/19819166-b3fa-4e6e-82db-262f1583bfabn%40googlegroups.com.