acusolve run id

Prabin Pradhananga_22497
Prabin Pradhananga_22497 Altair Community Member
edited November 2022 in Community Q&A

Hi guys,

Is it possible to get the RUN ID of the current acusolve simulation via UDF? Like:-

acuRun: Log is redirected to: test.164.Log

I want to extract number 164 from the UDF. Is this possible?

Thanks!

Best Answer

  • acupro
    acupro
    Altair Employee
    edited November 2022 Answer ✓

    Hi acupro,

    Actually, I am running a series of acusolve simulations using shell script. I have a series of simulations which are automatically executed using for loop. I want to automatically delete the simulations result using:

    acuCleanDir -pb channel -run 216 -delrun

    I will only keep the necessary results. However, in the shell script I do not have access to run id automatically. I want the UDF to print run id somewhere else and later read the id by shell script to delete the associated files. I have a limited disk space and want to delete all files as soon as the simulation is over. I do not want to manually delete but i want it to be done automatically.

    Do you have any other idea to delete the files?

    Thanks!

    If you issue

    acuCleanDir -h

    you'll see that by default the last (most recent, highest run ID) run is selected.

    If you're always operating on the most recent run, simply do not include the -run flag.

Answers

  • acupro
    acupro
    Altair Employee
    edited November 2022

    I don't see any current method to retrieve the Run ID via UDF.  I can certainly make that request.

    Just curious - what would you like to do with the Run ID?

  • acupro
    acupro
    Altair Employee
    edited November 2022

    How is the run id information expected to be used?  Print to Log file or other?

    Is this for running UDFs in a DOE scenario?  Or just multiple runs made from the same folder?

  • Prabin Pradhananga_22497
    Prabin Pradhananga_22497 Altair Community Member
    edited November 2022

    How is the run id information expected to be used?  Print to Log file or other?

    Is this for running UDFs in a DOE scenario?  Or just multiple runs made from the same folder?

    Hi acupro,

    Actually, I am running a series of acusolve simulations using shell script. I have a series of simulations which are automatically executed using for loop. I want to automatically delete the simulations result using:

    acuCleanDir -pb channel -run 216 -delrun

    I will only keep the necessary results. However, in the shell script I do not have access to run id automatically. I want the UDF to print run id somewhere else and later read the id by shell script to delete the associated files. I have a limited disk space and want to delete all files as soon as the simulation is over. I do not want to manually delete but i want it to be done automatically.

    Do you have any other idea to delete the files?

    Thanks!

  • acupro
    acupro
    Altair Employee
    edited November 2022 Answer ✓

    Hi acupro,

    Actually, I am running a series of acusolve simulations using shell script. I have a series of simulations which are automatically executed using for loop. I want to automatically delete the simulations result using:

    acuCleanDir -pb channel -run 216 -delrun

    I will only keep the necessary results. However, in the shell script I do not have access to run id automatically. I want the UDF to print run id somewhere else and later read the id by shell script to delete the associated files. I have a limited disk space and want to delete all files as soon as the simulation is over. I do not want to manually delete but i want it to be done automatically.

    Do you have any other idea to delete the files?

    Thanks!

    If you issue

    acuCleanDir -h

    you'll see that by default the last (most recent, highest run ID) run is selected.

    If you're always operating on the most recent run, simply do not include the -run flag.

  • Prabin Pradhananga_22497
    Prabin Pradhananga_22497 Altair Community Member
    edited November 2022

    If you issue

    acuCleanDir -h

    you'll see that by default the last (most recent, highest run ID) run is selected.

    If you're always operating on the most recent run, simply do not include the -run flag.

    Thanks, it works for the latest run.