Discussion:
[COMSOL_Users] Compile a comsol script into executable file?
Li Xi
2006-06-13 19:53:26 UTC
Permalink
Hi,

I am interested in finding the way to compile comsol scripts into executable files that can run on any Linux machines. Right now my simulation can take as long as several days and I no longer want to run the scripts on my local machine. If it is possible to compile a comsol script (or more preferably a mixed comsol and matlab script) into a executable file, I can make use of the computer cluster we have, where most of the computing nodes don't have comsol installed.

Does anyone have similar situations? Any suggestions and experiences would be appreciated. Thanks!

Li


Li Xi
Department of Chemical and Biological Engineering
University of Wisconsin-Madison
E-mail:***@yahoo.com





__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
xinhui zhou
2006-06-13 20:08:13 UTC
Permalink
Xi,

I also run script in linux cluster machine with comsol32 installed at main
node of then cluster and license manager in my desktop. Script can run at
other nodes.

Xinhui
Post by Li Xi
Hi,
I am interested in finding the way to compile comsol scripts into
executable files that can run on any Linux machines. Right now my simulation
can take as long as several days and I no longer want to run the scripts on
my local machine. If it is possible to compile a comsol script (or more
preferably a mixed comsol and matlab script) into a executable file, I can
make use of the computer cluster we have, where most of the computing nodes
don't have comsol installed.
Does anyone have similar situations? Any suggestions and experiences would
be appreciated. Thanks!
Li
Li Xi
Department of Chemical and Biological Engineering
University of Wisconsin-Madison
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
sealyxi
2006-06-14 16:55:31 UTC
Permalink
Thank you for your information.

So what you did is to install comsol on the master node and you can
distribute your jobs to the whole cluster? That sounds exciting to
me. Do you run it from the batch mode, say write a script that
contains commands like "comsol batch job_name" and submit it to the
cluster? By the way, how many license places would it take, only one
for the cluster or depending on the number of jobs runinng? Thanks!
Post by xinhui zhou
Xi,
I also run script in linux cluster machine with comsol32
installed at main
Post by xinhui zhou
node of then cluster and license manager in my desktop. Script can run at
other nodes.
Xinhui
Post by Li Xi
Hi,
I am interested in finding the way to compile comsol scripts into
executable files that can run on any Linux machines. Right now my simulation
can take as long as several days and I no longer want to run the scripts on
my local machine. If it is possible to compile a comsol script (or more
preferably a mixed comsol and matlab script) into a executable file, I can
make use of the computer cluster we have, where most of the
computing nodes
Post by xinhui zhou
Post by Li Xi
don't have comsol installed.
Does anyone have similar situations? Any suggestions and
experiences would
Post by xinhui zhou
Post by Li Xi
be appreciated. Thanks!
Li
Li Xi
Department of Chemical and Biological Engineering
University of Wisconsin-Madison
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
xinhui zhou
2006-06-14 17:18:34 UTC
Permalink
I just have one license , so I can not run 2 jobs paralelly. I am
also in the early stage of using it in cluster . What I did is that
installing comsol at main node and loging into the other node and then
start the script from there. For some unknown reason, I am not able to
submit job using qsub directly to run script.

yes, use batch mode.
Post by sealyxi
Thank you for your information.
So what you did is to install comsol on the master node and you can
distribute your jobs to the whole cluster? That sounds exciting to
me. Do you run it from the batch mode, say write a script that
contains commands like "comsol batch job_name" and submit it to the
cluster? By the way, how many license places would it take, only one
for the cluster or depending on the number of jobs runinng? Thanks!
Post by xinhui zhou
Xi,
I also run script in linux cluster machine with comsol32
installed at main
Post by xinhui zhou
node of then cluster and license manager in my desktop. Script can
run at
Post by xinhui zhou
other nodes.
Xinhui
Post by Li Xi
Hi,
I am interested in finding the way to compile comsol scripts into
executable files that can run on any Linux machines. Right now
my simulation
Post by xinhui zhou
Post by Li Xi
can take as long as several days and I no longer want to run the
scripts on
Post by xinhui zhou
Post by Li Xi
my local machine. If it is possible to compile a comsol script
(or more
Post by xinhui zhou
Post by Li Xi
preferably a mixed comsol and matlab script) into a executable
file, I can
Post by xinhui zhou
Post by Li Xi
make use of the computer cluster we have, where most of the
computing nodes
Post by xinhui zhou
Post by Li Xi
don't have comsol installed.
Does anyone have similar situations? Any suggestions and
experiences would
Post by xinhui zhou
Post by Li Xi
be appreciated. Thanks!
Li
Li Xi
Department of Chemical and Biological Engineering
University of Wisconsin-Madison
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
zimmerman_wbj
2006-06-14 21:14:21 UTC
Permalink
I think you guys are on to the right track, but will ultimately be
limited by the number of licenses you have.

