diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index d45f655561ea101d38cff299daab364272d3ab2e..e2c58033d2fdb916f9f18b04a8811294030ce170 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -186,7 +186,7 @@ set(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
 # these changes are related to hardcoded path to include .h files
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3")
 set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -Og")
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS}  -Og")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS}  -O3")
 
 set(GIT_BRANCH        "UNKNOWN")
 set(GIT_COMMIT_HASH   "UNKNOWN")
@@ -2449,6 +2449,7 @@ add_executable(lte-softmodem
   ${OPENAIR_TARGETS}/RT/USER/ru_control.c
   ${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
   ${OPENAIR_TARGETS}/RT/USER/lte-softmodem-common.c
+  ${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
   ${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
   ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
   ${OPENAIR_TARGETS}/COMMON/create_tasks.c
@@ -2828,6 +2829,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
   
   add_executable(${myExe}
     ${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
+    ${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
     ${OPENAIR_DIR}/common/utils/backtrace.c
     ${OPENAIR_DIR}/common/utils/system.c
     ${XFORMS_SOURCE}
diff --git a/common/utils/threadPool/thread-pool.h b/common/utils/threadPool/thread-pool.h
index 9a2681a828ea312c57a4f79a6d6de37c0da7e52d..1b59fb158991a4e207c8c90dd3cbadd4f3f651f0 100644
--- a/common/utils/threadPool/thread-pool.h
+++ b/common/utils/threadPool/thread-pool.h
@@ -217,11 +217,11 @@ static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) {
 
 static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
   notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
-
+  AssertFatal(t->traceFd, "Thread pool used while not initialized");
   if (t->measurePerf)
     msg->returnTime=rdtsc();
 
-  if (t->traceFd >= 0)
+  if (t->traceFd > 0)
     if(write(t->traceFd, msg, sizeof(*msg)));
 
   return msg;
@@ -229,7 +229,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
 
 static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
   notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo);
-
+  AssertFatal(t->traceFd, "Thread pool used while not initialized");
   if (msg == NULL)
     return NULL;
 
diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
index 1eea6474f30f37c0b0aa8c59bf43fbb35f9c853c..408da13718c0c7aef5207e60fa2ffe0f45073458 100644
--- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
@@ -11,6 +11,7 @@
 
 #include "stddef.h"
 #include "nfapi_interface.h"
+#include <nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h>
 
 #define NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS 5
 #define NFAPI_NR_MAX_NB_TCI_STATES_PDCCH 64
diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c
index a47a174702eefdf1c31b48dc5a79ddd4d128634f..d8ac505d141ffc8e973448a9a06f8a13403c065e 100644
--- a/openair1/SIMULATION/LTE_PHY/dlsim.c
+++ b/openair1/SIMULATION/LTE_PHY/dlsim.c
@@ -1266,6 +1266,10 @@ int main(int argc, char **argv) {
   }
 
   L1_rxtx_proc_t *proc_eNB = &eNB->proc.L1_proc;
+  initTpool("n", &proc_eNB->threadPool, true);
+  initNotifiedFIFO(&proc_eNB->respEncode);
+  initNotifiedFIFO(&proc_eNB->respDecode);
+
   proc_eNB->frame_tx=0;
 
   if (input_fd==NULL) {
diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c
index 0459109a7ca6e203746bf6f33671834917e52572..34237771aa7e8a7afd8e1a10f5e4dbd7ed9662c9 100644
--- a/openair1/SIMULATION/LTE_PHY/ulsim.c
+++ b/openair1/SIMULATION/LTE_PHY/ulsim.c
@@ -793,6 +793,10 @@ int main(int argc, char **argv) {
   proc_rxtx_ue->frame_rx = (subframe<4)?(proc_rxtx->frame_tx-1):(proc_rxtx->frame_tx);
   proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx;
   proc_rxtx_ue->subframe_rx = (proc_rxtx->subframe_tx+6)%10;
+  initTpool("n", &proc_rxtx->threadPool, true);
+  initNotifiedFIFO(&proc_rxtx->respEncode);
+  initNotifiedFIFO(&proc_rxtx->respDecode);
+
   printf("Init UL hopping UE\n");
   init_ul_hopping(&UE->frame_parms);
   printf("Init UL hopping eNB\n");
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index 737b7d02b43e3da9942fc90922c39e8e1333615b..a06797ee4b0fb2667e6153824dc9bed09c8e099b 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -665,9 +665,19 @@ int main ( int argc, char **argv )
     if (RC.nb_L1_inst > 0) {
       printf("Initializing eNB threads single_thread_flag:%d wait_for_sync:%d\n", get_softmodem_params()->single_thread_flag,get_softmodem_params()->wait_for_sync);
       init_eNB(get_softmodem_params()->single_thread_flag,get_softmodem_params()->wait_for_sync);
-      //      for (inst=0;inst<RC.nb_L1_inst;inst++)
-      //  for (CC_id=0;CC_id<RC.nb_L1_CC[inst];CC_id++) phy_init_lte_eNB(RC.eNB[inst][CC_id],0,0);
     }
+    for (int x=0; x < RC.nb_L1_inst; x++) 
+      for (int CC_id=0; CC_id<RC.nb_L1_CC[x]; CC_id++) {
+        L1_rxtx_proc_t *L1proc= &RC.eNB[x][CC_id]->proc.L1_proc;
+        if ( strlen(get_softmodem_params()->threadPoolConfig) > 0 )
+         initTpool(get_softmodem_params()->threadPoolConfig, &L1proc->threadPool, true);
+        else
+         initTpool("n", &L1proc->threadPool, true);
+      initNotifiedFIFO(&L1proc->respEncode);
+      initNotifiedFIFO(&L1proc->respDecode);
+    }
+
+
   }
 
   printf("wait_eNBs()\n");