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: 84
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: 84
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: 84
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: 84
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: 84
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

#63 2022-07-04 18:30:36

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

Re: Salome Meca 2021 on WSL2

When running salome-meca on WSL the mouse pointer is very big
Can'f find a way to diminish the cursor.

Roger

Offline

#64 2022-07-20 22:13:47

pbedenbaugh
Member
Registered: 2020-12-12
Posts: 2

Re: Salome Meca 2021 on WSL2

Following the instructions of post 1 of this thread, I obtained a running version of salome-meca.
It had a few problems:
1. It ran in software GL mode, although my computer has a mobile Nvidia card
2. Perhaps as a consequence, updating the screen was often incomplete, but the screen could be updated by switching between steps in aster-study.
3. Although the interactive performance was adequate for a simple tutorial, running the tutorial consumed very little resource, but consumed about 2 hours of wall-clock time (Divijay Patankar example 2 https: / / youtu.be/qZxoJVP0L98).

In response I have begun to explore WSL2/Ubuntu22.04/Singularity.
Should new installations use Apptainer in lieu of singularity ?
If using the debian package for singularity (https: / / github.com/sylabs/singularity/releases/download/v3.10.1/singularity-ce_3.10.1-jammy_amd64.deb) , is it necessary to also build golang and other pre-requisites of a source installation ?

Thank-you

Offline

#65 2022-07-21 05:12:20

pbedenbaugh
Member
Registered: 2020-12-12
Posts: 2

Re: Salome Meca 2021 on WSL2

I did an experiment.
Running Windows 11 and WSL2, build 22621r1
Fresh windows store install of Ubuntu 22.04

install golang from a linux binary
sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz

install singularity from a debian package:
wget -c https:/ /github.com/sylabs/singularity/releases/download/v3.10.1/singularity-ce_3.10.1-jammy_amd64.deb
sudo apt install ./singularity-ce_3.10.1-jammy_amd64.deb

prep directories - not sure if it is required, but I took a suggestion from this forum.
sudo rm -r /dev/shm
sudo mkdir /dev/shm
sudo chmod 777 /dev/shm
chmod 777 .singularity/

Also, from a suggestion of this forum:
curl -sfL https:/ /install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0

sudo singularity run --app install ./salome_meca-lgpl-2021.0.0-2-20211014-scibian-9.sif
singularity run --app install ./salome_meca-lgpl-2021.0.0-2-20211014-scibian-9.sif


Now, running the script does find the GPU, but it generates errors and exits.

./salome_meca-lgpl-2021.0.0-2-20211014-scibian-9
not exist: /etc/krb5.conf
/usr/bin/nvidia-smi
**************************************
INFO : Running salome_meca in GPU mode
**************************************
runSalome running on EGR
Searching for a free port for naming service: 2819 - OK
Searching Naming Service  + found in 0.1 seconds
Searching /Kernel/Session in Naming Service  +++++SALOME_Session_Server: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /.singularity.d/libs/libGLX.so.0)
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 12993 for /Kernel/Session not found


On the hypothesis that the singularity container had a strict x-server requirement, I tested x11-apps.
sudo apt install x11-apps

NOTE: xclock and xcalc display properly and run fine.

vcxsrv on Xlaunch on windows did not change the result.



I appreciate your consideration and suggestions to install the singularity salome-meca either on Ubuntu, or in a workably fast installation following the instructions for the prepared debian distribution.

Kind regards.

Offline