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

You are not logged in.

#26 2021-12-11 16:38:57

guillegiraldo
Member
Registered: 2010-05-05
Posts: 31

Re: Salome Meca 2021 on WSL2

Many thanks!

Offline

#27 2021-12-11 17:21:28

guillegiraldo
Member
Registered: 2010-05-05
Posts: 31

Re: Salome Meca 2021 on WSL2

I had the problem reported above of the application not launching (nor the xclock), through the VcXsrv method (on Windows 10), the error was.

'Error: Can't open display: 172.29.208.1:0'

The problem is Windows' firewall blocking the connection. I found the solution in the following page:

https: // github.com/cascadium/wsl-windows-toolbar-launcher#firewall-rules

Hope this helps someone!

Offline

#28 2021-12-11 19:32:16

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

Re: Salome Meca 2021 on WSL2

Hi hberro,

Thank you for all your help.

There is some update in the last link you released?

Because I can't run the CodeAster in WSLg yet, using the first link.

Regards,

carv

Offline

#29 2021-12-12 08:15:58

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

Re: Salome Meca 2021 on WSL2

carv wrote:

Hi hberro,

Thank you for all your help.

There is some update in the last link you released?

Because I can't run the CodeAster in WSLg yet, using the first link.

Regards,

carv


Hi carv,

No there is no update in the last link, it is the same file as in the first post. Did you try guillegiraldo's link to try to figure out the Firewall settings for Windows ?

Offline

#30 2021-12-12 19:10:32

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

Re: Salome Meca 2021 on WSL2

Hi hberro,

I'm using WSLg.

Offline

#31 2021-12-16 09:59:13

Celdor
Member
From: Germany
Registered: 2021-12-16
Posts: 3

Re: Salome Meca 2021 on WSL2

Hi all,

i have installed two different wsl2 instances. An Arch-Linux and the opensuse distro but i get the exact same error like carv did on both machines. The X11-Forwarding is working as i get xterm and xclock clients to display on the vcxsrv-Server.

carv wrote:

Please some help.

LAPTOP-AR95KVN1:/home/user # singularity run salome_meca-lgpl-2021.0.0-0-20210601-scibian-9.sif

*****************************************************
INFO : Running salome_meca in software rendering mode
*****************************************************
runSalome running on LAPTOP-AR95KVN1
ERROR:salomeContext:Unexpected error:
Traceback (most recent call last):
  File "/opt/salome_meca/Salome-V2021-s9/modules/KERNEL_V9_7_0/bin/salome/salomeContext.py", line 278, in _startSalome
    res = getattr(self, command)(options) # run appropriate method
  File "/opt/salome_meca/Salome-V2021-s9/modules/KERNEL_V9_7_0/bin/salome/salomeContext.py", line 357, in _runAppli
    runSalome.runSalome()
  File "/opt/salome_meca/appli_V2021/bin/salome/runSalome.py", line 925, in runSalome
    clt,args = main()
  File "/opt/salome_meca/appli_V2021/bin/salome/runSalome.py", line 851, in main
    searchFreePort(args, save_config, args.get('useport'))
  File "/opt/salome_meca/appli_V2021/bin/salome/searchFreePort.py", line 116, in searchFreePort
    queue = Queue()
  File "/opt/python/3.6.5/lib/python3.6/multiprocessing/context.py", line 102, in Queue
    return Queue(maxsize, ctx=self.get_context())
  File "/opt/python/3.6.5/lib/python3.6/multiprocessing/queues.py", line 42, in __init__
    self._rlock = ctx.Lock()
  File "/opt/python/3.6.5/lib/python3.6/multiprocessing/context.py", line 67, in Lock
    return Lock(ctx=self.get_context())
  File "/opt/python/3.6.5/lib/python3.6/multiprocessing/synchronize.py", line 163, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
  File "/opt/python/3.6.5/lib/python3.6/multiprocessing/synchronize.py", line 60, in __init__
    unlink_now)
FileNotFoundError: [Errno 2] No such file or directory

I tested "xclock" and the clock shows me.

What am I doing wrong?

Do you have any advice on were i can look further?

Thanks in advance
Celdor

Offline

#32 2021-12-16 16:37:43

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

Re: Salome Meca 2021 on WSL2

HI Celdor,

I'm have the same error yet.

I don't have much free time to try some fixing action.

If you find some solution please share.

Regards.

Offline

#33 2021-12-16 18:48:36

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

Re: Salome Meca 2021 on WSL2

carv wrote:

HI Celdor,

I'm have the same error yet.

I don't have much free time to try some fixing action.

If you find some solution please share.

Regards.

Hello,

Please refer to the initial post and run the command

salome_meca

In the folder containing the sif file.

You should not run the sif file directly using singularity run xxx.sif

Offline

#34 2021-12-16 18:53:53

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

Re: Salome Meca 2021 on WSL2

Reminder regarding the automatic launchers present in the WSL distro:

> salome_meca
For WSLg

> salome_meca_xlaunch
For using an xserver configured on the windows side

These launchers apply a fix to the /dev/shm access and do some bindings when launching the singularity container. If you launch singularity run manually, it is almost certain it will not work.

Offline

#35 2021-12-17 09:24:26

Celdor
Member
From: Germany
Registered: 2021-12-16
Posts: 3

