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.

memory management function with comsol api

Please login with a confirmed email address before reporting spam

Hello there,
this is the third thread I am posting on the use of comsol API and so far no answer at all...
feel quite lonely out there... :-)

anyway here is another one.. who knows, I might be lucky here

My context a large parameters study made of a very large numbers of "small" comsol cases...

if I do nothing the parmetric study faisl because of the standard "java out of memory.. error", [ the one whose size is controlled apparently by the Xmx entry in comsolserver.ini and comsol.ini as already discussed in another thread.

Increasing this memory is a temporary AND VERY limited fix for the kind ofproblem I am facing,
but something appears wrong to me for there is NO NEED, in my case at least for COMSOL to keep track of "its past" while I am running these parametric study... so there should be a way tor elease this memory from within the script...

but i cannot find anything on this subject in the api doc... DID i MISS SOMETHING?

My second question is,
If I cannot release memory, how can I monitor its growth? [ again I cannot find anything in the doc]
i will then script the script to stop and reset comsol when necessary...

My last question: can we count how many people are on this forum currently using these api without the gui?

I am One :-)

Thanks...
JF

6 Replies Last Post 30.09.2010, 07:35 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.09.2010, 17:55 GMT-4
hi jean,
sorry, i think the api is poorly documented (and probably full of bugs). i'm waiting for comsol developers to improve this nice application, i will get my hands dirty maybe with 4.2...
greetings
john
hi jean, sorry, i think the api is poorly documented (and probably full of bugs). i'm waiting for comsol developers to improve this nice application, i will get my hands dirty maybe with 4.2... greetings john

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29.09.2010, 02:06 GMT-4
HI John,
Thanks for your word of support

2 comments of it

AS it was pointed to me recently by another member of this forum,
it is highly probable that the api are the heart of comsol itself, the gui being just comsol proprietary "packaging" of these api.. so whatever bugs in there are also bugs in comsol

Documentation, I think that this forum is an ongoing testimony [ how many thread on this? ] on the fact that Comsol forte is NOT its documentation, specially for the advanced user [ if you want to know how to move a cursor in a gui this is a different story tough...]

The api are then not different fin that regard. and this should MAYBE improve other time and version.
It is also probable that there are some undocummented API that comsol keep for itself, software company usually does that so I guess comsol did it, but I have no evidence of that as well.

future will tell

In the meantime if there was a few other users around it could make life less miserable...lol

JF
HI John, Thanks for your word of support 2 comments of it AS it was pointed to me recently by another member of this forum, it is highly probable that the api are the heart of comsol itself, the gui being just comsol proprietary "packaging" of these api.. so whatever bugs in there are also bugs in comsol Documentation, I think that this forum is an ongoing testimony [ how many thread on this? ] on the fact that Comsol forte is NOT its documentation, specially for the advanced user [ if you want to know how to move a cursor in a gui this is a different story tough...] The api are then not different fin that regard. and this should MAYBE improve other time and version. It is also probable that there are some undocummented API that comsol keep for itself, software company usually does that so I guess comsol did it, but I have no evidence of that as well. future will tell In the meantime if there was a few other users around it could make life less miserable...lol JF

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29.09.2010, 02:28 GMT-4
Hi

On my side it's not really the documentation that is holding me back, but really the time, for the moment in V4 I can do so much, that I have not even used Matlab with V4 (until I recently noticed that the matlab link has been broken on my PC probably due to one of the patches or numerous updates that arrive).

But I agree using the api is probably better (and allow to go deeper) than matlab and for certain advanced application it's certainly better, but I do not have enough nights to learn that, these days ;)

Hopefully the doc will get a new improvement push for V4.1, the V4 "revolution" was quite tough I beleive for the programmers, also for us users, but personally I'm very pleased with this new approach that I find cleaner and easier to assimilate w.r.t my physics training. So I'm looking forward tosee what will be showed soon, at the Paris encounter

--
Good luck
Ivar
Hi On my side it's not really the documentation that is holding me back, but really the time, for the moment in V4 I can do so much, that I have not even used Matlab with V4 (until I recently noticed that the matlab link has been broken on my PC probably due to one of the patches or numerous updates that arrive). But I agree using the api is probably better (and allow to go deeper) than matlab and for certain advanced application it's certainly better, but I do not have enough nights to learn that, these days ;) Hopefully the doc will get a new improvement push for V4.1, the V4 "revolution" was quite tough I beleive for the programmers, also for us users, but personally I'm very pleased with this new approach that I find cleaner and easier to assimilate w.r.t my physics training. So I'm looking forward tosee what will be showed soon, at the Paris encounter -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29.09.2010, 04:21 GMT-4
Hi Ivar,

luckily [ or not] I just embarked on a new paid project that will require non standard scripting... so I did not really had a choice.
I am still doing non producing work with 4.0 but spent some time to get acquainted to...
I will tend to agree with you that the new approach seems better and hold a lot of promise.

One think I am waiting to have more data on tough is the s\speed... It have already been noted by others on this forum but my very VERY preliminary"feeling" confirm this feeling, that using the api slow things considerably.

I did some test where same simple case are run through the gui and through matlab [ but matlab does nothing , just launching the run and receiving some results and it seems that the matlab case run MUCH MUCH slower than the gui case , this said for casethat are exactly the same except for the front end [ gui vs matlab] ... this worry me a little but I will wait to get more data/facts/understanding to truly form an opinion on the subject...

EDIT The speed things is really comparing apple with apple for I put tic and toc to see speed of each step of a study...building geometry, meshing running the study..exporting files..and so forth.

but I must emphasis that this time comparaison I am mentionning is for solving alone not including building geometry and mesh or any data post processing
Hi Ivar, luckily [ or not] I just embarked on a new paid project that will require non standard scripting... so I did not really had a choice. I am still doing non producing work with 4.0 but spent some time to get acquainted to... I will tend to agree with you that the new approach seems better and hold a lot of promise. One think I am waiting to have more data on tough is the s\speed... It have already been noted by others on this forum but my very VERY preliminary"feeling" confirm this feeling, that using the api slow things considerably. I did some test where same simple case are run through the gui and through matlab [ but matlab does nothing , just launching the run and receiving some results and it seems that the matlab case run MUCH MUCH slower than the gui case , this said for casethat are exactly the same except for the front end [ gui vs matlab] ... this worry me a little but I will wait to get more data/facts/understanding to truly form an opinion on the subject... EDIT The speed things is really comparing apple with apple for I put tic and toc to see speed of each step of a study...building geometry, meshing running the study..exporting files..and so forth. but I must emphasis that this time comparaison I am mentionning is for solving alone not including building geometry and mesh or any data post processing

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29.09.2010, 11:19 GMT-4
let's hope 4.1 will surprise us (regarding the API and better documentation)
i'm getting impatient ;-o

cheers
john
let's hope 4.1 will surprise us (regarding the API and better documentation) i'm getting impatient ;-o cheers john

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 30.09.2010, 07:35 GMT-4
and also in the GUI, once I have a simulation with lots of timesteps memory exponentially jumps from 4GB to 13GB, and then even when I empty the results still holds that much memory, and does not release it.
and also in the GUI, once I have a simulation with lots of timesteps memory exponentially jumps from 4GB to 13GB, and then even when I empty the results still holds that much memory, and does not release it.

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.