Impossible execution of fortran exe file with external coupling tool

Hello everyone,

I am having significant difficulties to execute a simply coupling study, especially with the command tab. I try to replay the example case (in video (Persalys - Couplage externe) except that I’m on a window machine.

To resume, the case is a bending beam with a load at its end. The intput parameters are written to an input file by Persalys (length, load, etc…). The ouput file are written to an output file (stress, etc…) by a executing fortran file (.exe) which read the input data in the input file, calculate the bending stress and write the result in the output file.

The executing fortran file (.exe) works properly when I execute the file directly (double click on the file).

When I check the input and output files, it works.

When I check the model, It doesn’t work, I don’t manage to execute the executing fortran file. This file is copying in the temporary folder with the input file but the execution is impossible (it was ./beam -x beam.xml in the video example case).

I tried differents ways but without success.

And I have the impression that this is the theorical simple coupling execution, I will probably need later to open a putty or mobaxterm session to execute a commercial FEM code (or more simply use Linux Persalys version and use a shell program…).

Is someone have an idea, it would be great !!! :face_with_monocle:

Thank you

Laurent




Hi Laurent,

I would say Command1 screenshot is the way to go, except that the paths to your caches and working directory contain slashes (linux style) instead of anti-slashes (windows style). That may explain the problem you are facing, please keep me posted

Cheers

Hi Guillaume

Thanks you for reply…

The slashes (Linux) is used by Persalys to define the working directory (by clicking on the 3 dot icon). So I don’t change the style and let Persalys write the path.

Indeed, the anti-slashes (Windows) command come directly from a windows explorer copy paste which use anti-slashes.

But the anti-slashes doesn’t correct the problem neither the slashes. I join screenshot to illustrate.

Laurent




Hi Laurent,

Indeed my question about slashes/anti-slashes was misleading. Both should not pose any issue regarding the evaluation of a coupling model.

However the message you are reading points to a failure during the execution of your code. A few questions so I can better understand your issue:

  • How do you parse the input file to your executable? absolute/relative paths?
  • Did you add the executable as a resource in the dedicated tab?
  • What is the content of the working folder when you try to evaluate the model?

Let me know,
Cheers

Hi Guillaume,

My objective is to pilot a bending stress calculation (beam with a load) with Persalys and in a second time to do reliability calculation (SORM and MC).

Persalys create an input file (.txt) with all the input data (length, load, thickness, etc…). This file is based on an template file.
The stress calculation is made by a fortran program. This program read the input file and calculate the bending stress. It write an output file with the bending stress.
Persalys read the output file, detect the bending stress value et this process is repeated until convergence is reached

The answers to your questions are :

  • Template input file : absolute path
  • Configurated input file : just the file name
  • Fortran file : added in the ressource tab
  • Cmd executable file (cmd.exe) : absolute path

The temporary calculation folder contain the input file and the fortran executable file.

I have the impression that execute a file in a linux version is easier (./program name) but I don’t know how to write the sequence in a “windows form”. I even tried a .bat file but it doesn’t work too.

I send you the files since this case is a coupling test (I change the extension in .xml…).

PS : This coupling method come from Phimecasoft which work with windows. All my previous coupling studies, defined with windows, pilot an abaqus models. It’s been several months since I did these studies again but the execution sequence was made by a .vbs file which open putty, open a session with my login and my password and excecute a command line (here abaqus job…). The execution sequence was done with a specific Phimecasoft command and I don’t find an equivalence with Persalys (until now :wink:)

PS2: With the Linux version, this link may be easier but I can’t try for the moment… another problem occurs (Missing Libraries).

Thank you Guillaume

Bye

Lolo

Couplage_Persalys.exe.xml (323 KB)
Couplage_Persalys.f.xml (1003 Bytes)
Exemple_Poutre_Couplage.h5.xml (250.2 KB)
Exemple_Poutre_Couplage.xml (53.1 KB)
Input_Template.xml (142 Bytes)

Hi @Lolo,

You were almost there. I got it working on a virtual windows machine by setting the command as a shell command (checkbox checked in command tab) and setting the command simply as ‘Couplage_Persalys.exe’

As far as the linux version goes, I tested it, and it also worked pretty well. In your case and as a reminder glibc>=2.17 is one of persalys requirements (even to run the appImage)

From persalys readme:

  • Windows:

    • requirements: Windows>=7, KB2533623 and KB2999226 updates
    • to use system OpenGL libs remove the provided opengl32.dll
  • Linux:

    • requirements: glibc>=2.17, X11/Wayland, OpenGL>=3.2
    • no install required, just run the .AppImage

Hope this helps,
Cheers

Hi @GGarcia

Indeed, it was probably one of the solution I didn’t try :sweat_smile:

But It works.

Shell” was for me only link to Linux environment so I did’nt activate the checkbox. But It must refer to cmd or Powershell in Windows environment.

Thank you for requirements. Linux version works now. I will make a post for that but I don’t know what our support really did (kind of update, etc…).

For me, it’s good. I will test coupling tools on both Persalys version.

Thank you