Skip to content

Commit

Permalink
Adds precompiled ngspice dbg library
Browse files Browse the repository at this point in the history
  • Loading branch information
lmdiazangulo committed Feb 1, 2024
1 parent 0dc2764 commit cbf0e68
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Build application
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCompileExecutable=YES -DCompileWithJSON=YES -DCompileWithMTLN=YES
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCompileExecutable=YES -DCompileWithMTLN=YES
cmake --build build -j
- name: Run json-parser tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-intelLLVM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
export FC=ifx
export CC=icx
export CXX=icpx
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCompileExecutable=YES -DCompileWithJSON=YES -DCompileWithMTLN=YES
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCompileExecutable=YES -DCompileWithMTLN=YES
cmake --build build -j
- name: Run json-parser tests
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/set_precompiled_libraries.cmake")
add_library(semba-types
"src_main_pub/nfde_types.F90"
"src_main_pub/fdetypes.F90"
"src_mtln/mtln_types.F90"
# "src_mtln/mtln_types.F90"
)
add_subdirectory(external/fhash/)
add_subdirectory(external/googletest/)
Expand Down
Binary file not shown.
13 changes: 8 additions & 5 deletions set_precompiled_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ if (CompileWithMTLN)
MESSAGE(STATUS "Using lapack precompiled libraries at: " ${LAPACK_DIR})


if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU" AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
set(NGSPICE_DIR "${CMAKE_SOURCE_DIR}/precompiled_libraries/linux-gcc-rls/ngspice/")
set(NGSPICE_LIB ${NGSPICE_DIR}libngspice.a)
elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "IntelLLVM" AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(NGSPICE_DIR "${CMAKE_SOURCE_DIR}/precompiled_libraries/linux-gcc-rls/ngspice/")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL "IntelLLVM" AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(NGSPICE_DIR "${CMAKE_SOURCE_DIR}/precompiled_libraries/linux-intelLLVM-dbg/ngspice/")
set(NGSPICE_LIB ${NGSPICE_DIR}libngspice.a)
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL "IntelLLVM")
set(NGSPICE_DIR "${CMAKE_SOURCE_DIR}/precompiled_libraries/linux-intelLLVM-rls/ngspice/")
set(NGSPICE_LIB ${NGSPICE_DIR}libngspice.a)
elseif((${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel" OR ${CMAKE_Fortran_COMPILER_ID} STREQUAL "IntelLLVM")
AND ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND
(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel" OR ${CMAKE_Fortran_COMPILER_ID} STREQUAL "IntelLLVM"))
set(NGSPICE_DIR "${CMAKE_SOURCE_DIR}/precompiled_libraries/windows-intel-rls/ngspice/")
set(NGSPICE_LIB ${NGSPICE_DIR}ngspice.lib)
add_library(ngspice SHARED IMPORTED)
Expand Down
4 changes: 4 additions & 0 deletions src_mtln/circuit.F90
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,16 @@ integer(c_int) function SendInitData(initData, id, nodes)
integer(c_int), value :: id
type(vecInOfAll), pointer, intent(in) :: initData
type(nodes_t) :: nodes

write(*,*) 'SendInitData'
end function

integer(c_int) function BGThreadRunning(isBGThreadNotRunning, id, nodes)
logical(c_bool) :: isBGThreadNotRunning
integer(c_int), value :: id
type(nodes_t) :: nodes

write(*,*) 'BGThreadRunning'
end function


Expand Down
4 changes: 1 addition & 3 deletions test/mtln/test_spice.F90
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ integer function test_spice_ac() bind(C) result(error_cnt)
implicit none

type(circuit_t) :: circuit
character(len=50) :: netlist, nodeName
character(len=*), parameter :: netlist = PATH_TO_TEST_DATA//'mtln/netlist_ac.cir'
real :: finalTime
integer :: i

Expand All @@ -84,8 +84,6 @@ integer function test_spice_ac() bind(C) result(error_cnt)
finalTime = 200e-6

error_cnt = 0
netlist = PATH_TO_TEST_DATA//'mtln/netlist_ac.cir'
nodeName = "int"
call circuit%init(netlist)
call circuit%setStopTimes(finalTime, circuit%dt)
do while (circuit%time < finalTime)
Expand Down

0 comments on commit cbf0e68

Please sign in to comment.