Issue with publishing to web

Use this forum to post Vensim related questions.
Post Reply
Bayasgalan
Junior Member
Posts: 7
Joined: Fri Sep 24, 2021 2:28 am
Vensim version: DSS

Issue with publishing to web

Post by Bayasgalan »

same issue with web publisher. I stuck here. can someone help me please?
screenshot.png
screenshot.png (132.76 KiB) Viewed 3768 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Issue with publishing to web

Post by Administrator »

Same advice as when you emailed us. Start with a working model. You cannot publish to the web if your model does not work in Vensim.

You also need to fix the error where you are using a lookup table as a number. See the parameter "дээд боловсролын сургууль завсарлалтын дундаж", this is passing a lookup table to a lookup table (you cannot do this).
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Bayasgalan
Junior Member
Posts: 7
Joined: Fri Sep 24, 2021 2:28 am
Vensim version: DSS

Re: Issue with publishing to web

Post by Bayasgalan »

it is same, when I try simple model. Same result. First I want to publish small model to web
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Issue with publishing to web

Post by Administrator »

Where have you uploaded the files to a server?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Bayasgalan
Junior Member
Posts: 7
Joined: Fri Sep 24, 2021 2:28 am
Vensim version: DSS

Re: Issue with publishing to web

Post by Bayasgalan »

Local server and i can't find mdl.js and mdl.wasm
screen.png
screen.png (45.96 KiB) Viewed 3722 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Issue with publishing to web

Post by Administrator »

Can you upload the model you are trying to publish?

When you publish, can you paste the output of the emscripten window showing the errors?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Bayasgalan
Junior Member
Posts: 7
Joined: Fri Sep 24, 2021 2:28 am
Vensim version: DSS

Re: Issue with publishing to web

Post by Bayasgalan »

that is the error, when I try to publish.


C:\Users\dell\Documents>REM First set the WASM environment variables.

C:\Users\dell\Documents>call C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\emsdk activate latest
Resolving SDK alias 'latest' to '2.0.30'
Resolving SDK version '2.0.30' to 'sdk-releases-upstream-c69458f1bbf3ef5b8da4e934de210659cc9bca04-64bit'
Setting the following tools as active:
node-14.15.5-64bit
python-3.9.2-1-64bit
java-8.152-64bit
releases-upstream-c69458f1bbf3ef5b8da4e934de210659cc9bca04-64bit

Adding directories to PATH:
PATH += C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk
PATH += C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\node\14.15.5_64bit\bin
PATH += C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\upstream\emscripten

Setting environment variables:
PATH = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk;C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\node\14.15.5_64bit\bin;C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\upstream\emscripten;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\dell\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\dell\AppData\Local\Programs\Python\Python39\;C:\Users\dell\AppData\Local\Microsoft\WindowsApps
EMSDK = C:/Users/Public/Vensim_DSS/COMP/wasm/emsdk
EM_CONFIG = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\.emscripten
EMSDK_NODE = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\node\14.15.5_64bit\bin\node.exe
EMSDK_PYTHON = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\python\3.9.2-1_64bit\python.exe
JAVA_HOME = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\java\8.152_64bit
Clearing existing environment variable: EMSDK_PY
The changes made to environment variables only apply to the currently running shell instance. Use the 'emsdk_env.bat' to re-enter this environment later, or if you'd like to permanently register this environment permanently, rerun this command with the option --permanent.
Setting environment variables:
PATH = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk;C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\upstream\emscripten;C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\node\14.15.5_64bit\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\dell\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\dell\AppData\Local\Programs\Python\Python39\;C:\Users\dell\AppData\Local\Microsoft\WindowsApps
Clearing existing environment variable: EMSDK_PY
Could Not Find C:\Users\dell\Documents\web\mdl.js
Could Not Find C:\Users\dell\Documents\web\mdl.wasm
A subdirectory or file web already exists.
emcc: warning: EXTRA_EXPORTED_RUNTIME_METHODS is deprecated, please use EXPORTED_RUNTIME_METHODS instead [-Wdeprecated]
wasm-ld: error: C:\Users\Public\Vensim_DSS\COMP\wasm\vensim_wasm.bc: unexpected table definition(s) without corresponding symbol-table entries.
emcc: error: 'C:/Users/Public/Vensim_DSS/COMP/wasm/emsdk/upstream/bin\wasm-ld.exe -o web\mdl.wasm C:\Users\dell\AppData\Local\Temp\emscripten_temp_hzzlgmmh\mdl_wasm_0.o C:\Users\Public\Vensim_DSS\COMP\wasm\vensim_wasm.bc -LC:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten --whole-archive -lfetch --no-whole-archive -lGL -lal -lhtml5 -lc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -ldlmalloc -lc_rt_wasm -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=GetNumberOfSubscriptElements --export-if-defined=GetConstant --export-if-defined=AddCINFile --export-if-defined=GetSeries --export-if-defined=SetDebugModeOff --export-if-defined=GetValueAtTime --export-if-defined=SetDebugModeOn --export-if-defined=DumpResultstoStdOut --export-if-defined=DumpResultsToDisk --export-if-defined=InitializeModel --export-if-defined=IsVensimLoaded --export-if-defined=RunSim --export-if-defined=main --export-if-defined=GetTimeSeriesNumVals --export-if-defined=FindLookup --export-if-defined=Get_LookupName --export-if-defined=Get_NUM_AUX --export-if-defined=Get_NUM_DELAYS --export-if-defined=Get_NUM_LEVELS --export-if-defined=Get_NUM_LOOKUPS --export-if-defined=Get_NUM_VARS --export-if-defined=Get_VarName --export-if-defined=Get_VarType --export-if-defined=GetConstantUsingIndex --export-if-defined=GetConstantUsingVarName --export-if-defined=GetNumVariables --export-if-defined=GetVariableIndex --export-if-defined=GetVariableName --export-if-defined=GetVariableType --export-if-defined=SetConstant --export-if-defined=SetLookup --export-if-defined=emscripten_stack_get_end --export-if-defined=emscripten_stack_get_free --export-if-defined=emscripten_stack_init --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__wasm_call_ctors --export-if-defined=fflush --export-if-defined=__errno_location --export-if-defined=malloc --export-if-defined=free --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-table -z stack-size=5242880 --initial-memory=268435456 --no-entry --max-memory=2147483648 --global-base=1024' failed (returned 1)
"Batch file complete!"
Press any key to continue . . .
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Issue with publishing to web

