Jonathan Hsu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # HPC ParaSeis 紀錄 [TOC] https://hackmd.io/@Koying/Sy-LZltGR/https%3A%2F%2Fhackmd.io%2F%40NTHUSC%2FHPC-I_2024_Competition%23ParaSeis-15ubunti ## install On "Ubuntu 22.04.4 LTS" 看來要先裝 open mpi http://nthu.site/sc24/ParaSeis.pdf ```bash spack load openmpi@5.0.3 wget http://nthu.site/sc24/ParaSeis.tar.gz tar zxf ParaSeis.tar.gz cd ParaSeis cd lib.src.latest ./install Input MPI Compiler Directory[/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin/]: /opt/.spack/opt/spack/linux-ubuntu22.04-zen2/gcc-11.4.0/openmpi-5.0.3-ccc6ge624vfgynsmfanradnyfjh6jpnj/bin ``` ### 編譯所需 lib 1. 更改 metis 裡的一個 .h 檔 更改了 lib.src.latest/metis.src/Lib/rename.h 裡面的 #define log2 __log2 改成 #define log2 _log2 2. 更改 superLU 程式檔 pdgsrfs_ABXglobal.c 中,移除以下兩個函示宣告和定義中的 static gather_1rhs_diag_to_all redist_all_to_diag 3. 更改 fepg.src/ 的makefile 加上 -fPIE 在 cflags 120 行 CFLAGS_LINUX = -fPIE - 加上 ffflags 137 行 FFLAGS_LINUX = -fallow-argument-mismatch ``` ./install /opt/.spack/opt/spack/linux-ubuntu22.04-zen2/gcc-11.4.0/openmpi-5.0.3-ccc6ge624vfgynsmfanradnyfjh6jpnj/bin ``` ![image](https://hackmd.io/_uploads/SyGCFGMQR.png) 老辦法,pzgsrfs_ABXglobal.c 的 static 拔掉 ### check ``` cd ../src make ``` ![image](https://hackmd.io/_uploads/HyKYoMfmA.png) 一樣在 makefile 加上 -fallow-argument-mismatch 22 行 FFLAGS = -fallow-argument-mismatch $(OPTFLAGS) 好耶看來成功了 ## Running ParaSeis testcase/runit ``` date mpirun -np 8 --host work1:4,head:4 ./ddm date ``` runit.log 有 3.4g ,vs code 直接當機,下載下來看看 嘖,跑到一半斷掉了 ```bash spack load ./runit > runit.log 2>&1 nohup ``` 如果在 work 上跑,會有遇到找不到 share library 的問題 ``` Fri May 17 04:55:33 AM UTC 2024 ./runit-tmp Load openmpi and gcc Run ./ddm ./ddm: error while loading shared libraries: libgfortran.so.5: cannot open shared object file: No such file or directory ./ddm: error while loading shared libraries: libgfortran.so.5: cannot open shared object file: No such file or directory ./ddm: error while loading shared libraries: libgfortran.so.5: cannot open shared object file: No such file or directory ./ddm: error while loading shared libraries: libgfortran.so.5: cannot open shared object file: No such file or directory Fri May 17 04:55:35 AM UTC 2024 ``` ### 測試失敗 - 4 cores at head ![image](https://hackmd.io/_uploads/HkOuyYEQA.png) - 8 cores at work ![image](https://hackmd.io/_uploads/H1q00_4XC.png) ## 效能測試 ```bash ./runit-tmp > runit.log 2>&1 & ``` - 2024/05/29 8 cores at work ``` ddm 還沒有被重編過,makefile 要加上 LIB_GFORTRAN = opt/.spack/opt/spack/linux-ubuntu22.04-zen2/gcc-11.4.0/gcc-14.1.0-affchq7w2n7kmuuu2jbzsjfmge3fcy6y/lib64 LIBS = ... $(LIB_GFORTRAN) 但不知道為啥能跑,理論上 mpirun 要加 -x LD_LIBRARY_PATH=/opt/.spack/opt/spack/linux-ubuntu22.04-zen2/gcc-11.4.0/gcc-14.1.0-affchq7w2n7kmuuu2jbzsjfmge3fcy6y/lib64:$LD_LIBRARY_PATH 才對 ``` 啥所以看來之前跑錯了?? 這個輸出跟時間看起來比較正常,之前幾十G的 log 是怎樣 ![image](https://hackmd.io/_uploads/S1dB4mNER.png) - 16 cores ![image](https://hackmd.io/_uploads/HJaoumN4C.png) - 12 cores work1:8,head:4 ![image](https://hackmd.io/_uploads/SkTeO5NNC.png) 還有一個 528 的 - 14 cores work1:8,head:6 ![image](https://hackmd.io/_uploads/Sk68EiEEC.png) ![image](https://hackmd.io/_uploads/rJHDnPHVA.png) - 2 cores on work ![image](https://hackmd.io/_uploads/ryV9FFrE0.png) ## install on vm On "Ubuntu 22.04.4 LTS" http://nthu.site/sc24/ParaSeis.pdf ### 環境 spack 教學 https://hackmd.io/@William-Mou/spack_command ```bash wget http://nthu.site/sc24/ParaSeis.tar.gz tar zxf ParaSeis.tar.gz sudo apt update sudo apt upgrade echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null sudo apt-get update sudo apt install vim sudo apt install git git clone --depth=100 --branch=releases/v0.22 https://github.com/spack/spack.git ~/spack cd ~/spack . share/spack/setup-env.sh sudo apt install build-essential sudo apt install gfortran spack compiler find spack install intel-oneapi-compilers spack install ucx spack install intel-oneapi-mpi spack config edit compilers # 修改 fc f77 spack install openmpi@5.0.3%gcc+orterunprefix fabrics=ucx spack install intel-oneapi-vtune spack find ``` ### 安裝 ``` spack load openmpi cd ParaSeis/lib.src.latest ./install ``` 報錯 /usr/bin/env: ‘csh’: No such file or directory sudo apt-get install csh ./install ``` Input MPI Compiler /home/tmouse/spack/opt/spack/linux-ubuntu22.04-skylake/gcc-11.4.0/openmpi-5.0.3-3o7wz3ihlbiwvq4zn5cwbbipeniexfso/bin 接下來一路 enter ``` Error 然後安裝成功是甚麼鬼 Fegensoft company 一家中國軟體公司? ![image](https://hackmd.io/_uploads/S1Mivs2G0.png) ### Check ``` cd ../src make ``` https://github.com/ElmerCSC/elmerfem/issues/231 ![image](https://hackmd.io/_uploads/SJj_is3GR.png) 解決辦法聽說是在 MAKEFILE 裡加上 flag -fallow-argument-mismatch 加了 但看起來爛在前面的地方因此不確定有沒有用(目前看起來就把 error 變 WARNING,哇 CS 魔法) ### 爛掉的地方 他說 install success 但 lib 下面沒有要用的那些 .a 檔 導致後面 make 不成功 所以 install success 很可能有問題 測試在 lib.src.latest 下那個 make 根本不會成功 翻了那個 install 檔案 聞到了濃濃的時代氣息 一堆 goto 而且他判斷你有沒有安裝成功的程式邏輯長這樣: ``` # (前面的東西) goto success error: echo " The library install unfinished " goto end success: echo " *** Install Success ** " end: ``` 而且 make 失敗根本沒有 go error 更改了 lib.src.latest/metis.src/Lib/rename.h 裡面的 #define log2 __log2 改成 #define log2 _log2 就可以繼續編下去了 但後面還是 error ![image](https://hackmd.io/_uploads/S15Swn2zA.png) #### superLU DIST ![image](https://hackmd.io/_uploads/HJqLwhhzC.png) invalid strage class 的解決方案其中之一是檢查括號有沒有閉合,不會吧不會吧這玩意少括號? 函數宣告前面加上 static , 他不想被其他檔案 extern 使用 superlu_ddefs.h 和 pdgsrfs_ABXglobal.c 版本不一樣,前者是 March 15, 2003, v2.0, 後者是 September 1, 1999, v1.0, 猜測可能是版本問題,出了 15 個諾獎的柏克萊實驗室應該不會寫出不能用的東西。 SuperLU 的用途是對矩陣求解,要加速可能要在這裡。 superLU 庫的網址,我們的應該是 superLu dist https://portal.nersc.gov/project/sparse/superlu/superlu_dist_code_html/index.html 好消息是他還有在維護, 2022 有 8.1 版本 4.0 後 add multithreading (OpenMP) and GPU (CUDA) support ,如果我們有本事把他換上,應該不錯 - 甲骨文的文件 https://docs.oracle.com/cd/E71940_01/html/E71964/z400049841319.html 猜測使用的是 c89/90 標準,有以下幾點在改叩時要注意: 參考自: https://blog.csdn.net/ybhuangfugui/article/details/128629609 https://www.elliot98.top/post/tech/modern_c_standard/ 1. 不能在執行時才確定陣列大小 2. 不能用 // 來單行註解 3. for 迴圈初始化不能定義變數 4. 不能用 #pragma 5. stdint.h 不能用 6. 其他比較不常見,但改前還是要翻一下文件 翻了他的 1.0 和 2.0 版本的源碼,2.0 版本中出問題的檔案的確是 1.0 的版本沒錯。 另外安裝需要 blas ,/lib.src.latest/SuperLU_DIST_2.0 下面有個 cblas 按照 ParaSeis 給的 makefile 一個一個 lib 資料夾 make ,到最後 SUPERLU 出問題,還好是最後一個 lib。 SuperLU 裡的 CBLAS 沒問題,問題出在 SRC 要編出來的 superlulib 問題一樣 我有個邪惡的想法,直接把 STATIC 拔掉,反正沒有其他人 extern 他 好消息,拔掉就能編好了 #### check ![image](https://hackmd.io/_uploads/rJBIY-WmC.png) 應該加上 -fPIE 重編就好

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully