Welcome to the forums. Please post in English or French.

You are not logged in.

#51 2022-02-07 11:08:21

hberro
Member
From: Palaiseau, France
Registered: 2011-07-05
Posts: 130

Re: Salome Meca 2021 on WSL2

If you run, say

xclock

Does it appear?

If you are using WSL2 with integrates graphics, you can try running salome_meca directly...

Offline

#52 2022-02-07 11:28:32

rmoortgat
Member
From: Belgium
Registered: 2016-08-30
Posts: 52
Website

Re: Salome Meca 2021 on WSL2

xclock gives : Error: Can't open display

salome_meca gives:
user@DESKTOP-PMGA9BL:/mnt/c/Salome_WSL> salome_meca
INFO: Running salome_meca on wslg display (rdp implementation)
[sudo] password for root:
*****************************************************
INFO : Running salome_meca in software rendering mode
*****************************************************
runSalome running on DESKTOP-PMGA9BL
Searching for a free port for naming service: 2823 - OK
Searching Naming Service  + found in 0.1 seconds
Searching /Kernel/Session in Naming Service  ++++++++++++++++++++Traceback (most recent call last):
  File "/opt/salome_meca/Salome-V2021-s9/modules/KERNEL_V9_7_0/bin/salome/orbmodule.py", line 181, in waitNSPID
    os.kill(thePID,0)
ProcessLookupError: [Errno 3] No such process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/salome_meca/appli_V2021/bin/salome/runSalome.py", line 694, in useSalome
    clt = startSalome(args, modules_list, modules_root_dir)
  File "/opt/salome_meca/appli_V2021/bin/salome/runSalome.py", line 639, in startSalome
    session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session)
  File "/opt/salome_meca/Salome-V2021-s9/modules/KERNEL_V9_7_0/bin/salome/orbmodule.py", line 183, in waitNSPID
    raise RuntimeError("Process %d for %s not found" % (thePID,theName))
RuntimeError: Process 1792 for /Kernel/Session not found


--- Error during Salome launch ---

Offline

#53 2022-02-07 11:38:50

hberro
Member
From: Palaiseau, France
Registered: 2011-07-05
Posts: 130

Re: Salome Meca 2021 on WSL2

Ok you clearly have a problem with the graphics part (this is indépendant of salome meca).

You need to install an x server like VcXsrv in windows so that you can run graphical apps in wsl.

It should be straightforward.

Offline

#54 2022-02-07 14:00:51

rmoortgat
Member
From: Belgium
Registered: 2016-08-30
Posts: 52
Website

Re: Salome Meca 2021 on WSL2

You need to install an x server like VcXsrv in windows so that you can run graphical apps in wsl.

I did actually following your procedure and recommandations but it still doesn't work.
I give up, i'm happy with the Linux version.

Roger

Offline

#55 2022-02-09 14:17:11

rmoortgat
Member
From: Belgium
Registered: 2016-08-30
Posts: 52
Website

Re: Salome Meca 2021 on WSL2

I updatet to win 11 and now it works however with a lot of warnings.

user@DESKTOP-PMGA9BL:/mnt/c/Salome_WSL> salome_meca
INFO: Running salome_meca on wslg display (rdp implementation)
[sudo] password for root:
*****************************************************
INFO : Running salome_meca in software rendering mode
*****************************************************
runSalome running on DESKTOP-PMGA9BL
Searching for a free port for naming service: 2836 - OK
Searching Naming Service  + found in 0.1 seconds
Searching /Kernel/Session in Naming Service  ++++++++++++++++++++++++++ found in 13.0 seconds
Start SALOME, elapsed time :  13.7 seconds
****************************************************************
     Warning: module GHS3DPLUGIN is improperly configured!
     Module GHS3DPLUGIN will not be available in GUI mode!
****************************************************************
****************************************************************
     Warning: module GHS3DPRLPLUGIN is improperly configured!
     Module GHS3DPRLPLUGIN will not be available in GUI mode!
****************************************************************
****************************************************************
     Warning: module BLSURFPLUGIN is improperly configured!
     Module BLSURFPLUGIN will not be available in GUI mode!
