---
# System prepended metadata

title: OSP Model from scratch

---

OSP Model from scratch
===
[TOC]
## Introduction
This document will guide you through:
- Preparation
    1. Open a working environment on Qoca
    1. Install BLIS (For AMD processors only. Skip this if you are using Intel Processors or you want to use the legacy version of mikenet.)
    2. Install Optimized(AMD/Intel)/Legacy Mikenet
    3. Download and build the OSP model
- Training
    1. Execute the model on Qoca
- Evaluation
    1. Model evaluation

## Preparation
### Qoca
#### Login
- Visit: [JupyterHub](https://jupyter1.aic.ncku.edu.tw/hub/home)
#### Create environment
- Click on ```Start my server```
- Choose something begins with HPC (HPC及綜合分析模擬環境/HPC及綜合分析模擬環境), then click ```start```
#### Create workspace directory
- Change directory to home 
 ```bash= 
cd ~
```
- Create a workspace directory (Name it yourself)
```bash=
mkdir my_ws && cd ./my_ws
```
- You are correct if your commander looks like this
```(base) nm6114083@jupyter-nm6114083:~/my_ws$ ```.
### BLIS
#### Download the source
- Make sure you are in the right path
```bash=
cd ~/my_ws
```
- Download
```bash=
git clone https://github.com/flame/blis.git 
```
:::spoiler Am I on the right path?
The following messages indicates you are right:
```text=
(base) nm6114083@jupyter-nm6114083:~/my_ws$ git clone https://github.com/flame/blis.git 
Cloning into 'blis'...
remote: Enumerating objects: 51110, done.
remote: Counting objects: 100% (51110/51110), done.
remote: Compressing objects: 100% (9194/9194), done.
remote: Total 51110 (delta 41661), reused 50364 (delta 41418), pack-reused 0
Receiving objects: 100% (51110/51110), 47.84 MiB | 22.86 MiB/s, done.
Resolving deltas: 100% (41661/41661), done.
Updating files: 100% (2311/2311), done.
```
:::
#### Configure
- Change directory
```bash=
cd ./blis
```
- Configure
```bash=
./configure auto
```
:::spoiler Am I on the right path?
The following messages indicates you are right:
```text=
(base) nm6114083@jupyter-nm6114083:~/my_ws/blis$ ./configure auto
configure: detected Linux kernel version 4.18.0-348.el8.0.2.x86_64.
configure: python interpreter search list is: python python3 python2.
configure: found 'python'.
configure: using 'python' as python interpreter.
configure: found python version 3.10.6 (maj: 3, min: 10, rev: 6).
configure: python 3.10.6 appears to be supported.
configure: C compiler search list is: gcc clang cc.
configure: found 'gcc'.
configure: using 'gcc' as C compiler.
configure: found gcc version 11.3.0 (maj: 11, min: 3, rev: 0).
configure: checking for blacklisted configurations due to gcc 11.3.0.
configure: checking gcc 11.3.0 against known consequential version ranges.
configure: found assembler ('as') version 2.38 (maj: 2, min: 38, rev: ).
configure: checking for blacklisted configurations due to as 2.38.
configure: C++ compiler search list is: g++ clang++ c++.
configure: found 'g++'.
configure: using 'g++' as C++ compiler.
configure: Fortran compiler search list is: gfortran ifort.
configure: found 'gfortran'.
configure: using 'gfortran' as Fortran compiler.
configure: library archiver search list is: ar.
configure: found 'ar'.
configure: using 'ar' as library archiver.
configure: archive indexer search list is: ranlib.
configure: found 'ranlib'.
configure: using 'ranlib' as archive indexer.
configure: reading configuration registry...done.
configure: determining default version string.
configure: found '.git' directory; assuming git clone.
configure: executing: git describe --tags.
configure: got back 0.9.0-120-g6dcf7666.
configure: truncating to 0.9.0-120.
configure: starting configuration of BLIS 0.9.0-120.
configure: configuring with official version string.
configure: found shared library .so version '4.0.0'.
configure:   .so major version: 4
configure:   .so minor.build version: 0.0
configure: automatic configuration requested.
configure: hardware detection driver returned 'zen3'.
configure: checking configuration against contents of 'config_registry'.
configure: configuration 'zen3' is registered.
configure: 'zen3' is defined as having the following sub-configurations:
configure:    zen3
configure: which collectively require the following kernels:
configure:    zen3 zen2 zen haswell
configure: checking sub-configurations:
configure:   'zen3' is registered...and exists.
configure: checking sub-configurations' requisite kernels:
configure:   'zen3' kernels...exist.
configure:   'zen2' kernels...exist.
configure:   'zen' kernels...exist.
configure:   'haswell' kernels...exist.
configure: no install prefix option given; defaulting to '/usr/local'.
configure: no install exec_prefix option given; defaulting to PREFIX.
configure: no install libdir option given; defaulting to EXECPREFIX/lib.
configure: no install includedir option given; defaulting to PREFIX/include.
configure: no install sharedir option given; defaulting to PREFIX/share.
configure: final installation directories:
configure:   prefix:      /usr/local
configure:   exec_prefix: /usr/local
configure:   libdir:      /usr/local/lib
configure:   includedir:  /usr/local/include
configure:   sharedir:    /usr/local/share
configure: NOTE: the variables above can be overridden when running make.
configure: no preset CFLAGS detected.
configure: no preset LDFLAGS detected.
configure: disabling verbose make output. (enable with 'make V=1'.)
configure: disabling ARG_MAX hack.
configure: debug symbols disabled.
configure: AddressSanitizer support disabled.
configure: building BLIS as both static and shared libraries.
configure: exporting only public symbols within shared library.
configure: enabling operating system support.
configure: enabling thread-local storage (TLS) support.
configure: enabling support for single-threading.
configure: requesting slab work partitioning in jr and/or ir loops.
configure: internal memory pools for packing blocks are enabled.
configure: internal memory pools for small blocks are enabled.
configure: memory tracing output is disabled.
configure: libmemkind not found; disabling.
configure: compiler appears to support #pragma omp simd.
configure: the BLAS compatibility layer is enabled.
configure: the CBLAS compatibility layer is disabled.
configure: mixed datatype support is enabled.
configure: mixed datatype optimizations requiring extra memory are enabled.
configure: sup (skinny/unpacked) matrix handling is enabled.
configure: trsm diagonal element pre-inversion is enabled.
configure: the BLIS API integer size is automatically determined.
configure: the BLAS/CBLAS API integer size is 32-bit.
configure: AMD-specific framework files will not be considered.
configure: configuring with no addons.
configure: configuring for conventional gemm implementation.
configure: configuring complex return type as "gnu".
configure: creating ./config.mk from ./build/config.mk.in
configure: creating ./bli_config.h from ./build/bli_config.h.in
configure: creating ./bli_addon.h from ./build/bli_addon.h.in
configure: creating ./obj/zen3
configure: creating ./obj/zen3/config/zen3
configure: creating ./obj/zen3/kernels/zen3
configure: creating ./obj/zen3/kernels/zen2
configure: creating ./obj/zen3/kernels/zen
configure: creating ./obj/zen3/kernels/haswell
configure: creating ./obj/zen3/ref_kernels/zen3
configure: creating ./obj/zen3/frame
configure: creating ./obj/zen3/blastest
configure: creating ./obj/zen3/testsuite
configure: creating ./lib/zen3
configure: creating ./include/zen3
configure: mirroring ./config/zen3 to ./obj/zen3/config/zen3
configure: mirroring ./kernels/zen3 to ./obj/zen3/kernels/zen3
configure: mirroring ./kernels/zen2 to ./obj/zen3/kernels/zen2
configure: mirroring ./kernels/zen to ./obj/zen3/kernels/zen
configure: mirroring ./kernels/haswell to ./obj/zen3/kernels/haswell
configure: mirroring ./ref_kernels to ./obj/zen3/ref_kernels
configure: mirroring ./ref_kernels to ./obj/zen3/ref_kernels/zen3
configure: mirroring ./frame to ./obj/zen3/frame
configure: creating makefile fragments in ./obj/zen3/config/zen3
configure: creating makefile fragments in ./obj/zen3/kernels/zen3
configure: creating makefile fragments in ./obj/zen3/kernels/zen2
configure: creating makefile fragments in ./obj/zen3/kernels/zen
configure: creating makefile fragments in ./obj/zen3/kernels/haswell
configure: creating makefile fragments in ./obj/zen3/ref_kernels
configure: creating makefile fragments in ./obj/zen3/frame
configure: configured to build within top-level directory of source distribution.
```
:::
#### Build and install
```bash=
make -j 6
```
:::spoiler Am I on the right path?
The following messages indicates you are right:
```bash=
(base) nm6114083@jupyter-nm6114083:~/my_ws/blis$ make -j 6
Generating monolithic blis.h.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Generated include/zen3/blis.h
Compiling obj/zen3/config/zen3/bli_cntx_init_zen3.o ('zen3' CFLAGS for config code)
Compiling obj/zen3/kernels/zen/1/bli_amaxv_zen_int.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_axpyv_zen_int10.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_axpyv_zen_int.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_copyv_zen_int.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_dotv_zen_int10.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_dotv_zen_int.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_dotxv_zen_int.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_scalv_zen_int10.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_scalv_zen_int.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_setv_zen_int.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1/bli_swapv_zen_int8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1f/bli_axpyf_zen_int_4.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1f/bli_axpyf_zen_int_5.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1f/bli_axpyf_zen_int_8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/1f/bli_dotxf_zen_int_8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/3/bli_gemm_small.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/3/bli_gemmt_small.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/zen/3/bli_trsm_small.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/1m/bli_packm_haswell_asm_c3xk.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/1m/bli_packm_haswell_asm_c8xk.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/1m/bli_packm_haswell_asm_d6xk.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/1m/bli_packm_haswell_asm_d8xk.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/1m/bli_packm_haswell_asm_s16xk.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/1m/bli_packm_haswell_asm_s6xk.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/1m/bli_packm_haswell_asm_z3xk.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/1m/bli_packm_haswell_asm_z4xk.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/bli_gemm_haswell_asm_d6x8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/bli_gemm_haswell_asm_d8x6.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/bli_gemmtrsm_l_haswell_asm_d6x8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/bli_gemmtrsm_u_haswell_asm_d6x8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/bli_gemmsup_rd_haswell_asm_d6x8m.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/bli_gemmsup_rd_haswell_asm_d6x8n.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/bli_gemmsup_rd_haswell_asm_s6x16m.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/bli_gemmsup_rd_haswell_asm_s6x16n.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_rd_haswell_asm_dMx1.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_rd_haswell_asm_dMx2.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_rd_haswell_asm_dMx4.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_rd_haswell_asm_dMx8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_r_haswell_ref_dMx1.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_rv_haswell_asm_dMx2.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_rv_haswell_asm_dMx4.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_rv_haswell_asm_dMx6.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/d6x8/bli_gemmsup_rv_haswell_asm_dMx8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rd_haswell_asm_sMx12.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rd_haswell_asm_sMx16.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rd_haswell_asm_sMx1.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rd_haswell_asm_sMx2.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rd_haswell_asm_sMx4.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rd_haswell_asm_sMx8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_r_haswell_ref_sMx1.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rv_haswell_asm_sMx12.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rv_haswell_asm_sMx16.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rv_haswell_asm_sMx2.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rv_haswell_asm_sMx4.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rv_haswell_asm_sMx6.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/kernels/haswell/3/sup/s6x16/bli_gemmsup_rv_haswell_asm_sMx8.o ('zen3' CFLAGS for kernels)
Compiling obj/zen3/ref_kernels/zen3/bli_cntx_zen3_ref.o ('zen3' CFLAGS for ref. kernel init)
Compiling obj/zen3/ref_kernels/zen3/1/bli_addv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_amaxv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_axpbyv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_axpyv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_copyv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_dotv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_dotxv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_invertv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_invscalv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_scal2v_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_scalv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_setv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_subv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_swapv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1/bli_xpbyv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1f/bli_axpy2v_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1f/bli_axpyf_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1f/bli_dotaxpyv_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1f/bli_dotxaxpyf_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1f/bli_dotxf_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1m/bli_packm_cxc_diag_1er_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1m/bli_packm_cxc_diag_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1m/bli_packm_cxk_1er_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1m/bli_packm_cxk_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/1m/bli_unpackm_cxk_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/3/bli_gemm_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/3/bli_gemmsup_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/3/bli_gemmtrsm_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
In file included from ref_kernels/3/bli_gemm_ref.c:35:
ref_kernels/3/bli_gemm_ref.c: In function ‘bli_cgemm_zen3_ref’:
./frame/include//bli_complex_macro_defs.h:52:30: warning: ‘ab[<unknown>].real’ may be used uninitialized [-Wmaybe-uninitialized]
   52 | #define bli_cimag( x )  ( (x).imag )
./frame/include/level0/ri//bli_xpbyris.h:48:38: note: in definition of macro ‘bli_cxxpbyris’
   48 |         const __typeof__(yi) yt_i = (xi) + (bi) * (yr) + (br) * (yi); \
      |                                      ^~
./frame/include/level0//bli_xpbys.h:106:49: note: in expansion of macro ‘bli_creal’
  106 | #define bli_zccxpbys( x, b, y )  bli_cxxpbyris( bli_zreal(x), bli_zimag(x), bli_creal(b), bli_cimag(b), bli_creal(y), bli_cimag(y) )
      |                                                 ^~~~~~~~~
./frame/include/level0//bli_xpbys.h:187:32: note: in expansion of macro ‘bli_cccxpbys’
  187 | #define bli_zxpbys( x, b, y )  bli_zzzxpbys( x, b, y )
      |                                ^~~~~~~~~~~~
./frame/include//bli_macro_defs.h:52:36: note: in expansion of macro ‘bli_cxpbys’
   52 | #define PASTEMAC(ch,op)            PASTEMAC_(ch,op)
      |                                    ^~~~
./frame/include//bli_macro_defs.h:53:36: note: in expansion of macro ‘PASTEMAC_’
   53 | 
      |                                    ^        
ref_kernels/3/bli_gemm_ref.c:290:25: note: in expansion of macro ‘PASTEMAC’
  290 |                         PASTEMAC(ch,xpbys) \
      |                         ^~~~~~~~
./frame/include//bli_gentfunc_macro_defs.h:153:1: note: in expansion of macro ‘GENTFUNC’
  153 | GENTFUNC( dcomplex, z, __VA_ARGS__ )
      | ^~~~~~~~
ref_kernels/3/bli_gemm_ref.c:300:1: note: in expansion of macro ‘INSERT_GENTFUNC_BASIC’
  300 | INSERT_GENTFUNC_BASIC( gemm, BLIS_CNAME_INFIX, BLIS_REF_SUFFIX )
      | ^~~~~~~~~~~~~~~~~~~~~
ref_kernels/3/bli_gemm_ref.c:197:21: note: ‘ab’ declared here
  197 |               ctype ab[ BLIS_STACK_BUF_MAX_SIZE \
      |                     ^~
./frame/include//bli_gentfunc_macro_defs.h:153:1: note: in expansion of macro ‘GENTFUNC’
  153 | GENTFUNC( dcomplex, z, __VA_ARGS__ )
      | ^~~~~~~~
ref_kernels/3/bli_gemm_ref.c:300:1: note: in expansion of macro ‘INSERT_GENTFUNC_BASIC’
  300 | INSERT_GENTFUNC_BASIC( gemm, BLIS_CNAME_INFIX, BLIS_REF_SUFFIX )
      | ^~~~~~~~~~~~~~~~~~~~~
In file included from ref_kernels/3/bli_gemm_ref.c:35:
./frame/include//bli_complex_macro_defs.h:53:30: warning: ‘ab[<unknown>].imag’ may be used uninitialized [-Wmaybe-uninitialized]
   53 | #define bli_zreal( x )  ( (x).real )
./frame/include/level0/ri//bli_xpbyris.h:49:38: note: in definition of macro ‘bli_cxxpbyris’
   49 |         (yr) = yt_r; \
      |                                      ^ 
./frame/include/level0//bli_xpbys.h:106:63: note: in expansion of macro ‘bli_cimag’
  106 | #define bli_zccxpbys( x, b, y )  bli_cxxpbyris( bli_zreal(x), bli_zimag(x), bli_creal(b), bli_cimag(b), bli_creal(y), bli_cimag(y) )
      |                                                               ^~~~~~~~~
./frame/include/level0//bli_xpbys.h:187:32: note: in expansion of macro ‘bli_cccxpbys’
  187 | #define bli_zxpbys( x, b, y )  bli_zzzxpbys( x, b, y )
      |                                ^~~~~~~~~~~~
./frame/include//bli_macro_defs.h:52:36: note: in expansion of macro ‘bli_cxpbys’
   52 | #define PASTEMAC(ch,op)            PASTEMAC_(ch,op)
      |                                    ^~~~
./frame/include//bli_macro_defs.h:53:36: note: in expansion of macro ‘PASTEMAC_’
   53 | 
      |                                    ^        
ref_kernels/3/bli_gemm_ref.c:290:25: note: in expansion of macro ‘PASTEMAC’
  290 |                         PASTEMAC(ch,xpbys) \
      |                         ^~~~~~~~
./frame/include//bli_gentfunc_macro_defs.h:153:1: note: in expansion of macro ‘GENTFUNC’
  153 | GENTFUNC( dcomplex, z, __VA_ARGS__ )
      | ^~~~~~~~
ref_kernels/3/bli_gemm_ref.c:300:1: note: in expansion of macro ‘INSERT_GENTFUNC_BASIC’
  300 | INSERT_GENTFUNC_BASIC( gemm, BLIS_CNAME_INFIX, BLIS_REF_SUFFIX )
      | ^~~~~~~~~~~~~~~~~~~~~
ref_kernels/3/bli_gemm_ref.c:197:21: note: ‘ab’ declared here
  197 |               ctype ab[ BLIS_STACK_BUF_MAX_SIZE \
      |                     ^~
./frame/include//bli_gentfunc_macro_defs.h:153:1: note: in expansion of macro ‘GENTFUNC’
  153 | GENTFUNC( dcomplex, z, __VA_ARGS__ )
      | ^~~~~~~~
ref_kernels/3/bli_gemm_ref.c:300:1: note: in expansion of macro ‘INSERT_GENTFUNC_BASIC’
  300 | INSERT_GENTFUNC_BASIC( gemm, BLIS_CNAME_INFIX, BLIS_REF_SUFFIX )
      | ^~~~~~~~~~~~~~~~~~~~~
Compiling obj/zen3/ref_kernels/zen3/3/bli_trsm_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/ind/bli_gemm1m_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/ind/bli_gemmtrsm1m_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/ref_kernels/zen3/ind/bli_trsm1m_zen3_ref.o ('zen3' CFLAGS for ref. kernels)
Compiling obj/zen3/frame/0/bli_l0_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/0/bli_l0_fpa.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/0/bli_l0_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/0/bli_l0_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/0/copysc/bli_copysc.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1/bli_l1v_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1/bli_l1v_fpa.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1/bli_l1v_oapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1/bli_l1v_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1/bli_l1v_oapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1/bli_l1v_tapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1/bli_l1v_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1/bli_l1v_tapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1d/bli_l1d_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1d/bli_l1d_fpa.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1d/bli_l1d_oapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1d/bli_l1d_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1d/bli_l1d_oapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1d/bli_l1d_tapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1d/bli_l1d_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1d/bli_l1d_tapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1f/bli_l1f_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1f/bli_l1f_fpa.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1f/bli_l1f_oapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1f/bli_l1f_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1f/bli_l1f_oapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1f/bli_l1f_tapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1f/bli_l1f_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1f/bli_l1f_tapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_fpa.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_oapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_oapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_tapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_tapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/bli_l1m_unb_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_alloc.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_blk_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_cntl.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_init.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_int.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_part.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_scalar.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_struc_cxk.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/packm/bli_packm_struc_cxk_md.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/unpackm/bli_unpackm_blk_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/unpackm/bli_unpackm_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/unpackm/bli_unpackm_cntl.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/1m/unpackm/bli_unpackm_int.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/bli_l2_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/bli_l2_fpa.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/bli_l2_oapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/bli_l2_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/bli_l2_oapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/bli_l2_tapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/bli_l2_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/bli_l2_tapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/gemv/bli_gemv_unb_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/gemv/bli_gemv_unb_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/gemv/bli_gemv_unf_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/gemv/bli_gemv_unf_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/gemv/bli_gemv_var_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/ger/bli_ger_unb_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/ger/bli_ger_unb_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/ger/bli_ger_var_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_unb_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_unb_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_unb_var3.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_unb_var4.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_unf_var1a.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_unf_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_unf_var3a.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_unf_var3.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/hemv/bli_hemv_var_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her/bli_her_unb_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her/bli_her_unb_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her/bli_her_var_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her2/bli_her2_unb_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her2/bli_her2_unb_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her2/bli_her2_unb_var3.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her2/bli_her2_unb_var4.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her2/bli_her2_unf_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her2/bli_her2_unf_var4.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/her2/bli_her2_var_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trmv/bli_trmv_unb_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trmv/bli_trmv_unb_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trmv/bli_trmv_unf_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trmv/bli_trmv_unf_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trmv/bli_trmv_var_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trsv/bli_trsv_unb_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trsv/bli_trsv_unb_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trsv/bli_trsv_unf_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trsv/bli_trsv_unf_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/2/trsv/bli_trsv_var_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_blocksize.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_cntl.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_decor.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_direct.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_ind.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_int.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_oapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_packab.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_prune.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_schema.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_sup.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_sup_decor.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_sup_int.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_sup_packm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_sup_packm_var.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_sup_ref.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_sup_var12.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_sup_var1n2m.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_tapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_thrinfo.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_ukr_fpa.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_ukr_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/bli_l3_ukr_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemm/bli_gemm_blk_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemm/bli_gemm_blk_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemm/bli_gemm_blk_var3.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemm/bli_gemm_cntl.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemm/bli_gemm_front.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemm/bli_gemm_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemm/bli_gemm_md.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemm/bli_gemm_md_c2r_ref.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemmt/bli_gemmt_front.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemmt/bli_gemmt_l_ker_var2b.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemmt/bli_gemmt_l_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemmt/bli_gemmt_u_ker_var2b.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemmt/bli_gemmt_u_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemmt/bli_gemmt_x_ker_var2b.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/gemmt/bli_gemmt_x_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/hemm/bli_hemm_front.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/symm/bli_symm_front.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_front.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_ll_ker_var2b.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_ll_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_lu_ker_var2b.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_lu_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_rl_ker_var2b.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_rl_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_ru_ker_var2b.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_ru_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_xx_ker_var2b.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm/bli_trmm_xx_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trmm3/bli_trmm3_front.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_blk_var1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_blk_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_blk_var3.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_cntl.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_front.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_ll_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_lu_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_rl_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_ru_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/3/trsm/bli_trsm_xx_ker_var2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_apool.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_arch.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_array.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_blksz.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_clock.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_cntl.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_cntx.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_const.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_cpuid.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_env.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_error.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_func.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_getopt.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_gks.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_ind.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_info.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_init.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_machval.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_malloc.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_mbool.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_memsys.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_obj.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_obj_scalar.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_pack.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_param_map.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_part.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_pba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_pool.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_prune.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_query.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_rntm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_sba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_setgetijm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_setgetijv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_setri.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_string.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/bli_winsys.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/cast/bli_castm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/cast/bli_castnzm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/cast/bli_castv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/check/bli_obj_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/check/bli_part_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/noopt/bli_dlamch.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/noopt/bli_lsame.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/noopt/bli_slamch.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/proj/bli_projm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/base/proj/bli_projv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_amax.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_asum.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_axpy.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_copy.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_dot.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_gemm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_gemv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_ger.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_hemm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_hemv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_her2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_her2k.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_her.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_herk.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_nrm2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_scal.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_swap.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_symm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_symv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_syr2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_syr2k.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_syr.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_syrk.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_trmm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_trmv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_trsm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/bla_trsv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/blis/thread/b77_thread.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/extra/bla_axpby.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/extra/bla_gemm3m.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/extra/bla_gemm_batch.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/extra/bla_gemmt.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_cabs1.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_gbmv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_hbmv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_hpmv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_hpr2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_hpr.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_lsame.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_rot.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_rotg.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_rotm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_rotmg.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_sbmv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_spmv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_spr2.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_spr.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_tbmv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_tbsv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_tpmv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_tpsv.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_xerbla_array.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/bla_xerbla.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_c_abs.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_c_div.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_d_abs.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_d_cnjg.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_d_imag.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_d_sign.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_f__cabs.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_r_abs.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_r_cnjg.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_r_imag.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_r_sign.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_z_abs.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/compat/f2c/util/bla_z_div.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_pthread.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thrcomm.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thrcomm_openmp.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thrcomm_pthreads.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thrcomm_single.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thread.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thread_openmp.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thread_pthreads.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thread_range.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thread_range_slab_rr.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thread_range_tlb.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thread_single.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/thread/bli_thrinfo.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_check.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_fpa.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_oapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_oapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_oapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_tapi_ba.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_tapi.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_tapi_ex.o ('zen3' CFLAGS for framework code)
Compiling obj/zen3/frame/util/bli_util_unb_var1.o ('zen3' CFLAGS for framework code)
Archiving lib/zen3/libblis.a
Dynamically linking lib/zen3/libblis.so
Creating symlink lib/zen3/libblis.so.4
```
:::


#### Test
- Run a small program to confirm a successful installation
```bash=
cd ~/my_ws/blis/examples/tapi
make
./02level1m_diag.x 
```
:::spoiler Am I on the right path?
The following messages indicates you are right:
```bash=
(base) nm6114083@jupyter-nm6114083:~/my_ws/blis/examples/tapi$ ./02level1m_diag.x 

#
#  -- Example 1 --
#

a: randomize upper part (lower part may contain garbage)
 0.7 -0.2  0.6 -0.3 -0.0 
 0.0  0.6  0.8  0.5  0.3 
 0.0  0.0 -0.6 -0.4 -0.3 
 0.0  0.0  0.0  0.1  0.0 
 0.0  0.0  0.0  0.0  0.9 


#
#  -- Example 2 --
#

b: randomize upper part; set strictly lower part to 0.0)
 0.8  0.3 -0.7 -0.5 -0.2 
 0.0  0.4  0.2 -0.7 -0.7 
 0.0  0.0 -1.0  0.6 -0.8 
 0.0  0.0  0.0 -0.7  1.0 
 0.0  0.0  0.0  0.0 -0.6 

b: randomize upper part; set strictly lower part to -1.0)
 0.8  0.3 -0.7 -0.5 -0.2 
-1.0  0.4  0.2 -0.7 -0.7 
-1.0 -1.0 -1.0  0.6 -0.8 
-1.0 -1.0 -1.0 -0.7  1.0 
-1.0 -1.0 -1.0 -1.0 -0.6 


#
#  -- Example 3 --
#

c: copy lower part of b (upper part may contain garbage)
 0.8  0.0  0.0  0.0  0.0 
-1.0  0.4  0.0  0.0  0.0 
-1.0 -1.0 -1.0  0.0  0.0 
-1.0 -1.0 -1.0 -0.7  0.0 
-1.0 -1.0 -1.0 -1.0 -0.6 

a: copy lower triangle of b to upper triangular a
 0.8 -0.2  0.6 -0.3 -0.0 
-1.0  0.4  0.8  0.5  0.3 
-1.0 -1.0 -1.0 -0.4 -0.3 
-1.0 -1.0 -1.0 -0.7  0.0 
-1.0 -1.0 -1.0 -1.0 -0.6 


#
#  -- Example 4 --
#

d: initial value (all zeros)
 0.0  0.0  0.0  0.0  0.0 
 0.0  0.0  0.0  0.0  0.0 
 0.0  0.0  0.0  0.0  0.0 
 0.0  0.0  0.0  0.0  0.0 
 0.0  0.0  0.0  0.0  0.0 

b:
 0.8  0.3 -0.7 -0.5 -0.2 
-1.0  0.4  0.2 -0.7 -0.7 
 2.0  3.1 -1.0  0.6 -0.8 
 3.0 -1.0  3.2 -0.7  1.0 
 4.0 -1.0 -1.0 -1.0 -0.6 

d: transpose of lower triangle of b copied to d
 0.8 -1.0  2.0  3.0  4.0 
 0.0  0.4  3.1 -1.0 -1.0 
 0.0  0.0 -1.0  3.2 -1.0 
 0.0  0.0  0.0 -0.7 -1.0 
 0.0  0.0  0.0  0.0 -0.6 


#
#  -- Example 5 --
#

e: initial value (all -1.0)
-1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 

e: after lower trapezoid randomized
 0.0 -1.0 -1.0 -1.0 
 0.7 -0.0 -1.0 -1.0 
 0.2  0.9  0.5 -1.0 
-0.4 -0.4 -0.2 -0.3 
 0.3  0.5  0.8  0.6 
 0.0  0.1 -0.4  0.8 

e: after upper triangle set to zero
 0.0  0.0  0.0  0.0 
 0.7 -0.0  0.0  0.0 
 0.2  0.9  0.5  0.0 
-0.4 -0.4 -0.2 -0.3 
 0.3  0.5  0.8  0.6 
 0.0  0.1 -0.4  0.8 


#
#  -- Example 6 --
#

h: initial value (all -1.0)
-1.0 -1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 -1.0 
-1.0 -1.0 -1.0 -1.0 -1.0 

h: after randomizing above first subdiagonal
-0.9  0.1  0.3 -1.0  0.8 
 0.9 -0.8  0.8 -0.1  0.7 
-1.0 -0.6 -0.3 -0.9 -0.5 
-1.0 -1.0 -0.9 -0.5  0.1 
-1.0 -1.0 -1.0  0.9 -0.2 

h: after setting elements below first subdiagonal to zero
-0.9  0.1  0.3 -1.0  0.8 
 0.9 -0.8  0.8 -0.1  0.7 
 0.0 -0.6 -0.3 -0.9 -0.5 
 0.0  0.0 -0.9 -0.5  0.1 
 0.0  0.0  0.0  0.9 -0.2 
```
:::

### MikeNet
```bash=
cd ~/my_ws/
```
#### Download the source
```bash=
git clone https://github.com/mrpotatohead-de/mikenet.git
```

#### Modify the source
```bash=
cd ./mikenet
```
Change line 59 in ```~/my_ws/mikenet/Makefile```
```text=
#change path name according to where blis was installed
#for example, original =>
#lib_blis: CPPFLAGS += -fopenmp -DUSE_AMDBLIS -I/home/chingenkuo/ce_ws/blis/include/zen2
#modified =>
#lib_blis: CPPFLAGS += -fopenmp -DUSE_AMDBLIS -I/home/nm6114083/my_ws/blis/include/zen3
```
#### Build from source
```bash=
make clean
make lib
make lib_blis
```
(Optional) Use ```make help``` to see your build options
```text=
(base) nm6114083@jupyter-nm6114083:~/my_ws/mikenet$ make help
make lib                  build Mikenet as static library
make lib_mkl              build Mikenet as static library with MKL optimization
make lib_openmp           build Mikenet as static library with openMP
make lib_blis             build Mikenet as static library with AMD BLIS
make clean                delete Mikenet libraries and the object files
make help                 print this help message
```

#### Test
```bash=
cd ~/my_ws/mikenet/demos/xor
make clean all
./xor
```

:::spoiler Am I on the right path?

The following messages indicates you are right:
```bash=
(base) nm6114083@jupyter-nm6114083:~/my_ws/mikenet/demos/xor$ ./xor


   Mikenet Version 8.0.1a   Copyright (C) 1995 Michael W. Harm
   Mikenet comes with ABSOLUTELY NO WARRANTY 
   This is free software, and you are welcome to redistribute it
     under certain conditions.
   using single-precision floats
   Compiled using gcc on machine type Linux
   Compiled at time 15:25:23
   Compiled on date Aug 26 2022

100     2.800188
200     2.771697
300     2.766890
400     2.539720
500     1.676955
600     1.482387
700     1.441299
800     1.424337
900     1.415191
1000    1.409507
1100    1.405647
1200    1.402861
1300    1.400760
1400    1.399121
1500    1.397808
1600    1.396733
1700    1.395838
1800    1.395081
1900    1.394432
2000    1.393871
2100    1.393380
2200    1.392948
2300    1.392566
2400    1.392223
2500    1.391915
2600    1.391637
2700    1.391386
2800    1.391155
2900    1.390944
3000    1.390752
3100    1.390573
3200    1.390408
3300    1.390257
3400    1.390113
3500    1.389982
3600    1.389858
3700    1.389742
3800    1.389633
3900    1.389531
4000    1.389434
4100    1.389343
4200    1.389257
4300    1.389176
4400    1.389099
4500    1.389026
4600    1.388956
4700    1.388890
4800    1.388827
4900    1.388767
example 0       inputs 0.000000 0.000000        output 0.000627 target 0.000000
example 1       inputs 1.000000 0.000000        output 0.999363 target 1.000000
example 2       inputs 0.000000 1.000000        output 0.499724 target 1.000000
example 3       inputs 1.000000 1.000000        output 0.500286 target 0.000000
```
:::
#### Export
```bash=
export MIKENET_DIR="/home/nm6114083/my_ws/mikenet"
```
### OSP Model
```bash=
cd ~/my_ws/
```
#### Download
```bash=
git clone https://github.com/mrpotatohead-de/osp-model.git
```
:::info
There are three simulations in Dr. Chang's paper. The procedures were idnetical.
So from now on, I use oral-language-phase in simulation3 as an example.
:::

#### Makefile Modification
```bash=
cd ~/my_ws/osp-model/Simulation3/Model
```
Change path name according to where blis was installed.
Like from:
```bash=
# CPPFLAGS_BLIS = -I${MIKENET_DIR}/include -I../../headers -I/home/chingenkuo/ce_ws/blis/include/zen2
# LDFLAGS_BLIS := -L${MIKENET_DIR}/lib/$(shell uname -m)/blis -L/home/chingenkuo/ce_ws/blis/lib/zen2
# $(CC) -o $@ $^ $(CFLAGS) $(CPPFLAGS_BLIS) $(LDFLAGS_BLIS) $(LDLIBS_BLIS) /home/chingenkuo/ce_ws/blis/lib/zen2/libblis.a
# $(CC) -o $@ $^ $(CFLAGS) $(CPPFLAGS_BLIS) $(LDFLAGS_BLIS) $(LDLIBS_BLIS) /home/chingenkuo/ce_ws/blis/lib/zen2/libblis.a
# $(CC) -o $@ $^ $(CFLAGS) $(CPPFLAGS_BLIS) $(LDFLAGS_BLIS) $(LDLIBS_BLIS) /home/chingenkuo/ce_ws/blis/lib/zen2/libblis.a
```
to:
```bash=
# CPPFLAGS_BLIS = -I${MIKENET_DIR}/include -I../../headers -I/home/nm6114083/my_ws/blis/include/zen3
# LDFLAGS_BLIS := -L${MIKENET_DIR}/lib/$(shell uname -m)/blis -L/home/```bash=/my_ws/blis/lib/zen3
# $(CC) -o $@ $^ $(CFLAGS) $(CPPFLAGS_BLIS) $(LDFLAGS_BLIS) $(LDLIBS_BLIS) /home/nm6114083/my_ws/blis/lib/zen3/libblis.a
# $(CC) -o $@ $^ $(CFLAGS) $(CPPFLAGS_BLIS) $(LDFLAGS_BLIS) $(LDLIBS_BLIS) /home/nm6114083/my_ws/blis/lib/zen3/libblis.a
# $(CC) -o $@ $^ $(CFLAGS) $(CPPFLAGS_BLIS) $(LDFLAGS_BLIS) $(LDLIBS_BLIS) /home/nm6114083/my_ws/blis/lib/zen3/libblis.a
```
#### (Optional) Code Modification - save_weights
Go to ```eng_oral.c``` and search for ```save_weights```, you shall find results located between line 150 ~ 182.

Since ```sprintf``` is the function to write weights to a document, the following example only saves weights at the 400000th, the 1200000th, and the 2000000th iteration.

So you can change codes or parameters here to change the save_weights frequency.
```c=

   if (iteration == 400000){
		sprintf(fn,"Oral_Weight_LP_v%d", seed);
		save_weights(reading,fn);
		
		sprintf(fn,"PS_Weight_LP_v%d", seed);
		save_weights(ps,fn);
		
		sprintf(fn,"SP_Weight_LP_v%d", seed);
		save_weights(sp,fn);
	
     } else if (iteration == 1200000){
		sprintf(fn,"Oral_Weight_MP_v%d", seed);
		save_weights(reading,fn);
		
		sprintf(fn,"PS_Weight_MP_v%d", seed);
		save_weights(ps,fn);
		
		sprintf(fn,"SP_Weight_MP_v%d", seed);
		save_weights(sp,fn);
	
      } else if (iteration == 2000000){
		sprintf(fn,"Oral_Weight_HP_v%d", seed);
		save_weights(reading,fn);
		
		sprintf(fn,"PS_Weight_HP_v%d", seed);
		save_weights(ps,fn);
		
		sprintf(fn,"SP_Weight_HP_v%d", seed);
		save_weights(sp,fn);
	
      } else {
		  
	  }
```
#### Build
```bash=
cd ~/my_ws/osp-model/Simulation3/Model/
make clean
make oral_blis
```

#### Execute (Train/Do your experiment/whatever you want to call)
First you may need to modify the script (set random seeds)
- Edit ```eng_oral.sh```
- Put a list of random seeds in line 7. If your random seeds are 1,2,3,4,5, then your script shall look like this:
    - ```i``` stands for ```random seeds```
    - ```k``` stands for ```iterations```
```script:
#!/bin/bash
# Oral language training: training the model with different amounts of exposure (400000, 1200000, and 2000000)
# for three levels of oral proficiency 

for k in 400000 1200000 2000000
do
	for i in 1 2 3 4 5
	do
     
     echo "version=${i}, iteration=${k}"

     ./bin/eng_oral_blis -seed ${i} -epsilon 0.05 -iteration ${k}
     
	done
done

```
Then run the script and wait for your trained models.
##### Method 1. Run in your terminal
```bash=
sh ./eng_oral.sh 
```
To do this, you will need a ```job.sh```. 
Your job.sh can be located anywhere and can be very simple.
```script=
sh /home/nm6114083/my_ws/osp-model/Simulation3/Model/eng_oral.sh > output.out
```
Explaination:
- ```sh``` means "to run a script".
- ```/home/.../eng_oral.sh``` is the location of the script to be run.
- ```> output.out``` means all of the screen outputs will be redirected to a file called ```output.out```.

:::spoiler Am I on the right path?

The following messages indicates you are right:
```bash=
(base) nm6114083@jupyter-nm6114083:~/my_ws/osp-model/Simulation3/Model$ sh ./eng_oral.sh 
version=1, iteration=400000
Execution Time: Start Timing
Execution Time: Start Time 1269.000000
time: 0 avg_hearing_err: -nan avg_speaking_err: 402.086
time: 100 avg_hearing_err: 432.430 avg_speaking_err: 92.893
time: 200 avg_hearing_err: 99.807 avg_speaking_err: 75.427
time: 300 avg_hearing_err: 96.981 avg_speaking_err: 76.655
time: 400 avg_hearing_err: 91.595 avg_speaking_err: 67.135
time: 500 avg_hearing_err: 90.305 avg_speaking_err: 68.256
time: 600 avg_hearing_err: 97.063 avg_speaking_err: 67.555
time: 700 avg_hearing_err: 75.442 avg_speaking_err: 67.056
time: 800 avg_hearing_err: 76.630 avg_speaking_err: 66.826
time: 900 avg_hearing_err: 75.027 avg_speaking_err: 59.058
time: 1000 avg_hearing_err: 80.945 avg_speaking_err: 66.452
time: 1100 avg_hearing_err: 65.945 avg_speaking_err: 54.437
time: 1200 avg_hearing_err: 76.347 avg_speaking_err: 60.644
time: 1300 avg_hearing_err: 83.705 avg_speaking_err: 52.155
time: 1400 avg_hearing_err: 73.971 avg_speaking_err: 58.038
time: 1500 avg_hearing_err: 72.407 avg_speaking_err: 57.297
time: 1600 avg_hearing_err: 78.853 avg_speaking_err: 56.387
time: 1700 avg_hearing_err: 98.672 avg_speaking_err: 55.049
time: 1800 avg_hearing_err: 75.931 avg_speaking_err: 50.394
time: 1900 avg_hearing_err: 72.747 avg_speaking_err: 48.032
time: 2000 avg_hearing_err: 71.626 avg_speaking_err: 47.124
time: 2100 avg_hearing_err: 70.247 avg_speaking_err: 52.548
time: 2200 avg_hearing_err: 79.643 avg_speaking_err: 46.748
time: 2300 avg_hearing_err: 84.055 avg_speaking_err: 45.472
time: 2400 avg_hearing_err: 74.248 avg_speaking_err: 52.362
time: 2500 avg_hearing_err: 62.668 avg_speaking_err: 50.947
time: 2600 avg_hearing_err: 80.492 avg_speaking_err: 48.364
time: 2700 avg_hearing_err: 77.725 avg_speaking_err: 49.831
time: 2800 avg_hearing_err: 79.541 avg_speaking_err: 40.654
time: 2900 avg_hearing_err: 76.896 avg_speaking_err: 47.818
time: 3000 avg_hearing_err: 67.466 avg_speaking_err: 47.474
time: 3100 avg_hearing_err: 81.872 avg_speaking_err: 44.276
time: 3200 avg_hearing_err: 58.257 avg_speaking_err: 43.390
time: 3300 avg_hearing_err: 77.795 avg_speaking_err: 44.461
time: 3400 avg_hearing_err: 73.870 avg_speaking_err: 46.409
```
:::

##### Method 2. Run with ```qbatch```

Submit a job:
```script=
qbatch job.sh -N nm6114083-test -l ncku.node/group:SOC \
-i harbor.k8s/ncku-soc/jupyter-ubuntu22.04_aio:latest \
-C 8 \
-M 1024 \
-d /home/nm6114083/my_ws
```

This message indicates your submission is successful:
```bash=
(base) nm6114083@jupyter-nm6114083:~/my_ws/osp-model/Simulation3/Model$ qbatch job.sh -N nm6114083-test -l ncku.node/group:SOC \
-i harbor.k8s/ncku-soc/jupyter-ubuntu22.04_aio:latest \
-C 8 \
-M 1024
vcJob nm6114083-test-853 submitted successfully...
```
Watch your submitted jobs (in a list):
You type:
```bash=
qbatch list
```
You get:
```text=
nm6114083-test-860               860      Running     2023-09-07 01:54:55   4s                     nm6114083   qbatchjob-nm6114083   default   gn01.ncku-aim         1                  8.0     1Gi             
```
Watch a specific job:
You type:
```bash=
qbatch logs nm6114083-test-860
```
You get:
No news is good news :))

#### Evaluation
Please refer the ```README```'s, such as ```osp-model/Simulation3/Model/README.txt```.
```text=
#######################################################################################################
# Testing the model's phonological performance and semantic performance
# Executable file : awl_evaluator
# Parameters:
# -key: the information about the training set
# -patterns: testing set (e.g., exp_jo_taylor_set1.txt) 
# -semantic: test the model's semantic performance (without this index, the default is to test the model's phonological performance) 
# -weights: trained weight
# >:  output file 
#######################################################################################################
To test the model, enter the following command in the unix-like terminal with Mikenet installed:

e.g. for listening comprehension (PS)
./eng_evaluator -key 6kdict.txt -patterns ps_randcon.pat -semantic -weights ../TrainedWeights/Oral/LP/PS_Weight_LP_v1 > PS_LP_v1.txt

e.g. for speaking (SP)
./eng_evaluator -key 6kdict.txt -patterns sp.pat -weights ../TrainedWeights/Oral/LP/SP_Weight_LP_v1 > SP_LP_v1.txt

e.g. for word comprehension (OS)
./eng_evaluator -key 6kdict.txt -patterns englishdict_randcon.pat -semantic -weights ../TrainedWeights/Reading/LP/OP/OP_Reading_Weight_LP_v1_t1000000 > OP_focused_OS_LP_v1.txt

e.g. for word naming (OP)
./eng_evaluator -key 6kdict.txt -patterns englishdict_randcon.pat -weights ../TrainedWeights/Reading/LP/OP/OP_Reading_Weight_LP_v1_t1000000 > OP_focused_OP_LP_v1.txt


The evaluator output format:
For phonology, column names are 'test_name', 'word',  'correctness', 'error score'
For semantics, column names are 'test_name', 'word', 'unit activation....'

To further compute the accuracy and error scores (euclidean distance) for semantics, a Matlab function is provided    
e.g. In the Matlab terminal, enter:
>> examine_semantic_output('PS_LP_v1.txt')
and this will generate an output file 'nearest_PS_LP_v1.txt'
```