victorliu / S4

Stanford Stratified Structure Solver - Electromagnetic simulator for layered periodic structures
http://www.stanford.edu/group/fan/S4/
GNU General Public License v2.0
128 stars 149 forks source link

Cannot execute S4 after installation #107

Closed niarmi closed 1 year ago

niarmi commented 1 year ago

Hi everyone,

I ran make and installed the software with LUA5.2, but after installation when I run the example, it still shows: lua: fig6.lua:6: attempt to index global 'S4' (a nil value) stack traceback: fig6.lua:6: in main chunk [C]: in ?

Can you help me figure out and solve the problem? Thank you!

stijncuyvers commented 1 year ago

Hi niarmi,

I ran into the same problem: you should use the custom S4 lua interpreter. When you want to run an example, run a command as follows in the terminal: "/home/username/conda/envs/virtualenv/Stanford_S4tool/S4/build/S4 name_of_examplefile.lua". This fixed it for me. Hope this helps!

niarmi commented 1 year ago

Hi niarmi,

I ran into the same problem: you should use the custom S4 lua interpreter. When you want to run an example, run a command as follows in the terminal: "/home/username/conda/envs/virtualenv/Stanford_S4tool/S4/build/S4 name_of_examplefile.lua". This fixed it for me. Hope this helps!

This helps! Thank you so much stijncuyvers!