TAGGED: ansys-ls-dyna, optimization
-
-
September 19, 2022 at 10:30 pmcctSubscriber
Hi,
We tried to use cfile to create the key file for running LS-Dyna and LS-OPT. However, when we used the script to submit it in the terminal, it keeps jumping out the message "Error: Unable to initialize gtk, is DISPLAY set properly?" The following picture is the command in the run file.
Does anyone face the same issue as ours?
The following picture is the run_lspp file we try to submit. -
September 20, 2022 at 4:40 pmigandikoAnsys Employee
I don't think you need a script for LSPP. Since you're already running ls-opt process on the cluster using a script, run LSPP on the same node as LS-OPT. To run on same node, instead of using a script, in LSPP stage solver command, enter below line.
/sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common/lsprepost
LS-OPT will automatically add "-nographics c= LsPrepostOpt.inp" to above command so you don't have to define it again. After running baseline run, check job_log.solver in 1.1 directory of LSPP stage. If you still get the same error, try below command in solver command section of LSPP,
/sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common/lsprepost runc= LsPrepostOpt.inp
Note that after replacing parameter values, ls-opt copies cfile as LsPrepostOpt.inp so this is the input file for LSPP command.
-
September 20, 2022 at 5:21 pmcctSubscriber
We tried the way entering /sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common/lsprepost in LSPP stage, but the key file is not created.
We tried editing the script and now it could create the key file from cfile when we submit the run_lspp file. However, even though the run_lspp file works, when we use sbatch ../../run_lspp in command in the LSPP stage, the stdout in LS-Dyna directory still shows the key file cannot be found.
We checked LsPrepostOpt.inp and it has the replacing parameter values.
-
September 21, 2022 at 8:39 amigandikoAnsys Employee
Are you saying "sbatch run_lspp" command works outside of ls-opt but using same script "sbatch ../../run_lspp" command does not work through ls-opt?
Below the stage command, select "do not add input file argument" option and try again.
Note that by default, if you select LSPP solver package, ls-opt will add "-nographics c=LsPrepostOpt.inp" or "runc=LsPrepostOpt.inp" arguments to solver command but since you are using a script, these arguments maynot be valid so skip it by using "do not add input file argument" checkbox.
-
September 21, 2022 at 6:35 pmcctSubscriber
Understand! Thanks for the explaining.
However, we selected the option “do not add input file argument”, it still cannot get the key file created.
The LsPrepostOpt.inp in stage seems good. Is there any other thing we can check for this issue?
-
September 21, 2022 at 6:38 pmigandikoAnsys Employee
What does job_command.solver show in LSPP 1.1 directory? What happens if you manually run this command file through a terminal?
-
September 21, 2022 at 6:47 pm
-
-
-
September 21, 2022 at 6:46 pmcctSubscriber
When we use run_lspp to create kfile from cfile, it works. Yet, when we use run_opt to submit the LS-OPT job, it jumps out the same error and kfile isn’t created.
-
September 21, 2022 at 7:03 pmigandikoAnsys Employee
In LSPP 1.1 directory, is there a log file from your cluster to see the error? Without checking the log file, we don't even know if LSPP was launched correctly. In the below 3 steps, which step do you see an issue?
- LS-OPT runs job_command.solver file located in LSPP 1.1 stage. This command runs "sbatch ../../run_lspp". Is there a log from sbatch?
- sbatch script calls LSPP and LSPP runs LsPrepostOpt.inp to generate k file
- k file from LSPP stage is copied to LS-DYNA stage
Focus on log files in LSPP 1.1 stage to see if LSPP was even called or not. If it was called, did it generate k file in LSPP 1.1 directory?
Since you're running LSPP on the cluster, you may have to select "use queuing >simple" in remote options and also define suitable termination criteria in "termination" tab. Maybe LS-OPT is running sbatch command correctly by its not waiting for LSPP process to finish and moves on to LS-DYNA stage and complains about missing k file.
-
September 21, 2022 at 7:31 pmcctSubscriber
In those following steps,
- There's a log file in stage1.1
- In the main directory, there's a kfile created from cfile
- The kfile doesn't show up in the stage of LSDYNA
It works now when I select "use queuing >simple" in the stage of LSPP, which seems the error occurs as you thought that LS-OPT is running sbatch command correctly by its not waiting for LSPP process to finish and moves on to LS-DYNA stage.
Thank you so much!
-
September 21, 2022 at 8:00 pmcctSubscriber
It works in GUI, but it still has issue when we sbatch in the terminal.
When I checked in the LSDYNA/1.1, I found the created kfile is copied into this directory, but the time of stdout showing that the kfile cannot be found is 10 min. Yet, the queuer timeout is set 720 min (as default).
It shows the message in the job_log.solver:
-
September 21, 2022 at 8:16 pmigandikoAnsys Employee
Is this screen shot from job_log in ls-dyna stage? It says found matching criteria for error which means ls-opt found "E r r o r t e r m i n a t i o n" line in d3hsp file so it looks like your ls-dyna run failed. Check ls-dyna messag/d3hsp files for errors.
-
September 21, 2022 at 8:18 pmcctSubscriber
In d3hsp, there's the same error message that the key file does'nt exist.
-
September 21, 2022 at 8:24 pmigandikoAnsys Employee
Can you show screen shot of ls-opt workflow? Did you define file transfer operation between ls-opt and ls-dyna? If you did, check time stamps of when k was created in LSPP stage and compare it to time stamps of k file in ls-dyna stage and also time stamp of d3hsp file. This should give some clues.
-
September 21, 2022 at 8:35 pmcctSubscriber
This is our ls-opt workflow:
I just set the input cfile in LSPP stage (stage1) and the file would be copied to LSDYNA stage. In stgae1/1.1, there is no kfile created from cfile. Yet, in the main directory, we can find the kfile was created at 2:39:50 PM, and it is copied into LSDYNA/1.1 at 2:49:08 PM, but d3hsp and stdout created at 2:39:51 PM.
Also, we tried to run it in GUI again, and it now faces the same issue.
-
-
September 21, 2022 at 8:53 pmigandikoAnsys Employee
Your setup is not correct. In stage1, you select cfile. ls-opt will replace parameters and copy this cfile as LsPrepostOpt.inp. LSPP will run LsPrepostOpt.inp and generate ls-dyna k file. Lets say this k file is model.k.
Double click on the small box between Stage1 and LS-Dyna and define file transfer operation to copy model.k file from Stage1 directories to LS-Dyna directories as DynaOpt.inp. Just enter "model.k" as "source" and "DynaOpt.inp" as "destination".
In LS-Dyna stage, don't select any input file. DynaOpt.inp will directly come from LSPP stage and your ls-dyna job script will have i= DynaOpt.inp to run this file.
-
September 21, 2022 at 9:17 pm
-
-
September 21, 2022 at 9:37 pmigandikoAnsys Employee
In that case, use main.k as input file of LS-Dyna stage. main.k will have *include card for model.k which comes from LSPP stage.
In file transfer box, enter model.k in both source and destination fields.
LS-OPT will copy main.k from working directory as DynaOpt.inp and its include file will be copied from LSPP stage using file transfer operation.
-
September 21, 2022 at 9:51 pm
-
-
September 21, 2022 at 9:58 pmigandikoAnsys Employee
If job_log just says error, without any meaningful message, the next file to check is ls-dyna messag or d3hsp.
-
September 21, 2022 at 10:00 pmcctSubscriber
These two files are even not created in LSDYNA/1.1 directory.
-
September 21, 2022 at 10:07 pmigandikoAnsys Employee
Which means ls-dyna not did not run. Check job_log.solver file to see if there is any output from sbatch command. What happens if you manually run job_command.solver located in ls-dyna/1.1? Are there any other log files from sbatch command?
-
September 21, 2022 at 10:15 pm
-
September 21, 2022 at 10:18 pmigandikoAnsys Employee
Clearly, file copying failed which means either T005_trycube.k is not available in Stage/1.1 or it wasn't generated yet when ls-opt moved on to next step after running LSPP command.
-
September 21, 2022 at 10:27 pmcctSubscriber
I just downloaded the T005_trycube.k in LSDYNA/1.1, and it seems good, having the shell mesh and properties of material, hourglass, and section. This kfile is copied into 1.1 just 12 sec later than the lsopt runs. Is this issue be unable to solved with using queuing >simple?
-
September 21, 2022 at 11:35 pmigandikoAnsys Employee
What termination criteria did you define for LSPP stage under “termination tab”?
-
September 21, 2022 at 11:57 pm
-
-
-
September 22, 2022 at 12:03 amigandikoAnsys Employee
Since T005_trycube.k will be generated in LSPP directories, change criteria to "existence of file" and enter T005_trycube.k. In this way, LSPP job will be considered as normal termination only if T005_trycube.k is found in the directory, until then ls-opt will wait instead of moving on to LS-Dyna stage.
(or)
Add a delay of 15-20 seconds. First option might be better.
-
September 22, 2022 at 12:18 am
-
-
September 23, 2022 at 5:48 pmcctSubscriber
Thank you for your help, Imtiaz.
The issue is solved by these steps:
1. In the cfile, the path for saving the keyword is removed sice if you give a path, the same file will get overwritten; if you don't define a path, k file will be created locally in individual folders.
2. The section and material cards are moved to the main file. The thickness parameter can be defined directly in *SECTION using *PARAMETER, no need to define this in cfile.3. In cfile, there's only *part card for cube. The lines with "$" in cfile are removed since ls-opt was adding extra line if there is "$' in cfile and that caused issues in LSPP in writing correct *PART card.
-
- The topic ‘How to use script to run the cfile for creating k file?’ is closed to new replies.
- Problem with access to session files
- Ayuda con Error: “Unable to access the source: EngineeringData”
- Reaction forces and moments during random vibration at local coordinate systems
- At least one body has been found to have only 1 element in at least 2 directions
- Using APDL to extract stresses on a beam element.
- How to select the interface delamination surface of a laminate?
- Geometric stiffness matrix for solid elements
- Timestep range set for animation export
- Non-linear convergence issue
- Computation Accleration
-
1131
-
468
-
466
-
225
-
201
© 2024 Copyright ANSYS, Inc. All rights reserved.