MCCL troubleshooting on Mac for Jun 22 Version Release

40 views
Skip to first unread message

Samantha Zerafa

unread,
Oct 5, 2021, 7:27:51 PM10/5/21
to Virtual Photonics
Hello,

I have been trying to utilize the MCCL application on my MacBook and perform the subsequent visualization in MATLAB and seem to be running into some issues. I have been following the tutorial here and the command line portion runs well, however when I try to visualize in MATLAB like the example given, I run into some errors. I have my load_results_script.m in the same working directory as the JSON files, however I get an error on line 1498 of the loadMCResults.m file that there is an unrecognized file "loadjson". I am happy to elaborate/attach photos of the error.

Sorry if this is a user error or very simple question, I was just wondering if this is a known bug or if I somehow am following the example incorrectly. I am using MATLAB version 2020a. 

Thanks!

~Sam

Carole Hayakawa

unread,
Oct 6, 2021, 5:50:54 PM10/6/21
to Virtual Photonics
Hi Samantha,

Thanks for your interest in our software!  I *think* the problem is that it can't either find the folder "jsonlab" or that the filename and/or location where the results reside is incorrect.  To solve the first, on the left hand panel "Current Folder", right click the folder "jsonlab" and select "Add to Path -> Selected Folders and Subfolders".   To debug the second, let me know what you've specified for "datanames" and "outdir" in load_results_script.m.  A photo of the error would definitely help debug this one.

Thanks!
Carole

Samantha Zerafa

unread,
Oct 7, 2021, 11:45:02 AM10/7/21
to Virtual Photonics

Hi Carole,

Thanks for your quick response! On the first point, there actually is no "jsonlab" folder within the zip file I downloaded "MC_v6.0.0_Mac_x64" rather, a ton of individual icons labled "jasonlab\jsave.m" etc.  Should all these files just be within the folder jsonlab rather than in the main folder with "jasonlab\" in their title? I made sure to add that whole MC_v6.0.0 folder to my pathway like you described and I still get the error.

On the second point, the datanames and outdir lines are as follows:

datanames = { 'one_layer_all_detectors' };

outdir = '.';

So it is possible I am defining. one of these wrong since I left them as is for the first example. For reference the file I ran in line is this:

"./mc infile=infile_one_layer_all_detectors.txt"

Here is a picture of some of the errors I have been getting:

Screen Shot 2021-10-07 at 11.41.19 AM.png

Thanks!

~Sam

Carole Hayakawa

unread,
Oct 7, 2021, 4:06:59 PM10/7/21
to Virtual Photonics
Hi Samantha,
Yes, all of the files that start with "jsonlab/" should be in a subfolder named "jsonlab" (no "a" after "j").  When you extracted the zip, what did you use?  Unfortunately I don't have access to a Mac, however on Linux I use "unzip".  I see that you're trying to plot the results from the example infile.  Great!  Since your "outdir" is set to ".", just make sure that the results folder "one_layer_all_detectors" is sitting in the directory you are running MATLAB (the MATLAB command "pwd" verifies what the current working directory is).  I think once you have the jsonlab files in the correct folder, all should run.
Keep me posted.
Thanks,
Carole 

Samantha Zerafa

unread,
Oct 12, 2021, 10:00:25 AM10/12/21
to Virtual Photonics
Hi Carole,

Thanks for your help! I think my zip file originally had some sort of error, once I tried it again with the terminal command unzip I was able to get the proper folders and the MATLAb is now running without error. Once I dive into this a bit more I may have follow up questions on the time domain functionality of VTS, but I will create a separate chain for that since it is a different topic.

Thanks!

~Sam

Carole Hayakawa

unread,
Oct 13, 2021, 2:32:55 PM10/13/21
to Virtual Photonics
Hi Samantha,
Great to hear!  Post anytime with follow up questions.
Best,
Carole
Reply all
Reply to author
Forward
0 new messages