-
-
September 28, 2022 at 6:38 pm
cct
SubscriberHi,Â
We tried to use cfile to create the key file for running LS-Dyna and LS-OPT. We know that cfile can only create elements and nodes to kfile. However, the part we want to create has a series of processes: creating lines, rotating them into a solid part, meshing the surface of the solid part, removing solid part (only shell left), and making the shell corrugated by generating solid elements from shell, generating shell elements from solid face, and deleting solid one and the original shell part.
Since we would like to do parametric-optimization on this corrugated shell part, we need to use cfile to create kfile, rather than process them in LSPP directly.
We were thinking that we might be able to create a part with the steps from adding lines to make a solid part via cfile, and adding script to main.k to do the remaining process. Thus, we made a part in LSPP to see what scipts would be in kfile. Yet, we found there is only the info about element_shell and nodes, which is different from our expectation.
Does anyone know how to use script to create complete part from cfile to kfile, or how to edit the kfile for this problem?
-
October 1, 2022 at 4:42 pm
cct
SubscriberWe tried some other ways to create the part:
- Before meshing it, we used lines, curves, and features of breaking/merging curves and offset curves to create a solid part. Then, delete ths solid one after meshing it.
- Simplifier our part to a cone, and using Solid>Cone to create a solid part and mesh it, and then delete the solid one.
We saved these two ways in cfile and still have errors to create the kfile. Is there any other way we can try for it? Thanks!
-
October 3, 2022 at 7:52 am
igandiko
Ansys Employee"We know that cfile can only create elements and nodes to kfile." - this is incorrect. A cfile is an LSPP command file and it allows you to perform most of LSPP operations in batch model. All the steps performed through LSPP GUI are recorded as commands in cfile. It can be generating a part, drawing lines/curves, postprocessing results, or a series of steps.
"We were thinking that we might be able to create a part with the steps from adding lines to make a solid part via cfile, and adding script to main.k to do the remaining process. Thus, we made a part in LSPP to see what scipts would be in kfile. Yet, we found there is only the info about element_shell and nodes, which is different from our expectation."
As long as cfile has all the steps , starting from adding lines, etc, it should be able to create a part. I don't understand what you mean by adding a script to main.k.
After creating the part and saving the operation in cfile, what error did you get when you ran this cfile in batch mode? You can also open this cfile in LSPP GUI (open > command file > start). Depending on where this process stops, you can identify where the problem lies in the cfile.
Â
Â
-
October 3, 2022 at 2:29 pm
cct
SubscriberThank you for repling and explaining.
When we tried to run in the cluster, there is no kfile created and the error jumped out several similar lines as following:
(process:103941): Gdk-CRITICAL **: 00:12:55.741: IA__gdk_screen_get_width: assertion 'GDK_IS_SCREEN (screen)' failed(process:103941): GLib-GObject-WARNING **: 00:12:55.745: invalid (NULL) pointer instance(process:103941): GLib-GObject-CRITICAL **: 00:12:55.745: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failedHowever, we just tried to run in LSPP GUI in the local computer, and found it successfully created the part.
We need to run lsopt in the cluster, so creating parts also needs to be done in the cluster. Is this issue caused by the the command in run file or is anywhere in cfile should be editted for running in the cluster? The following figure is our command in runfile.
 -
