Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Comsol 3.5a: start .m-files in batch mode

Please login with a confirmed email address before reporting spam

Dear Community,

I just installed the latest COMSOL-version 3.5a on my Ubuntu system (previously I used 3.5) and tried to start a job in batch mode. The .m-file (Modell.m) is located in the folder /S40C00 and I get the following error message:

____________________________________________________________________________________________________________________________________________

voelker@Claire:~/COMSOL-Ergebnisse/090806/sent090806/S40C00$ /usr/local/comsol35a/bin/comsol batch Modell

COMSOL Batch (64-bit)
------------------------------------------------------------
Version: COMSOL 3.5a (COMSOL 3.5.0.603)

Patent pending.
Copyright (c) 1998-2008 by COMSOL AB.
All rights reserved.
------------------------------------------------------------

Starting batch job.
------------------------------------------------------------
COMSOL Batch failed!
Error: Invalid arguments. Number of arguments must be even.
Stack trace:
java.lang.RuntimeException: Invalid arguments. Number of arguments must be even.
at com.femlab.server.BatchRunner.a(Unknown Source)
at com.femlab.server.BatchRunner.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.femlab.server.Launcher.main(Unknown Source)
____________________________________________________________________________________________________________________________________________

This happens both with m.-files created in COMSOL 3.5 and 3.5a. I tried it with several jobs that I already successfully ran under version 3.5, but always it's the same error message.