The fastest form you can get your code into is to use the Comsol
Multiphysics API (advanced programming interface) that creates
compiled Java object code. It needs the Comsol Multiphysics
libraries, and the fem solvers (femtime, femnlin, femlin, etc.)
all check for a license when they are called.

femlab 2.3i was more permissive. I managed to use the matlab
compiler to compile the matlab script that called femlab functions
to C, and then use the gcc compiler to compile a portable code
across my linux cluster. The matlab compiler stage generates
several errors that I "fixed" by commenting out the offending
lines of the matlab source code of femlab.

This does not work with Comsol Multiphysics. You can try it, but
everything "java" crashes, and you cannot get access to the source
code (compiled libraries).

So if you really need standalone, use the API. There is still the
license issue ... A company that I work with uses the API for an add-
on module to their software product (which is otherwise in C). They
have achieved standalone, and negotiated a re-licensing arrangement
with Comsol. Since the end-users of the software package will only
ever be solving one particular CMphys model or variants of it, their
is an argument for a reduced price, limited license. But users who
want to try this should certainly discuss pricing of the limited usage
license with their Comsol sales office. I met with this company
today, and they haven't yet decided whether to market this additional
module. There is a simpler model coded in C which has no
hydrodynamics that is quicker to use than the CFD-like model.
If they eventually decide to go with the Comsol produced add-on
module (I think they might go with both eventually), then I'll
suggest that get an article in the Comsol News next year.

I have six floating licenses available on my seven processor
linux cluster. I got my colleagues to chip in for some licenses
a few years ago. Perhaps the license limitation is not easily
solvable without a budget (or in my case, colleagues who wanted
their students to have access too). So far, all sixs licenses have
been used simultaneously very rarely -- and am I the culprit!

