COMSOL environment variables to set alternative to ~/.comsol

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!


Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.