I prepare the -m-files as follows: My colleague has version 3.5a running on her desktop with matlab. She creates the modells in COMSOL, saves them as .mph, then loads them in Matlab (flload *.mph), saves them in Matlab (flsave *.mph fem), reloads them in COMSOL as .mph and then again saves them as *.m (and .mphm). These final *.m / *.mphm files are transfered to my computer (I don't have matlab), where I start them in batch-mode.

This procedure worked fine as long as we both used version 3.5. Since my colleague updated to 3.5a, I couldn't start her files any more (error message: files were created with newer version). Now that I also installed version 3.5a, I cannot start any jobs in batch mode at all (error message: see above).

What am I doing wrong, when I try to start jobs in batch mode? Did the commands for the batch mode change in the latest version 3.5a?

Thanks for your help,

Best regards,

Benjamin Voelker

5 Replies Last Post 14 août 2009 à 10:25 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 8 août 2009 à 15:26 UTC−4
Hi

I believe you have forgotten to check the "what's new" file for 3.5a.

I have uderstood that you need Matlab now to run M files with versions from 3.5a. What I have heard also is that it's a legal issue (fight about rights between Matlab and COMSOL, and that Matlab won) so you are not allowed to run one without the other for scripts herafter.

I had to buy a new Matlab version with 3.5a

I believe the best is to have this confirmed by your distributor.

Even if Octave is a good, free replacement for Matlab, it des not work with COMSOL from my knowledge.

I like Matlab, because it's an excellent product, but I also "hate" them because their commercial approach is killing the independent users, specially "small" companies with few users, they believe they are alone in the world, but you cannot earn your money as an independent just with Matlab, you need also your FEM, CAD, SPICE , an analytical tool, +++ all this adds up to more than what you can honestly earn as an engineer, just to pay for the maintenance.

So chasing the latest version isnt always the best !

Good luck anyhow
Ivar
Hi I believe you have forgotten to check the "what's new" file for 3.5a. I have uderstood that you need Matlab now to run M files with versions from 3.5a. What I have heard also is that it's a legal issue (fight about rights between Matlab and COMSOL, and that Matlab won) so you are not allowed to run one without the other for scripts herafter. I had to buy a new Matlab version with 3.5a I believe the best is to have this confirmed by your distributor. Even if Octave is a good, free replacement for Matlab, it des not work with COMSOL from my knowledge. I like Matlab, because it's an excellent product, but I also "hate" them because their commercial approach is killing the independent users, specially "small" companies with few users, they believe they are alone in the world, but you cannot earn your money as an independent just with Matlab, you need also your FEM, CAD, SPICE , an analytical tool, +++ all this adds up to more than what you can honestly earn as an engineer, just to pay for the maintenance. So chasing the latest version isnt always the best ! Good luck anyhow Ivar

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 10 août 2009 à 00:25 UTC−4
comsol batch command does NOT support M-file anymore by standalone. you need MATLAB to solve your m-file.

comsl batch works with MPH file.
comsol batch command does NOT support M-file anymore by standalone. you need MATLAB to solve your m-file. comsl batch works with MPH file.

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 12 août 2009 à 09:51 UTC−4
Thank you both for the helpfull answers! Meanwhile I tried to start jobs with the mentioned commands, and now I'm stuck with a new kind of problem:

When I take *.mph-files which I created in version 3.5 and start them in batch mode, I end up with the following error in nearly every case:

______________________________________________
/usr/local/comsol35a/bin/comsol batch -input C35a_VP8nm.mph -output C35a_VP8nm_out.mph

COMSOL Batch (64-bit)
------------------------------------------------------------
Version: COMSOL 3.5a (COMSOL 3.5.0.603)

Patent pending.
Copyright (c) 1998-2008 by COMSOL AB.
All rights reserved.
------------------------------------------------------------

Starting batch job.
------------------------------------------------------------
COMSOL Batch failed!
Error: null
Stack trace:
java.lang.NullPointerException
at com.femlab.api.client.SolverPlotCallback.addProps(Unknown Source)
at com.femlab.api.client.Solver.initProps(Unknown Source)
at com.femlab.api.client.Solver.solve(Unknown Source)
at com.femlab.api.client.Solver.solve(Unknown Source)
at com.femlab.server.BatchRunner.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.femlab.server.Launcher.main(Unknown Source)
_____________________________________________________________________________


Nearly, because some of my older files manage to work in batch mode. Unfortunately, I see no systematic behavior. Files that I create in the new version 3.5a work fine in batch mode. All files, including those that abort in batch mode, run fine in the 3.5a client and can be solved there.

Has anybody received this error message, and maybe has somebody a glue what I'm doing wrong here?

Thank you very much for your help in advance,

best regards,
Benjamin
Thank you both for the helpfull answers! Meanwhile I tried to start jobs with the mentioned commands, and now I'm stuck with a new kind of problem: When I take *.mph-files which I created in version 3.5 and start them in batch mode, I end up with the following error in nearly every case: ______________________________________________ /usr/local/comsol35a/bin/comsol batch -input C35a_VP8nm.mph -output C35a_VP8nm_out.mph COMSOL Batch (64-bit) ------------------------------------------------------------ Version: COMSOL 3.5a (COMSOL 3.5.0.603) Patent pending. Copyright (c) 1998-2008 by COMSOL AB. All rights reserved. ------------------------------------------------------------ Starting batch job. ------------------------------------------------------------ COMSOL Batch failed! Error: null Stack trace: java.lang.NullPointerException at com.femlab.api.client.SolverPlotCallback.addProps(Unknown Source) at com.femlab.api.client.Solver.initProps(Unknown Source) at com.femlab.api.client.Solver.solve(Unknown Source) at com.femlab.api.client.Solver.solve(Unknown Source) at com.femlab.server.BatchRunner.main(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.femlab.server.Launcher.main(Unknown Source) _____________________________________________________________________________ Nearly, because some of my older files manage to work in batch mode. Unfortunately, I see no systematic behavior. Files that I create in the new version 3.5a work fine in batch mode. All files, including those that abort in batch mode, run fine in the 3.5a client and can be solved there. Has anybody received this error message, and maybe has somebody a glue what I'm doing wrong here? Thank you very much for your help in advance, best regards, Benjamin

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 14 août 2009 à 10:19 UTC−4
With the help of the COMSOL-support team this problem is solved:

The described error was evoked by the fact that in "Solver Parameters" the option "Plot while solving" was still activated. Deactivating this option eliminated the error, all models now run fine in COMSOL batch, version 3.5a.

Thanks again to the support team!

Best regards,
Benjamin
With the help of the COMSOL-support team this problem is solved: The described error was evoked by the fact that in "Solver Parameters" the option "Plot while solving" was still activated. Deactivating this option eliminated the error, all models now run fine in COMSOL batch, version 3.5a. Thanks again to the support team! Best regards, Benjamin

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 14 août 2009 à 10:25 UTC−4
You may also be interested in updating Comsol with HOTFIX1
www.comsol.com/support/updates/comsol35a1/

You may also be interested in updating Comsol with HOTFIX1 http://www.comsol.com/support/updates/comsol35a1/

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.