Open yungyuc opened 1 year ago
solvcon/devenv
provides most dependencies / toolchains for projects such as solvcon/modmesh
[1].
solvcon/modmesh
is a toolkit designed for solving partial differential equations(PDE) and for visualizing numerical meshes.
The goal of this issue is to utilize devenv
to enable modmesh
to be built on the NCHC's Taiwania-1 supercomputer[2].
When building modmesh on Taiwania-1, the biggest challenge is the absence of toolchains for Qt and Pyside6. The building steps have been documented here: https://hackmd.io/@terrychan999/twnia-1_modmesh Therefore, there is a need to write a script to accomplish automation.
Automatic Build System: solvcon/devenv
Version Control: git
Scripting Language: Bash
Computing Platform: NCHC's Taiwania-1
solvcon/modmesh
: https://github.com/solvcon/modmeshThanks @terrychan999 . I think we can remove the "schedule" part. Do you have prototype scripts for PR?
I've just found the time today to start working on the script. I'll try to submit a PR by tonight.
Thanks, @terrychan999 . If the PR is not ready we don't need to rush it. But it would be great if you can make a brief update for what you wanted to do.
I have written a PBS script to enable the building process on the compute node.
#!/bin/bash
#PBS -P <Project_System_Code>
#PBS -N build_modmesh_env
#PBS -l select=1:ncpus=16:mpiprocs=16
#PBS -q <Node_Type>
#PBS -j oe
if [ -f ~/devenv/scripts/init ]; then source ~/devenv/scripts/init; fi
module load gcc/11.2.0
export CC=/pkg/gcc/11.2.0/bin/gcc
export CXX=/pkg/gcc/11.2.0/bin/g++
export LLVM_INSTALL_DIR=~/libclang120
devenv add scia
devenv use scia
export PKG_CONFIG_PATH="$(pkg-config --variable pc_path pkg-config)"
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DEVENVPREFIX}/lib64/pkgconfig
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DEVENVPREFIX}/lib/pkgconfig
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DEVENVPREFIX}/share/pkgconfig
devenv build xcb
devenv build cmake
devenv build openssl
devenv build python
pip3 cache purge
pip3 install ninja meson
devenv build libxkbcommon
QTSRC=/tmp/${PBS_JOBID} SKIPEXTRACT=1 SUB_VER=3 devenv build qt
pip3 install numpy pytest flake8 matplotlib pybind11
git clone https://code.qt.io/pyside/pyside-setup /tmp/${PBS_JOBID}/pyside-setup
cd /tmp/${PBS_JOBID}/pyside-setup && git checkout 6.5.3
pip3 install setuptools==67.8.0 packaging build==0.7 six wheel>=0.35 PyOpenGL pyinstaller==3.6 nuitka==1.4.8 distro patchelf==0.15 pkginfo jinja2 buildozer==1.5.0 tqdm gitpython
python3 setup.py install --qtpaths=${DEVENVPREFIX}/bin/qtpaths --make-spec=ninja --ignore-git --parallel=16
However, I encountered an issue that the compute node lacks libffi-devel
, preventing Python from building _ctypes
, which is required for some packages.
the login node:
[u0617048@clogin2 ~]$ yum list installed | grep libffi
libffi.x86_64 3.0.13-18.el7 @anaconda/7.3
libffi-devel.x86_64 3.0.13-18.el7 @rhel-7-server-rpms
the compute node, I wrote a command in PBS script yum list installed | grep libffi >> libffi.log
[u0617048@clogin2 ~]$ cat libffi.log
libffi.x86_64 3.0.13-18.el7 @anaconda/7.3
I am currently testing a compatible version of libffi to build it from the source.
Thanks for the update. I concur that we probably need to build libffi ourselves.
The directory
applications/
houses scripts for building development environment for specific repository and farms. Create a new sub-directorymodmesh/
under it and include the build scripts for building modmesh on Taiwania1.