****************************************************************
****************************************************************
     Warning: module NETGENPLUGIN is improperly configured!
     Module NETGENPLUGIN will not be available in GUI mode!
****************************************************************
****************************************************************
     Warning: module HYBRIDPLUGIN is improperly configured!
     Module HYBRIDPLUGIN will not be available in GUI mode!
****************************************************************
****************************************************************
     Warning: module GMSHPLUGIN is improperly configured!
     Module GMSHPLUGIN will not be available in GUI mode!
****************************************************************
****************************************************************
     Warning: module HexoticPLUGIN is improperly configured!
     Module HexoticPLUGIN will not be available in GUI mode!
****************************************************************

Offline

#56 2022-02-09 14:24:05

hberro
Member
From: Palaiseau, France
Registered: 2011-07-05
Posts: 130

Re: Salome Meca 2021 on WSL2

Perfect!

Glad to know it works finally.

These warnings are harmless.

Offline

#57 2022-02-10 10:02:19

rmoortgat
Member
From: Belgium
Registered: 2016-08-30
Posts: 52
Website

Re: Salome Meca 2021 on WSL2

I try to run it with a batch file.

cd c:\salome_wsl
wsl --distribution SalomeMeca2021 --user user
start salome_meca

however powershell opens but the salome_meca command is not executed.

Roger

Offline

#58 2022-02-11 12:44:59

hberro
Member
From: Palaiseau, France
Registered: 2011-07-05
Posts: 130

Re: Salome Meca 2021 on WSL2

Maybe it fails because it need an executable script to run.

If I'm not mistaken salome_meca is a function in .bashrc

Try :

type salome_meca


And see the output

Then copy that in a separate executable  script (xxx.sh) that you call explicitly from your batch file.

And please share the results to benefit the whole community.

Best regards
HB

Offline

#59 2022-02-12 10:16:40

rmoortgat
Member
From: Belgium
Registered: 2016-08-30
Posts: 52
Website

Re: Salome Meca 2021 on WSL2

This my batch file salome.bat:

cd c:\salome_wsl
wsl --distribution SalomeMeca2021 --user user
./salome.sh salome_meca

cmd /k


This is my shell file salome.sh:
function salome_meca ()
{
    echo "INFO: Running salome_meca on wslg display (rdp implementation)";
    fix_shm;
    singularity run -B /mnt/wslg salome*.sif
}
$1

Unfortunately this doesn't work.
The batch file opens a terminal but doesn't execute salome.sh

C:\WINDOWS\system32>cd c:\salome_wsl

c:\Salome_WSL>wsl --distribution SalomeMeca2021 --user user
user@DESKTOP-PMGA9BL:/mnt/c/Salome_WSL>

Roger

Offline

#60 2022-02-14 13:29:55

carv
Member
Registered: 2021-10-14
Posts: 8

Re: Salome Meca 2021 on WSL2

hberro wrote:
carv wrote:

Hi hberro,

Could you post the checksum for the "code-aster.org/FICHIERS/wsl/smeca-lgpl-wsl2-opensuse.tar" file?

Thanks.

Hi carv,

> md5sum smeca-lgpl-wsl2-opensuse.tar
8609ad7ac072c5a2cc998b3ef324415f  smeca-lgpl-wsl2-opensuse.tar

Best regards

Thank you hberro! It's working now. Finally.

Offline

#61 2022-02-22 19:50:05

evicient
Member
Registered: 2022-02-22
Posts: 1

Re: Salome Meca 2021 on WSL2

Many thanks for this guide. I was able to get it working on Windows10/WSL2.

Since I don't always remember the function name, I made a bash script to launch:
Salome.sh

#!/bin/bash
#launch salome-meca
salome_meca_xlaunch

make executable

sudo chmod 777 Salome.sh

but found I had to add this to the .bashrc file for the script to work:

export -f salome_meca_xlaunch

Offline

#62 2022-02-24 20:59:01

hberro
Member
From: Palaiseau, France
Registered: 2011-07-05
Posts: 130

Re: Salome Meca 2021 on WSL2

rmoortgat, carv : glad to know you got it working!
Thanks for sharing the good news.

Offline