[WIP] Enhance MTLN performance#401
Conversation
… unnecessary computations Co-authored-by: Copilot <copilot@github.com>
- Add termination_handler.F90: Fortran-based solvers for simple RLC terminations (types 1-10: SHORT, OPEN, SERIES, PARALLEL, and complex RLC combinations) - Add benchmark.F90: Timing utilities for performance measurement - Modify network.F90: Add termination type and component values to nw_node_t - Modify network_manager.F90: Implement hybrid approach using Fortran for simple terminations and ngspice only for complex ones (CIRCUIT, NETWORK) - Modify preprocess.F90: Populate termination info when creating network nodes - All 31 MTLN tests pass with the new implementation
…ops and calls to ngspice
|
@copilot ubuntu intel compiler and windows intel compiler fail during build due to a problem with the fortran intrinsic routine symlnk. The ubuntu gcc compiler gives no problema with this routine. Explain why and propose a solution |
Why
Fix applied (commit Replaced all 7 subroutine create_symlink(src, dst)
use iso_c_binding, only: c_int, c_char, c_null_char
character(len=*), intent(in) :: src, dst
#ifndef _WIN32
interface
function c_symlink(target, linkpath) bind(C, name="symlink") result(res)
use iso_c_binding, only: c_int, c_char
character(kind=c_char), intent(in) :: target(*), linkpath(*)
integer(c_int) :: res
end function c_symlink
end interface
integer(c_int) :: res
res = c_symlink(trim(src)//c_null_char, trim(dst)//c_null_char)
if (res /= 0) then
call WarnErrReport('create_symlink: failed to create symlink from ' // &
trim(src) // ' to ' // trim(dst))
end if
#endif
end subroutine create_symlinkThis approach:
|
Profiling seems to show that the problem is with ngspice. A possible solution would be to keep calls to it at minimum. Just when the input contains "circuits" which require it.