Post by Administrator »

The model? Does the model you are trying to publish actually simulate?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Bayasgalan
Junior Member
Posts: 7
Joined: Fri Sep 24, 2021 2:28 am
Vensim version: DSS

Re: Issue with publishing to web

Post by Bayasgalan »

Just simple model I try to publish.
stock.mdl
(1.61 KiB) Downloaded 278 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Issue with publishing to web

Post by Administrator »

Can you try editing your wasm_compile.bat file and find the line

Code: Select all

call %3emsdk activate 
and replace it with

Code: Select all

call %3emsdk activate sdk-2.0.6-64bit
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Bayasgalan
Junior Member
Posts: 7
Joined: Fri Sep 24, 2021 2:28 am
Vensim version: DSS

Re: Issue with publishing to web

Post by Bayasgalan »

there is no error, but still same result. Can you see what is wrong this?

C:\Users\dell\Documents>REM First set the WASM environment variables.

C:\Users\dell\Documents>call C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\emsdk activate sdk-2.0.6-64bit
Resolving SDK version '2.0.6' to 'sdk-releases-upstream-4ba921c8c8fe2e8cae071ca9889d5c27f5debd87-64bit'
Setting the following tools as active:
node-14.15.5-64bit
python-3.9.2-1-64bit
java-8.152-64bit
releases-upstream-4ba921c8c8fe2e8cae071ca9889d5c27f5debd87-64bit

Adding directories to PATH:
PATH += C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk
PATH += C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\node\14.15.5_64bit\bin
PATH += C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\upstream\emscripten

Setting environment variables:
PATH = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk;C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\node\14.15.5_64bit\bin;C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\upstream\emscripten;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\dell\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\dell\AppData\Local\Programs\Python\Python39\;C:\Users\dell\AppData\Local\Microsoft\WindowsApps;
EMSDK = C:/Users/Public/Vensim_DSS/COMP/wasm/emsdk
EM_CONFIG = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\.emscripten
EMSDK_NODE = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\node\14.15.5_64bit\bin\node.exe
EMSDK_PYTHON = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\python\3.9.2-1_64bit\python.exe
JAVA_HOME = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\java\8.152_64bit
Clearing existing environment variable: EMSDK_PY
The changes made to environment variables only apply to the currently running shell instance. Use the 'emsdk_env.bat' to re-enter this environment later, or if you'd like to permanently register this environment permanently, rerun this command with the option --permanent.
Setting environment variables:
PATH = C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk;C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\upstream\emscripten;C:\Users\Public\Vensim_DSS\COMP\wasm\emsdk\node\14.15.5_64bit\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\dell\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\dell\AppData\Local\Programs\Python\Python39\;C:\Users\dell\AppData\Local\Microsoft\WindowsApps;
Clearing existing environment variable: EMSDK_PY
A subdirectory or file web already exists.
"Batch file complete!"
Press any key to continue . . .
Bayasgalan
Junior Member
Posts: 7
Joined: Fri Sep 24, 2021 2:28 am
Vensim version: DSS

Re: Issue with publishing to web

Post by Bayasgalan »

wasm_compile.bar file's picture, when I open this file
wasm_compile.PNG
wasm_compile.PNG (74.37 KiB) Viewed 3655 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Issue with publishing to web

Post by Administrator »

When you made the change and tried publishing from Vensim, it looks like it worked successfully. Do you have a mdl.wasm in the web sub-folder of your model? If yes, what is the address where you uploaded it to the web?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply