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 environment variables to set alternative to ~/.comsol
Posted 11 feb 2025, 18:26 CET General, API, User Interface Version 6.2 0 Replies
Please login with a confirmed email address before reporting spam
Hi all,
I would like to redirect data from runs from the default directory (~/.comsol) to a temp directory (/tmp/comsol_<process_rank>), where each process in an mpi job gets a different folder.
I am doing this with python, using mph, so passing flags to a batch command is not possible.
So far I have used:
os.environ["COMSOL_HOME"] = f"/tmp/comsol_{rank}"
os.environ["COMSOL_TMPDIR"] = f"/tmp/comsol_{rank}"
os.environ["COMSOL_DATA"] = f"/tmp/comsol_{rank}"
os.environ["COMSOL_CONFIGURATION"] = f"/tmp/comsol_{rank}"
os.environ["COMSOL_PREFSDIR"] = f"/tmp/comsol_{rank}"
os.environ["COMSOL_USERCONFIGDIR"] = f"/tmp/comsol_{rank}"
However I still get a ~/.comsol folder being created. What environment variables can i set to ensure that no files are being created in ~/.comsol - it looks like eclipse is creating things, and I have run into issues with the processes trying to acquire a file lock from that folder and throwing exceptions about permissions.
also how can I programmatically check the number of license seats available at launch, so i don't exceed the available seats?
Any advice appreciated!
Hello abinitio
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.