Regards,
Will
Post by xinhui zhou
I just have one license , so I can not run 2 jobs paralelly. I am
also in the early stage of using it in cluster . What I did is that
installing comsol at main node and loging into the other node and then
start the script from there. For some unknown reason, I am not able to
submit job using qsub directly to run script.
yes, use batch mode.
Post by sealyxi
Thank you for your information.
So what you did is to install comsol on the master node and you can
distribute your jobs to the whole cluster? That sounds exciting to
me. Do you run it from the batch mode, say write a script that
contains commands like "comsol batch job_name" and submit it to the
cluster? By the way, how many license places would it take, only one
for the cluster or depending on the number of jobs runinng?
Thanks!
Post by xinhui zhou
Post by sealyxi
Post by xinhui zhou
Xi,
I also run script in linux cluster machine with comsol32
installed at main
Post by xinhui zhou
node of then cluster and license manager in my desktop. Script can
run at
Post by xinhui zhou
other nodes.
Xinhui
Post by Li Xi
Hi,
I am interested in finding the way to compile comsol scripts into
executable files that can run on any Linux machines. Right now
my simulation
Post by xinhui zhou
Post by Li Xi
can take as long as several days and I no longer want to run the
scripts on
Post by xinhui zhou
Post by Li Xi
my local machine. If it is possible to compile a comsol script
(or more
Post by xinhui zhou
Post by Li Xi
preferably a mixed comsol and matlab script) into a executable
file, I can
Post by xinhui zhou
Post by Li Xi
make use of the computer cluster we have, where most of the
computing nodes
Post by xinhui zhou
Post by Li Xi
don't have comsol installed.
Does anyone have similar situations? Any suggestions and
experiences would
Post by xinhui zhou
Post by Li Xi
be appreciated. Thanks!
Li
Li Xi
Department of Chemical and Biological Engineering
University of Wisconsin-Madison
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
sealyxi
2006-06-16 15:50:48 UTC
Permalink
That is worth a try. Thank both of you guys for your advices.
Post by zimmerman_wbj
I think you guys are on to the right track, but will ultimately be
limited by the number of licenses you have.
The fastest form you can get your code into is to use the Comsol
Multiphysics API (advanced programming interface) that creates
compiled Java object code. It needs the Comsol Multiphysics
libraries, and the fem solvers (femtime, femnlin, femlin, etc.)
all check for a license when they are called.
femlab 2.3i was more permissive. I managed to use the matlab
compiler to compile the matlab script that called femlab functions
to C, and then use the gcc compiler to compile a portable code
across my linux cluster. The matlab compiler stage generates
several errors that I "fixed" by commenting out the offending
lines of the matlab source code of femlab.
This does not work with Comsol Multiphysics. You can try it, but
everything "java" crashes, and you cannot get access to the source
code (compiled libraries).
So if you really need standalone, use the API. There is still the
license issue ... A company that I work with uses the API for an add-
on module to their software product (which is otherwise in C). They
have achieved standalone, and negotiated a re-licensing arrangement
with Comsol. Since the end-users of the software package will only
ever be solving one particular CMphys model or variants of it, their
is an argument for a reduced price, limited license. But users who
want to try this should certainly discuss pricing of the limited usage
license with their Comsol sales office. I met with this company
today, and they haven't yet decided whether to market this additional
module. There is a simpler model coded in C which has no
hydrodynamics that is quicker to use than the CFD-like model.
If they eventually decide to go with the Comsol produced add-on
module (I think they might go with both eventually), then I'll
suggest that get an article in the Comsol News next year.
I have six floating licenses available on my seven processor
linux cluster. I got my colleagues to chip in for some licenses
a few years ago. Perhaps the license limitation is not easily
solvable without a budget (or in my case, colleagues who wanted
their students to have access too). So far, all sixs licenses have
been used simultaneously very rarely -- and am I the culprit!
Regards,
Will
Post by xinhui zhou
I just have one license , so I can not run 2 jobs paralelly. I am
also in the early stage of using it in cluster . What I did is that
installing comsol at main node and loging into the other node and
then
Post by xinhui zhou
start the script from there. For some unknown reason, I am not able
to
Post by xinhui zhou
submit job using qsub directly to run script.
yes, use batch mode.
Post by sealyxi
Thank you for your information.
So what you did is to install comsol on the master node and you
can
Post by xinhui zhou
Post by sealyxi
distribute your jobs to the whole cluster? That sounds exciting to
me. Do you run it from the batch mode, say write a script that
contains commands like "comsol batch job_name" and submit it to
the
Post by xinhui zhou
Post by sealyxi
cluster? By the way, how many license places would it take, only
one
Post by xinhui zhou
Post by sealyxi
for the cluster or depending on the number of jobs runinng?
Thanks!
Post by xinhui zhou
Post by sealyxi
Post by xinhui zhou
Xi,
I also run script in linux cluster machine with comsol32
installed at main
Post by xinhui zhou
node of then cluster and license manager in my desktop. Script
can
Post by xinhui zhou
Post by sealyxi
run at
Post by xinhui zhou
other nodes.
Xinhui
Post by Li Xi
Hi,
I am interested in finding the way to compile comsol scripts
into
Post by xinhui zhou
Post by sealyxi
Post by xinhui zhou
Post by Li Xi
executable files that can run on any Linux machines. Right now
my simulation
Post by xinhui zhou
Post by Li Xi
can take as long as several days and I no longer want to run
the
Post by xinhui zhou
Post by sealyxi
scripts on
Post by xinhui zhou
Post by Li Xi
my local machine. If it is possible to compile a comsol script
(or more
Post by xinhui zhou
Post by Li Xi
preferably a mixed comsol and matlab script) into a executable
file, I can
Post by xinhui zhou
Post by Li Xi
make use of the computer cluster we have, where most of the
computing nodes
Post by xinhui zhou
Post by Li Xi
don't have comsol installed.
Does anyone have similar situations? Any suggestions and
experiences would
Post by xinhui zhou
Post by Li Xi
be appreciated. Thanks!
Li
Li Xi
Department of Chemical and Biological Engineering
University of Wisconsin-Madison
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
wentao2013
2013-03-10 22:18:14 UTC
Permalink
Dose this is possible in 4.3 if the license is ok?
Did Mr Li have created an standlone executable file without comsol enviorment?
Post by sealyxi
That is worth a try. Thank both of you guys for your advices.
Post by zimmerman_wbj
I think you guys are on to the right track, but will ultimately be
limited by the number of licenses you have.
The fastest form you can get your code into is to use the Comsol
Multiphysics API (advanced programming interface) that creates
compiled Java object code. It needs the Comsol Multiphysics
libraries, and the fem solvers (femtime, femnlin, femlin, etc.)
all check for a license when they are called.
femlab 2.3i was more permissive. I managed to use the matlab
compiler to compile the matlab script that called femlab functions
to C, and then use the gcc compiler to compile a portable code
across my linux cluster. The matlab compiler stage generates
several errors that I "fixed" by commenting out the offending
lines of the matlab source code of femlab.
This does not work with Comsol Multiphysics. You can try it, but
everything "java" crashes, and you cannot get access to the source
code (compiled libraries).
So if you really need standalone, use the API. There is still the
license issue ... A company that I work with uses the API for an add-
on module to their software product (which is otherwise in C). They
have achieved standalone, and negotiated a re-licensing arrangement
with Comsol. Since the end-users of the software package will only
ever be solving one particular CMphys model or variants of it, their
is an argument for a reduced price, limited license. But users who
want to try this should certainly discuss pricing of the limited usage
license with their Comsol sales office. I met with this company
today, and they haven't yet decided whether to market this additional
module. There is a simpler model coded in C which has no
hydrodynamics that is quicker to use than the CFD-like model.
If they eventually decide to go with the Comsol produced add-on
module (I think they might go with both eventually), then I'll
suggest that get an article in the Comsol News next year.
I have six floating licenses available on my seven processor
linux cluster. I got my colleagues to chip in for some licenses
a few years ago. Perhaps the license limitation is not easily
solvable without a budget (or in my case, colleagues who wanted
their students to have access too). So far, all sixs licenses have
been used simultaneously very rarely -- and am I the culprit!
Regards,
Will
Post by xinhui zhou
I just have one license , so I can not run 2 jobs paralelly. I am
also in the early stage of using it in cluster . What I did is that
installing comsol at main node and loging into the other node and
then
Post by xinhui zhou
start the script from there. For some unknown reason, I am not able
to
Post by xinhui zhou
submit job using qsub directly to run script.
yes, use batch mode.
Post by sealyxi
Thank you for your information.
So what you did is to install comsol on the master node and you
can
Post by xinhui zhou
Post by sealyxi
distribute your jobs to the whole cluster? That sounds exciting to
me. Do you run it from the batch mode, say write a script that
contains commands like "comsol batch job_name" and submit it to
the
Post by xinhui zhou
Post by sealyxi
cluster? By the way, how many license places would it take, only
one
Post by xinhui zhou
Post by sealyxi
for the cluster or depending on the number of jobs runinng?
Thanks!
Post by xinhui zhou
Post by sealyxi
Post by xinhui zhou
Xi,
I also run script in linux cluster machine with comsol32
installed at main
Post by xinhui zhou
node of then cluster and license manager in my desktop. Script
can
Post by xinhui zhou
Post by sealyxi
run at
Post by xinhui zhou
other nodes.
Xinhui
Post by Li Xi
Hi,
I am interested in finding the way to compile comsol scripts
into
Post by xinhui zhou
Post by sealyxi
Post by xinhui zhou
Post by Li Xi
executable files that can run on any Linux machines. Right now
my simulation
Post by xinhui zhou
Post by Li Xi
can take as long as several days and I no longer want to run
the
Post by xinhui zhou
Post by sealyxi
scripts on
Post by xinhui zhou
Post by Li Xi
my local machine. If it is possible to compile a comsol script
(or more
Post by xinhui zhou
Post by Li Xi
preferably a mixed comsol and matlab script) into a executable
file, I can
Post by xinhui zhou
Post by Li Xi
make use of the computer cluster we have, where most of the
computing nodes
Post by xinhui zhou
Post by Li Xi
don't have comsol installed.
Does anyone have similar situations? Any suggestions and
experiences would
Post by xinhui zhou
Post by Li Xi
be appreciated. Thanks!
Li
Li Xi
Department of Chemical and Biological Engineering
University of Wisconsin-Madison
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Yahoo! Groups Links
Loading...