SCOTCH SAT compilation error ubuntu 22.04

Hello,
i am trying to compile natively salome in my computer which has tuxedo OS 3 (it is detected as ubuntu 22.04, normal as it is based on).
the compilation goes well until scotch compilation which fails.
here is the log that I found in the SALOME-master-native-UB22.04/LOGS/scotch/script
script.txt (89,1 KB)
it fails to find mpi.h

In file included from dummysizes.c:94:
common.h:125:21: fatal error: mpi.h: No such file or directory
125 | #include <mpi.h>
| ^~~~~~~
compilation terminated.
make[2]: *** [Makefile:3104: ptdummysizes] Error 1
make[2]: *** Waiting for unfinished jobs…
make[2]: Leaving directory ‘/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/BUILD/scotch/src/libscotch’
make[1]: *** [Makefile:72: ptscotch] Error 2
make[1]: Leaving directory ‘/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/BUILD/scotch/src/libscotch’
make: *** [Makefile:103: libptscotch] Error 2
ERROR on make

I made an issue in the salome github but I see that @NabilG is more prompt to help here in this regards, I will post the solution after in the git

you need to install libopenmpi-dev

hello nabil,
It is already installed
sudo apt install libopenmpi-dev

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
libopenmpi-dev is already the newest version (4.1.2-2ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.

can you share (attach) the list of installed packages ?

you mean the output of this command, no?
SAT/sat -o "APPLICATION.properties.git_server='github'" compile SALOME-master-native --clean_all
log.part7.txt (21,7 KB)

I mean the output of apt list --installed > TUB22.txt

1 Like

my bad, sorry.
TUB22.txt (220,8 KB)

I will look at it later today and get back to you.

seems like the system path for openmpi differs from ubuntu. Thus, the need to fix openmpi.py.
Can you try the following :

  • check whether mpi.h is in /usr/include/openmpi
  • otherwise, run:
    python3 -c 'import distro; print(distro.name().lower())' and check whether it returns something else than ubuntu.
  • edit openmpi.py and add a section about tuxedo.
  • rerun the compilation
  • if OK, open a pull request
  • if not, we will investigate further.

Finally, one can also override CC with export CC=$(which mpicc)

hello nabil,
thanks for your help.

check whether mpi.h is in /usr/include/openmpi
there is no openmpi folder in /usr/include not mpi.h directly in that folder

otherwise, run:
python3 -c 'import distro; print(distro.name().lower())' and check whether it returns something else than ubuntu.

I get tuxedo os , so not sure how salome scrip gets the ubuntu of the folder SALOME-master-native-UB22.04 created during the compilation, does it get it with a different command maybe?
also tested with import platform; platform.linux_distribution()[0].lower() (got from the python script, but I get an error that platform does not have linux_distribution() property, maybe something to correct? or it does this properties for the rocky/centos/fedora?

so I change line 34 of the python file from:
elif any(distribution in distro.name().lower() for distribution in ["debian", "ubuntu"]) :
to:
elif any(distribution in distro.name().lower() for distribution in ["debian", "ubuntu", "tuxedo os"]) :

the compilation now works, I am not sure how to do the gitpull. would love if instead of doing it for me, you give me a brief explication how to do it so I can do it for any other problems I find in the future.

also:
in the compilation I also observed this (is it normal?):

Compilation of CONFIGURATION … ignored
Compilation of PERSALYS … KO

for openmpi, can you open a pull request on sat_salome following this description ?

concerning PERSALYS, can you share the log file - please check also this thread concerning latex

1 Like

hello nabil,
I had the time to re tested today, I am having issues that several things are asking for a user logging (to https://codev-tuleap.cea.fr) during the compilation such as paravis

PARAVIS:                    GIT:https://github.com/SalomePlatform/paravis.git                                tag:master ..... Username for 'https://codev-tuleap.cea.fr': 
Password for 'https://codev-tuleap.cea.fr': 
Username for 'https://codev-tuleap.cea.fr': 
Password for 'https://codev-tuleap.cea.fr': 
WARNING: <KO> launch command rc=1 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  --recurse-submodules  https://github.com/SalomePlatform/paravis.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS
res=$?
if [ $res -eq 0 ]; then
  touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS
fi
exit $res

WARNING: <KO> result command stdout&stderr:
b"+ git clone --recurse-submodules https://github.com/SalomePlatform/paravis.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS\nCloning into '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS'...\nSubmodule 'src/Plugins/MEDReader' (https://codev-tuleap.cea.fr/plugins/git/salome/medreader) registered for path 'src/Plugins/MEDReader'\nCloning into '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS/src/Plugins/MEDReader'...\nfatal: Authentication failed for 'https://codev-tuleap.cea.fr/plugins/git/salome/medreader/'\nfatal: clone of 'https://codev-tuleap.cea.fr/plugins/git/salome/medreader' into submodule path '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS/src/Plugins/MEDReader' failed\nFailed to clone 'src/Plugins/MEDReader'. Retry scheduled\nCloning into '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS/src/Plugins/MEDReader'...\nfatal: Authentication failed for 'https://codev-tuleap.cea.fr/plugins/git/salome/medreader/'\nfatal: clone of 'https://codev-tuleap.cea.fr/plugins/git/salome/medreader' into submodule path '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS/src/Plugins/MEDReader' failed\nFailed to clone 'src/Plugins/MEDReader' a second time, aborting\n+ res=1\n+ [ 1 -eq 0 ]\n+ exit 1\n"

git command failed! Wait 30 seconds and give an other try (2/3)
WARNING: <KO> launch command rc=128 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  --recurse-submodules  https://github.com/SalomePlatform/paravis.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS
res=$?
if [ $res -eq 0 ]; then
  touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS
fi
exit $res

WARNING: <KO> result command stdout&stderr:
b"+ git clone --recurse-submodules https://github.com/SalomePlatform/paravis.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS\nfatal: destination path '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS' already exists and is not an empty directory.\n+ res=128\n+ [ 128 -eq 0 ]\n+ exit 128\n"

git command failed! Wait 30 seconds and give an other try (3/3)
WARNING: <KO> launch command rc=128 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  --recurse-submodules  https://github.com/SalomePlatform/paravis.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS
res=$?
if [ $res -eq 0 ]; then
  touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS
fi
exit $res

WARNING: <KO> result command stdout&stderr:
b"+ git clone --recurse-submodules https://github.com/SalomePlatform/paravis.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS\nfatal: destination path '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/PARAVIS' already exists and is not an empty directory.\n+ res=128\n+ [ 128 -eq 0 ]\n+ exit 128\n"
KO

Hi Franco,
it is a known issue which is being about to be fixed

1 Like

hello nabil,
I tested in my pc to recompile from zero using the script with the following lines:

SALOME_WORKSPACE=$PWD
export SALOME_WORKSPACE=$PWD
git clone https://github.com/SalomePlatform/sat.git SAT
git clone https://github.com/SalomePlatform/sat_salome.git SAT_SALOME

systemTux='tuxedo os'
sed -i "s|, \"ubuntu\"|, \"ubuntu\", \"$systemTux\"|"  $SALOME_WORKSPACE/SAT_SALOME/products/env_scripts/scotch.py

cd $SALOME_WORKSPACE
SAT/sat init --add_project $PWD/SAT_SALOME/salome.pyconf

the sed changes correctly the file as it can be seen in the resulting line here:
elif any(distribution in distro.name().lower() for distribution in ["debian", "ubuntu", "tuxedo os"]) :
but during the compilation scotch still fails.
I checked that

        prereq_inc='/usr/include/scotch-long'
        prereq_lib='/usr/lib/x86_64-linux-gnu/scotch-long'

are correctly there and there are.
same error:

In file included from dummysizes.c:94:
common.h:125:21: fatal error: mpi.h: No such file or directory
125 | #include <mpi.h>
| ^~~~~~~
compilation terminated.
make[2]: *** [Makefile:3104: ptdummysizes] Error 1
make[2]: *** Waiting for unfinished jobs…
make[2]: Leaving directory ‘/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/BUILD/scotch/src/libscotch’
make[1]: *** [Makefile:72: ptscotch] Error 2
make[1]: Leaving directory ‘/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/BUILD/scotch/src/libscotch’
make: *** [Makefile:103: libptscotch] Error 2
ERROR on make

The issue about PARAVIS and MEDReader submodule is fixed in SAT commit ID: ecd2520

1 Like

now with sat I am getting KO for CAS and mmgpluging:

CAS:                        GIT:http://git.dev.opencascade.org/repos/occt.git                                tag:CR780-SALOME-PATCH . WARNING: <KO> launch command rc=1 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  http://git.dev.opencascade.org/repos/occt.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git --work-tree=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS checkout CR780-SALOME-PATCH
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git status | grep HEAD
if [ $? -ne 0 ]; then
  exit 1
fi
touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS
if [ $? -ne 0 ]; then
  exit 1
fi
exit 0
WARNING: <KO> result command stdout&stderr:
b"+ git clone http://git.dev.opencascade.org/repos/occt.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS\nCloning into '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS'...\nUpdating files:  86% (31230/36063)\rUpdating files:  87% (31375/36063)\rUpdating files:  88% (31736/36063)\rUpdating files:  89% (32097/36063)\rUpdating files:  90% (32457/36063)\rUpdating files:  91% (32818/36063)\rUpdating files:  92% (33178/36063)\rUpdating files:  93% (33539/36063)\rUpdating files:  94% (33900/36063)\rUpdating files:  95% (34260/36063)\rUpdating files:  96% (34621/36063)\rUpdating files:  97% (34982/36063)\rUpdating files:  98% (35342/36063)\rUpdating files:  99% (35703/36063)\rUpdating files: 100% (36063/36063)\rUpdating files: 100% (36063/36063), done.\n+ [ 0 -ne 0 ]\n+ git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git --work-tree=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS checkout CR780-SALOME-PATCH\nSwitched to a new branch 'CR780-SALOME-PATCH'\nBranch 'CR780-SALOME-PATCH' set up to track remote branch 'CR780-SALOME-PATCH' from 'origin'.\n+ [ 0 -ne 0 ]\n+ git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git status\n+ grep HEAD\n+ [ 1 -ne 0 ]\n+ exit 1\n"

git command failed! Wait 30 seconds and give an other try (2/3)
WARNING: <KO> launch command rc=1 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  http://git.dev.opencascade.org/repos/occt.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git --work-tree=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS checkout CR780-SALOME-PATCH
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git status | grep HEAD
if [ $? -ne 0 ]; then
  exit 1
fi
touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS
if [ $? -ne 0 ]; then
  exit 1
fi
exit 0
WARNING: <KO> result command stdout&stderr:
b"+ git clone http://git.dev.opencascade.org/repos/occt.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS\nfatal: destination path '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS' already exists and is not an empty directory.\n+ [ 128 -ne 0 ]\n+ exit 1\n"

git command failed! Wait 30 seconds and give an other try (3/3)
WARNING: <KO> launch command rc=1 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  http://git.dev.opencascade.org/repos/occt.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git --work-tree=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS checkout CR780-SALOME-PATCH
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git status | grep HEAD
if [ $? -ne 0 ]; then
  exit 1
fi
touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS
if [ $? -ne 0 ]; then
  exit 1
fi
exit 0
WARNING: <KO> result command stdout&stderr:
b"+ git clone http://git.dev.opencascade.org/repos/occt.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS\nfatal: destination path '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/CAS' already exists and is not an empty directory.\n+ [ 128 -ne 0 ]\n+ exit 1\n"
KO
mmgplugin:                  GIT:https://github.com/SalomePlatform/mmgplugin.git                              tag:main ....... WARNING: <KO> launch command rc=1 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  https://github.com/SalomePlatform/mmgplugin.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git --work-tree=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin checkout main
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git status | grep HEAD
if [ $? -ne 0 ]; then
  exit 1
fi
touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin
if [ $? -ne 0 ]; then
  exit 1
fi
exit 0
WARNING: <KO> result command stdout&stderr:
b"+ git clone https://github.com/SalomePlatform/mmgplugin.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin\nCloning into '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin'...\n+ [ 0 -ne 0 ]\n+ git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git --work-tree=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin checkout main\nAlready on 'main'\nYour branch is up to date with 'origin/main'.\n+ [ 0 -ne 0 ]\n+ git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git status\n+ grep HEAD\n+ [ 1 -ne 0 ]\n+ exit 1\n"

git command failed! Wait 30 seconds and give an other try (2/3)
WARNING: <KO> launch command rc=1 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  https://github.com/SalomePlatform/mmgplugin.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git --work-tree=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin checkout main
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git status | grep HEAD
if [ $? -ne 0 ]; then
  exit 1
fi
touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin
if [ $? -ne 0 ]; then
  exit 1
fi
exit 0
WARNING: <KO> result command stdout&stderr:
b"+ git clone https://github.com/SalomePlatform/mmgplugin.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin\nfatal: destination path '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin' already exists and is not an empty directory.\n+ [ 128 -ne 0 ]\n+ exit 1\n"

git command failed! Wait 30 seconds and give an other try (3/3)
WARNING: <KO> launch command rc=1 cwd=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES:

set -x
git clone  https://github.com/SalomePlatform/mmgplugin.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git --work-tree=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin checkout main
if [ $? -ne 0 ]; then
  exit 1
fi
git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git status | grep HEAD
if [ $? -ne 0 ]; then
  exit 1
fi
touch -d "$(git --git-dir=/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin/.git  log -1 --format="%ai")" /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin
if [ $? -ne 0 ]; then
  exit 1
fi
exit 0
WARNING: <KO> result command stdout&stderr:
b"+ git clone https://github.com/SalomePlatform/mmgplugin.git /home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin\nfatal: destination path '/home/franco/Downloads/salomeTest/SALOME-master-native-UB22.04/SOURCES/mmgplugin' already exists and is not an empty directory.\n+ [ 128 -ne 0 ]\n+ exit 1\n"
KO

sorry for the inconvenience. I should have tested non SALOME modules as well. commit is reverted until more robust implementation regarding the non salome modules.

reported issue about git should in principle be fixed now - checked on my side on various git versions as well as on windows & linux.

can confirm that all deps are correctly graved by SAT tool (y)

Hi Franco,
thanks for your valuable feedback. Can you tell whether the issue about scotch compilation is still present ?
Indeed, note that one can “force” usage of mpicc and mpicxx wrappers by:

export CC=$(which mpicc)
export CXX=$(which mpicxx)