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+Matlab on Linux cluster: "No user name and password could be obtained"
Posted 1 apr 2016, 04:35 GMT-4 2 Replies
Please login with a confirmed email address before reporting spam
A problem I had and its solution, for the record. (Just seeing as nobody reported these error messages yet.)
Just tried running Comsol+Matlab on a cluster, using what seemed to work before:
$ \comsol server -tmpdir $TMPDIR < /dev/null > test2016apr01.log &
But Matlab said: "No user name and password could be obtained" after I entered "mphstart()".
So it turned out that Comsol server collapsed, and the log file said:
The way around this that I found was to first run Comsol server as follows:
$ \comsol mphserver -tmpdir $TMPDIR
It will then ask for a username and password. Luckily, it remembers these for the next time it runs, because it's not possible to connect to the above (at least with the way our cluster is set up, and probably others). So, shutting it down and running as follows, now works:
$ \comsol server -tmpdir $TMPDIR < /dev/null > test2016apr01.log &
$ matlab
Now, the right directory needs to be added to Matlab's PATH. For me this is /usr/local/comsol/5.1/mli but for others it's likely to be different. There is probably a way to permanently store this somehow, but I haven't found it yet. Post if you have a way (this is on Linux; it's easy on Windows).
Now this works:
>> mphstart()
Just tried running Comsol+Matlab on a cluster, using what seemed to work before:
$ \comsol server -tmpdir $TMPDIR < /dev/null > test2016apr01.log &
But Matlab said: "No user name and password could be obtained" after I entered "mphstart()".
So it turned out that Comsol server collapsed, and the log file said:
Username: Username: Username: Username: Username: Username: Username: Username: Username: Username: Made_X_attempts_at_obtaining_user_name._Giving_up#10
The way around this that I found was to first run Comsol server as follows:
$ \comsol mphserver -tmpdir $TMPDIR
It will then ask for a username and password. Luckily, it remembers these for the next time it runs, because it's not possible to connect to the above (at least with the way our cluster is set up, and probably others). So, shutting it down and running as follows, now works:
$ \comsol server -tmpdir $TMPDIR < /dev/null > test2016apr01.log &
$ matlab
Now, the right directory needs to be added to Matlab's PATH. For me this is /usr/local/comsol/5.1/mli but for others it's likely to be different. There is probably a way to permanently store this somehow, but I haven't found it yet. Post if you have a way (this is on Linux; it's easy on Windows).
Now this works:
>> mphstart()
2 Replies Last Post 20 lug 2016, 07:32 GMT-4