From 5b9a16fee25a096020558a850d3fa44a4c3605b0 Mon Sep 17 00:00:00 2001 From: benoit128 Date: Fri, 12 Jul 2024 13:36:51 +0200 Subject: [PATCH] All: portage ubuntu --- .../Generator/Netgen/general/dynamicmem.cpp | 1 + Cassiopee/KCore/Dist.py | 12 ++++++++++-- Cassiopee/KCore/installBase.py | 8 ++++---- docs/developers/Install/ubuntu.md | 17 ++++++++++++++--- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/Cassiopee/Generator/Generator/Netgen/general/dynamicmem.cpp b/Cassiopee/Generator/Generator/Netgen/general/dynamicmem.cpp index 6e0425d81..5d7f818a5 100644 --- a/Cassiopee/Generator/Generator/Netgen/general/dynamicmem.cpp +++ b/Cassiopee/Generator/Generator/Netgen/general/dynamicmem.cpp @@ -1,4 +1,5 @@ #include +#include using namespace std; diff --git a/Cassiopee/KCore/Dist.py b/Cassiopee/KCore/Dist.py index 7f157e607..d65639d65 100644 --- a/Cassiopee/KCore/Dist.py +++ b/Cassiopee/KCore/Dist.py @@ -192,14 +192,22 @@ def getInstallPath(prefix): pythonVersion = pythonLib[-2] Site = pythonLib[-1] Lib = pythonLib[-3] - installPath = '%s/%s/%s/site-packages'%(prefix, Lib, pythonVersion) + installPath = '%s/%s/%s/site-packages'%(prefix, Lib, pythonVersion) + elif os.environ['ELSAPROD'][0:6] == 'ubuntu': # debian style + pythonLib = distutils.sysconfig.get_python_lib() + pythonLib = pythonLib.split('/') + pversion = sys.version_info + pythonVersion = "python{}.{}".format(pversion[0], pversion[1]) + Site = pythonLib[-1] + Lib = pythonLib[-3] + installPath = '%s/local/%s/%s/dist-packages'%(prefix, Lib, pythonVersion) elif mySystem == 'Windows' or mySystem == 'mingw': installPath = prefix + "/Lib/site-packages" elif mySystem == 'Darwin': pythonLib = distutils.sysconfig.get_python_lib() pythonLib = pythonLib.split('/') pythonVersion = pythonLib[-2] - installPath = prefix + '/lib/python'+pythonVersion+'/site-packages' + installPath = prefix + '/lib/python'+pythonVersion+'/site-packages' else: # unix pythonLib = distutils.sysconfig.get_python_lib() pythonLib = pythonLib.split('/') diff --git a/Cassiopee/KCore/installBase.py b/Cassiopee/KCore/installBase.py index 85e2974d8..09d02b728 100644 --- a/Cassiopee/KCore/installBase.py +++ b/Cassiopee/KCore/installBase.py @@ -713,7 +713,7 @@ [] # NvccAdditionalOptions ], ############################################################################### -'ubuntu': [ 'Linux ubuntu (Onera)', +'ubuntu': [ 'Linux ubuntu 24.04', 'gfortran', # f77compiler 'gfortran', # f90compiler 'gcc', # Cppcompiler @@ -721,9 +721,9 @@ [], # f77AdditionalOptions True, # useOMP False, # static -[], # additionalIncludePaths -[], # additionalLibs -[], # additionalLibPaths +['/usr/include/hdf5/openmpi', '/usr/lib/x86_64-linux-gnu/openmpi/include'], # additionalIncludePaths +['gfortran', 'gomp'], # additionalLibs +['/usr/lib/x86_64-linux-gnu/hdf5/openmpi', '/usr/lib/x86_64-linux-gnu'], # additionalLibPaths False, # useCuda [] # NvccAdditionalOptions ], diff --git a/docs/developers/Install/ubuntu.md b/docs/developers/Install/ubuntu.md index 26ce9e950..89a915876 100644 --- a/docs/developers/Install/ubuntu.md +++ b/docs/developers/Install/ubuntu.md @@ -1,14 +1,25 @@ # Installation on ubuntu (linux) +Tested on ubuntu 24.04. + ## Install dependencies ```shell sudo apt-get install python3-dev -sudo apt-get install python-numpy +sudo apt-get install python3-numpy +sudo apt-get install python3-distutils-extra +sudo apt-get install pip sudo apt-get install scons sudo apt-get install gcc +sudo apt-get install g++ sudo apt-get install gfortran -sudo apt-get install hdf5 -sudo apt-get install xorg-dev +sudo apt-get install libopenmpi-dev +sudo apt-get install libhdf5-openmpi-dev + +sudo apt-get install python3-mpi4py +sudo apt-get install libglu1-mesa-dev +sudo apt-get install mesa-common-dev +sudo apt-get install xorg-dev + ``` ## Install Cassiopee