Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an application for building modmesh on Taiwania1 #153

Open
yungyuc opened this issue Apr 4, 2023 · 7 comments
Open

Add an application for building modmesh on Taiwania1 #153

yungyuc opened this issue Apr 4, 2023 · 7 comments

Comments

@yungyuc
Copy link
Member

yungyuc commented Apr 4, 2023

The directory applications/ houses scripts for building development environment for specific repository and farms. Create a new sub-directory modmesh/ under it and include the build scripts for building modmesh on Taiwania1.

@terrychan999
Copy link
Contributor

terrychan999 commented Nov 12, 2023

Automation of Dependency Building on Taiwania

Basic Information

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].

Problem To Solve

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.

Engineering Infrastructure

Automatic Build System: solvcon/devenv
Version Control: git
Scripting Language: Bash
Computing Platform: NCHC's Taiwania-1

References

  1. solvcon/modmesh: https://github.com/solvcon/modmesh
  2. NCHC Taiwania-1: https://iservice.nchc.org.tw/nchc_service/nchc_service_hpc.php

@yungyuc
Copy link
Member Author

yungyuc commented Nov 13, 2023

Thanks @terrychan999 . I think we can remove the "schedule" part. Do you have prototype scripts for PR?

@terrychan999
Copy link
Contributor

I've just found the time today to start working on the script.
I'll try to submit a PR by tonight.

@yungyuc
Copy link
Member Author

yungyuc commented Nov 15, 2023

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.

@terrychan999
Copy link
Contributor

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

@terrychan999
Copy link
Contributor

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.

@yungyuc
Copy link
Member Author

yungyuc commented Nov 17, 2023

Thanks for the update. I concur that we probably need to build libffi ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants