Comsol w/Matlab: CLI vs GUI issues

  • Context: MATLAB 
  • Thread starter Thread starter grumpymrgruff
  • Start date Start date
  • Tags Tags
    Comsol Gui Issues
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 5K views
grumpymrgruff
Messages
16
Reaction score
2
Hi all - I've been working on some code in Comsol w/ Matlab that works fine on any machine I run it on - so long as I run it through the Comsol w/ Matlab GUI.

No matter which machine I run it on, the program fails if I run Comsol w/ Matlab through a CLI. Specifically, the geominport() function fails to import my geom.mphbin file with the following error (gap is the name of my model m-file):

Code:
>> gap
? Java exception occurred:
java.lang.NullPointerException
        at com.femlab.server.MlProgressDlg.runAndWait(Unknown Source)
        at com.femlab.server.FlRunnable.a(Unknown Source)
        at com.femlab.server.FlRunnable.smartRunner(Unknown Source)

Error in ==> geomimport at 208
glr.jptr.smartRunner(report, 500);

Error in ==> gap at 23
garr = geomimport('./geom.mphbin');

I am planning to submit this code as a job on a computer cluster where any kind of GUI interface will be out of the question. Has anyone using Comsol/Matlab encountered this problem before, and do you know any workarounds that will let me get my code running without a GUI?

Thanks much!
 
Physics news on Phys.org
Hi,

Can it be that you try to use the function geomimport() but misspelled it to geominport() ?

Good luck
/ T

grumpymrgruff said:
Hi all - I've been working on some code in Comsol w/ Matlab that works fine on any machine I run it on - so long as I run it through the Comsol w/ Matlab GUI.

No matter which machine I run it on, the program fails if I run Comsol w/ Matlab through a CLI. Specifically, the geominport() function fails to import my geom.mphbin file with the following error (gap is the name of my model m-file):

Code:
>> gap
? Java exception occurred:
java.lang.NullPointerException
        at com.femlab.server.MlProgressDlg.runAndWait(Unknown Source)
        at com.femlab.server.FlRunnable.a(Unknown Source)
        at com.femlab.server.FlRunnable.smartRunner(Unknown Source)

Error in ==> geomimport at 208
glr.jptr.smartRunner(report, 500);

Error in ==> gap at 23
garr = geomimport('./geom.mphbin');

I am planning to submit this code as a job on a computer cluster where any kind of GUI interface will be out of the question. Has anyone using Comsol/Matlab encountered this problem before, and do you know any workarounds that will let me get my code running without a GUI?

Thanks much!
 
dontommazo said:
Hi,

Can it be that you try to use the function geomimport() but misspelled it to geominport() ?

Good luck
/ T

Good eye. I didn't notice that. Unfortunately, the typo is only in my post, not in the code. Right now I'm running the job on a cluster with X11 forwarding for the GUI and hoping that I don't lose my connection to the cluster for about a week's worth of computation. ;-)