Re: Salome Meca 2021 on WSL2

Hi hberro,

thanks for your reply. Didn't realize that salome_meca[_xlaunch] where seperat scripts to start the container, not generated by the singularity-install described in the general download. My fault. Sorry.

This method works for X11.

Thank you. :-)
Celdor

Last edited by Celdor (2021-12-17 09:29:53)

Offline

#36 2021-12-20 12:34:46

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

Re: Salome Meca 2021 on WSL2

Excellent ! Hope more users get that working on WSL2 !

Offline

#37 2022-01-31 15:48:36

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

Re: Salome Meca 2021 on WSL2

Hi hberro,

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

Thanks.

Offline

#38 2022-02-04 10:29:03

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

Re: Salome Meca 2021 on WSL2

roger@DESKTOP-PMGA9BL:/mnt/c/Salome_WSL$ salome_meca
salome_meca: command not found

Please some help.
Did all the steps as prescribed, however salome_meca doesn't open.

Roger

Offline

#39 2022-02-04 12:08:43

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

Re: Salome Meca 2021 on WSL2

rmoortgat wrote:

roger@DESKTOP-PMGA9BL:/mnt/c/Salome_WSL$ salome_meca
salome_meca: command not found

Please some help.
Did all the steps as prescribed, however salome_meca doesn't open.

Roger

Can you try to run the distro as "user"

wsl --distribution SalomeMeca2021 --user user

The shortcuts to these scripts (salome_meca*) have been added to this user profile only if I'm not mistaken (have a look at the ~/.bashrc file)

Offline

#40 2022-02-04 15:18:48

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

Re: Salome Meca 2021 on WSL2

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

Offline

#41 2022-02-04 16:53:58

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

Re: Salome Meca 2021 on WSL2

Can you try to run the distro as "user"

wsl --distribution SalomeMeca2021 --user user

The shortcuts to these scripts (salome_meca*) have been added to this user profile only if I'm not mistaken (have a look at the ~/.bashrc file)

Thank you for your reply,

now I get

roger@DESKTOP-PMGA9BL:/mnt/c/Salome_WSL$ wsl --distribution SalomeMeca2021 --user roger
wsl: command not found

I suppose I make some stupid mistake however I'm a structural engineer with limited knowledge of programming :-)

Roger

Offline

#42 2022-02-04 17:08:07

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

Re: Salome Meca 2021 on WSL2

The previous command needs to be launched in windows cmd prompt directly and not within the wsl distro.

Offline

#43 2022-02-04 19:13:30

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

Re: Salome Meca 2021 on WSL2

The previous command needs to be launched in windows cmd prompt directly and not within the wsl distro.


Now I get 'The system cannot find the given path'.

Roger

Offline

#44 2022-02-04 19:17:40

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

Re: Salome Meca 2021 on WSL2

When you imported the tar file for the distro, did you use the command ?

wsl --import SalomeMeca2021 C:\Data  C:\Downloads\smeca-lgpl-wsl2-opensuse.tar

For me, it seems that you didn't exactly name your WSL distro as recommended (SalomeMeca2021)

In order to list the WSL distros in your system : (windows command prompt)

wsl --list --all

Offline

#45 2022-02-04 19:46:06

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

Re: Salome Meca 2021 on WSL2

Still no sucess: path not found

PS C:\> wsl --list --all
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
openSUSE-42
SalomeMeca2021
PS C:\> wsl --distribution SalomeMeca2021 --user roger
Het systeem kan het opgegeven pad niet vinden.
PS C:\> wsl --setdefault SalomeMeca2021
PS C:\> wsl --list --all
Windows Subsystem for Linux Distributions:
SalomeMeca2021 (Default)
Ubuntu
openSUSE-42
PS C:\> wsl --distribution SalomeMeca2021 --user roger
Het systeem kan het opgegeven pad niet vinden.
PS C:\>

Kind Regards
Roger

Offline

#46 2022-02-04 20:00:38

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

Re: Salome Meca 2021 on WSL2

wsl --distribution SalomeMeca2021 --user user

Please replace roger by user and try.

Offline

#47 2022-02-04 20:17:59

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

Re: Salome Meca 2021 on WSL2

Still the same problem:

PS C:\Salome_WSL> wsl --distribution SalomeMeca2021 --user user
Het systeem kan het opgegeven pad niet vinden.


Content of map c:\Salome_WSL

ext4.vhdx
salome_meca-lgpl-2021.0.0-1-20210811-scibian-9.sif

Roger

Offline

#48 2022-02-05 18:10:06

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

Re: Salome Meca 2021 on WSL2

Got it up with following error:

user@DESKTOP-PMGA9BL:/mnt/c/Data> salome_meca_xlaunch
INFO: Running salome_meca on an external Xserver (to be configured on windows side)
[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: 2816 - 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 1740 for /Kernel/Session not found


--- Error during Salome launch ---
user@DESKTOP-PMGA9BL:/mnt/c/Data>

Roger

Offline

#49 2022-02-06 12:38:19

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

Re: Salome Meca 2021 on WSL2

Do you have an X server running on windows?

Offline

#50 2022-02-06 19:41:59

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

Re: Salome Meca 2021 on WSL2

Yes, I did as per your instructions

Last edited by rmoortgat (2022-02-07 10:50:59)

Offline