October 10, 2022 at 4:02 pm
-
-
October 11, 2022 at 3:35 pm
igandiko
Ansys EmployeeYou can try couple of things:Â
1. Use '/path/lspp48 -nographics c=
' command instead of '/path/lspp48 runc= ' 2. Don't use slurm script to submit LSPP job. In LS-OPT stage solver command, enter below command and turn on "do not add input file argument".Â
/sw/hprc/...../lspp48 -nographics c=LsPrepostOpt.inp
Â
Â
-
October 11, 2022 at 7:28 pm
cct
SubscriberThank you for replying and providing possible ways.
With way 1, we got the error : Unable to initialize gtk, is DISPLAY set properly?
With way 2, we found in stage1 (LSPP)/1.1, the parameter is read correctly, but kfile is not created. And the same error message is shown in stdout file.
-
October 11, 2022 at 8:14 pm
igandiko
Ansys EmployeeTry option 2 using a newer version (v4.9) or newer build of 4.8 (4.8.22 is latest).Â
Is the command correct? Why are you calling 'lsprepost' instead of 'lspp48' script located in /sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common? Try below command. Make sure "DN" variable in 'lspp48' script points to correct installation path.
/sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common/lspp48 runc=
Next try mesa version,Â
/sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common/lspp48_mesa runc=
If these don't help, I will have to check with LSPP experts.Â
Â
-
October 11, 2022 at 9:56 pm
cct
SubscriberThe command was correct; I just wanted to specify that the stage 1 is the stage of LSPP but we just not named it LSPP. We used the directory "/sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common" in the command. Sorry for the confusion.
The latest version we have in our cluster is 4.8.24 and I tried it with option 2, but they still cannot create the kfile.
-
October 11, 2022 at 10:02 pm
igandiko
Ansys EmployeeWhat I meant is, in '/sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common' directory, 'lsprepost' is a binary but there is 'lspp48' script in the installation directory which set environment for some libraries before launching lsprepost. You should be calling this script to launch LSPP. Please check if 'lspp48' file is located in /sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common. If yes, make sure "DN" variable points to correct directory and then try below command,
 /sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common/lspp48 runc=
-
October 11, 2022 at 10:43 pm
cct
SubscriberAlso, I just checked with our previos slurm script and found we used "/sw/hprc/sw/LS-PREPOST/4.8.9/lsprepost4.8_common/lsprepost runc=LsPrepostOpt.inp"
In that case, both of running this script directly and run it in LSOPT work. Yet, both lspp48 and lsprepost do not work now.
-
October 28, 2022 at 3:38 pm
cct
SubscriberHi Imtiaz,
We also tried to simplify our part and see if we could find where the problem is. Here are some points of simplification:
- We remove the corrogation and make it a half ellipsoid. Yet, it still fails in the cluster;
- We reduce the number of parameters. It still fails in the cluster, too;
- In comparison, we also add parameters on the previous testing one, which is a cube created by using "generate mesh tool." This successful model still succed in the cluster.Â
All of them can successfully create the kfile with LSPP GUI in the local computer. From these tries, we know that it is highly possible to fail due to the reasons except the number of parameters or the number of lines (i.e. the complexity of the process we create it).Â
However, we still do not know where's the problem. Do you have any other recommendations on what kind of other tries we can do or could you please help us to check with LSPP experts?
Thank you so much!
-
October 28, 2022 at 4:02 pm
igandiko
Ansys EmployeeSo you're saying LSPP fails on the cluster for one cfile but completes successfully for a different cfile? I would need the files, hard to guess without it. On local computer, did you run the cfile in batch mode without using GUI?Â
-
October 28, 2022 at 4:13 pm
cct
SubscriberYes, the current one with several lines fails, but the previous one with generating meshes directly succed. I did not try to run it in batch mode without using GUI, but I just checked that it can successfully create the kfile with GUI in the cluster.
-
-
-
October 11, 2022 at 10:12 pm
cct
SubscriberSorry for the misunderstanding.
When running the LSOPT GUI, I put "/sw/hprc/sw/LS-PREPOST/4.8.24/lsprepost4.8_common/lspp48" in the command of Stage LSPP.
I also rerun the LSPP with slurm script (edited the lspp48 from lsprepost), but it showed out the error message "Permission denied."
-
- The topic ‘How to use script to create complete part from cfile to kfile and run in LS-OPT’ is closed to new replies.
-
3074
-
977
-
907
-
858
-
792
© 2025 Copyright ANSYS, Inc. All rights reserved.