cov-emit process hangs and Coverity build never completes - coverity

I need to exclude a C++ source file from coverity build. This file is called XMLHelperUtil.cpp and is part of one of the many C++ projects included in the solution that I'm building. I tried adding it to the XML configuration file but without any success.
I did the following:
(1) Created a config file with the command:
cov-configure --config e:\temp\my_config.xml --msvc --xml-option=skip_file:"XMLHelperUtil.cpp"
This creates a series of templates for msvc that includes the following skip_file node:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE coverity SYSTEM "coverity_config.dtd">
<coverity>
<!-- THIS FILE IS AUTOMATICALLY GENERATED - YOU MAY ADD XML ENTITIES -->
<!-- TO UPDATE THE COMPILER CONFIGURATION AFTER THE begin_command_line_config CLOSING TAG. -->
<cit_version>1</cit_version>
<config>
<build>
<compiler>
<template_compiler>true</template_compiler>
<comp_name>devenv</comp_name>
<comp_translator>msvc_devenv</comp_translator>
<comp_lang>C</comp_lang>
<comp_generic>msvc</comp_generic>
</compiler>
<options>
<id>msvc_devenv-devenv-.*</id>
<opt_preinclude_file>$CONFIGDIR$/../user_nodefs.h</opt_preinclude_file>
<begin_command_line_config></begin_command_line_config>
<skip_file>XMLHelperUtil.cpp</skip_file>
</options>
</build>
</config>
<md5>e471f73f8137b3bb42fd78a4695ff14f</md5>
</coverity>
(2) Built the project with the following command:
cov-build --config e:\temp\my_config.xml
--dir "E:\cov-int-out"
"d:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild"
"<path>\mysolution.sln" /p:Configuration=Release /p:Platform=x64
The file is not skipped. What am I doing wrong?
References:
https://community.synopsys.com/s/article/Exclude-Unwanted-Files-from-Coverity-Scan-and-Manage-Unwanted-Issues-in-CIM
https://community.synopsys.com/s/article/Exclude-folders-from-Coverity-Scan-Analysis
https://community.synopsys.com/s/article/cli-integration-cheatsheet
UPDATE
Reading the build_log.txt file, I can see that the file is actually skipped:
[STATUS] Ignoring file XMLHelperUtil.cpp because file "<path>\XMLHelperUtil.cpp" matches skip_file pattern "XMLHelperUtil"
I can see that it continues with other files and the it stops here:
..|cov-translate|5052|output|> "FilePath.cpp": using precompiled header file "E:\cov-int\emit\pch\__coverity_ms_pch__1"
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> "..\PtrRefCtr_.h", line 290: warning #1087: the object has type
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> qualifiers that are not compatible with the member function
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> "CPtrRefCtrBase::Validate"
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> object type is: const CPtrRefCtrBase
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> Validate();
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> ^
..|cov-translate|5052|output|>
..|cov-translate|5052|output|>
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> "..\PtrRefCtr_.h", line 383: warning #442: argument list for class
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> template "CRefCtrAuto" is missing
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> CRefCtrCom( Pointee *pObj ): CRefCtrAuto(pObj) { (this)->AddRef(); }
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> ^
..|cov-translate|5052|output|>
..|cov-translate|5052|output|>
..|cov-translate|5052|output|>
..|cov-translate|5052|output|>
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> catastrophic signal: C0000005 (EXCEPTION_ACCESS_VIOLATION)
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> tried to read from addr 0x0000000000000064
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> call stack backtrace:
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> cov-emit.exe mingw64 2021.9.0
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000f7f3e0
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004b2167
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000f7f39d
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000f7f6fb
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> KERNELBASE.dll mingw64 2021.9.0
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000001800e1922
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> ntdll.dll mingw64 2021.9.0
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00007ff8dc0eec73
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00007ff8dc0d18b6
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00007ff8dc0e2f3d
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00007ff8dc0a4557
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00007ff8dc0e20ca
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> cov-emit.exe mingw64 2021.9.0
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004b2167
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004f880f
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000515463
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000515bb4
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004d77d1
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004f87d8
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004f90ba
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000560fa0
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000050f98b
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000050fb25
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000005110c6
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000561308
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000005154f3
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000515aa5
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004c0dfd
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004f89d0
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000515463
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000515998
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004cee81
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004f85ff
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000515463
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000515aa5
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004cee81
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004f85ff
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004f90ba
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000560fa0
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000051085a
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000699690
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000006aa44c
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000633fbd
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000635511
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000063629e
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000638096
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000638a7f
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000006390ce
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004f06d5
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000673f02
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000006724fa
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000053d079
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000053e51b
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004949ae
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000048e405
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000048e9fe
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x0000000000490e5e
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x00000000004928c3
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> (last 4 repeated 2 more times)
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> 0x000000000048e405
..|cov-translate|5052|output|>
..|cov-translate|5052|output|> WARNING: cov-emit returned with code 4 for FilePath.cpp
Nothing happens after this. There are many cov-emit processes running:
If I start killing one process at a time, at some point it restarts. I see new things coming up in the log. There is no new output in the console though, and after processing a few files it stops in the same manner.

After contacting Synopsys support (https://community.synopsys.com/s/case/5002H00001OYqCTQA1/covemit-hangs-all-the-time) it was confirmed that the problem for the hangs is Coverity's current lack of support for Visual Studio 2022, which will come at some point in 2022.

You can skip the non-intended file before cov-analyze stage. Delete the tu emit file from the idir using emit command. Based on the tu deletion, you will not analyze this file at cov-analyze stage and commit issues to server

Related

AttributeError: module 'numba.types' has no attribute 'Macro'

Code is below:
with open('models/shap_explainer.pkl', 'rb') as f:
explainer = pickle.load(f)
with open('models/adult_model.pkl', 'rb') as f:
adult_model = pickle.load(f)
Erro like this:
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_3264\2761765422.py in <module>
16 shap_values = pickle.load(f)
17 with open('models/shap_explainer.pkl', 'rb') as f:
---> 18 explainer = pickle.load(f)
19 with open('models/adult_model.pkl', 'rb') as f:
20 adult_model = pickle.load(f)
D:\Software\Anaconda3\envs\iAI\lib\site-packages\numba\serialize.py in <module>
18 from types import FunctionType, ModuleType
19
---> 20 from . import bytecode, compiler
21
22
D:\Software\Anaconda3\envs\iAI\lib\site-packages\numba\compiler.py in <module>
9 from numba import (bytecode, interpreter, postproc, typing, utils, config,
10 errors,)
---> 11 from numba.targets import cpu, callconv
12 from numba.parfor import ParforDiagnostics
13 from numba.inline_closurecall import InlineClosureCallPass
D:\Software\Anaconda3\envs\iAI\lib\site-packages\numba\targets\cpu.py in <module>
9 from numba import _dynfunc, config
10 from numba.callwrapper import PyCallWrapper
---> 11 from .base import BaseContext, PYOBJECT
12 from numba import utils, cgutils, types
13 from numba.utils import cached_property
D:\Software\Anaconda3\envs\iAI\lib\site-packages\numba\targets\base.py in <module>
23 builtin_registry, impl_ret_borrowed,
24 RegistryLoader)
---> 25 from numba import datamodel
26
27 GENERIC_POINTER = Type.pointer(Type.int(8))
D:\Software\Anaconda3\envs\iAI\lib\site-packages\numba\datamodel\_init_.py in <module>
2 from .packer import ArgPacker, DataPacker
3 from .registry import register_default, default_manager, register
----> 4 from .models import PrimitiveModel, CompositeModel, StructModel
D:\Software\Anaconda3\envs\iAI\lib\site-packages\numba\datamodel\models.py in <module>
304 #register_default(types.ExceptionInstance)
305 #register_default(types.ExternalFunction)
--> 306 #register_default(types.Macro)
307 #register_default(types.EnumClass)
308 #register_default(types.IntEnumClass)
AttributeError: module 'numba.types' has no attribute 'Macro'
I have no idea with it , i have searched for the solution but found nothing about it.
Please help to load above 2 pkl file successfully

nova.compute `nova.exception.VirtualInterfaceCreateException: Virtual Interface creation failed` But server add port success

Operation System: Ubuntu 20.04 in WSL2 on win11 pro
OpenStack version: Yoga
Hardware : 4 cores, 24GB memory, 250GB disk
all component work and healthy
create server with openstack server create --image cirrors test, that always get ERROR instance status, snip logs:
2022-07-13 15:08:01.406 6 INFO nova.compute.manager [req-536a44d6-fab0-4ea9-9b87-8c3c245dcfdf 269860065881439faa4bcdbfb4dd574d 0fafc85310b8499a90483db239a4b5cf - default default] [instance: 32***1d] Took 0.08 seconds to destroy the instance on the hypervisor.
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [req-536a44d6-fab0-4ea9-9b87-8c3c245dcfdf 269860065881439faa4bcdbfb4dd574d 0fafc85310b8499a90483db239a4b5cf - default default] [instance: 32***1d] Failed to allocate network(s): nova.exception.VirtualInterfaceCreateException: Virtual Interface creation failed
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] Traceback (most recent call last):
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/virt/libvirt/driver.py", line 7499, in _create_guest_with_network
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] guest = self._create_guest(
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] next(self.gen)
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/compute/manager.py", line 557, in wait_for_instance_event
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] self._wait_for_instance_events(
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/compute/manager.py", line 469, in _wait_for_instance_events
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] actual_event = event.wait()
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/compute/manager.py", line 434, in wait
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] instance_event = self.event.wait()
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/eventlet/event.py", line 125, in wait
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] result = hub.switch()
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/eventlet/hubs/hub.py", line 313, in switch
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] return self.greenlet.switch()
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] eventlet.timeout.Timeout: 300 seconds
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d]
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] During handling of the above exception, another exception occurred:
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d]
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] Traceback (most recent call last):
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/compute/manager.py", line 2489, in _build_and_run_instance
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] self.driver.spawn(context, instance, image_meta,
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/virt/libvirt/driver.py", line 4333, in spawn
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] self._create_guest_with_network(
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/virt/libvirt/driver.py", line 7517, in _create_guest_with_network
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] raise exception.VirtualInterfaceCreateException()
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d] nova.exception.VirtualInterfaceCreateException: Virtual Interface creation failed
2022-07-13 15:08:01.576 6 ERROR nova.compute.manager [instance: 32***1d]
2022-07-13 15:08:01.587 6 ERROR nova.compute.manager [req-536a44d6-fab0-4ea9-9b87-8c3c245dcfdf 269860065881439faa4bcdbfb4dd574d 0fafc85310b8499a90483db239a4b5cf - default default] [instance: 32***1d] Build of instance 32***1d aborted: Failed to allocate the network(s), not rescheduling.: nova.exception.BuildAbortException: Build of instance 32***1d aborted: Failed to allocate the network(s), not rescheduling.
2022-07-13 15:08:01.589 6 INFO os_vif [req-536a44d6-fab0-4ea9-9b87-8c3c245dcfdf 269860065881439faa4bcdbfb4dd574d 0fafc85310b8499a90483db239a4b5cf - default default] Successfully unplugged vif VIFBridge(active=False,address=fa:16:3e:cb:ee:68,bridge_name='brqa4af79db-4c',has_traffic_filtering=True,id=d636427c-998f-42f3-986b-b32a5fcde06d,network=Network(a4af79db-4c64-4b8e-8747-27e38f1296db),plugin='linux_bridge',port_profile=<?>,preserve_on_delete=False,vif_name='tapd636427c-99')
2022-07-13 15:08:02.375 6 INFO nova.compute.manager [req-536a44d6-fab0-4ea9-9b87-8c3c245dcfdf 269860065881439faa4bcdbfb4dd574d 0fafc85310b8499a90483db239a4b5cf - default default] [instance: 32***1d] Took 0.79 seconds to deallocate network for instance.
But while use port create and server create without port(openstack server create --image cirrors --flavor 4C2G --os-compute-api-version 2.90 --nic none test) independently, then exec server add port attach the port to the instance, the network interface in instance works and could be connected by that port's IP, although port list show the port always DOWN status.
Question:
1, what's wrong with the nova-compute while create server?
2, how could I solve this problem VirtualInterfaceCreateException?

Why is the gdt not getting loaded in this code?

This is written in AT&T syntax. I'm asking if there is any issues with my gdt here, because my interrupts aren't working. Please point out any errors I may have
I'm using GRUB as my bootloader and compiling for the i386 architecture. I already have my cross toolchain setup & I can't really seem to find any error here
# TODO: Rewrite in intel syntax
# multiboot header constants
.set ALIGN, 1<<0
.set MEMINFO, 1<<1
.set FLAGS, ALIGN | MEMINFO # flags
.set MAGIC, 0x1BADB002 # magic number
.set CHECKSUM, -(MAGIC + FLAGS) # checksum
# multiboot header
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
.section .gdt
# Setup that GDT
gdt:
gdt_null:
.word 0
.word 0
.word 0
.word 0
gdt_code:
.word 65535
.word 0
.byte 0
.byte 154
.byte 207
.byte 0
gdt_data:
.word 65535
.word 0
.byte 0
.byte 154
.byte 207
.byte 0
gdt_end:
gdt_desc:
.word gdt_end - gdt - 1
.word gdt
# reserve stack
.section .bss
.align 16
stack_bottom:
.skip 16384 # 16 KiB
stack_top:
# entry point for the kernel
.section .text
.global _start
.type _start, #function
_start:
movl $stack_top, %esp
# to the kernel we go!
push %eax
push %ebx
cli # disable interrupts
lgdt (gdt_desc) # load GDT
sti # enable interrupts
call _main
cli
hlt
.size _start, . - _start

Perl - Issue installing or connecting to queue manager from MQSeries - 1.34 (Reason = 2059)

I tried to install MQSeries 1.34 from CPAN, and I was getting an error, which I found a fix for on the CPAN bug tracking website. So I applied the fix and still got a few test errors, but the build seemed okay. Installing it with a force install MQSeries worked. Once I had installed it, I can construct objects and reference the libraries in my other perl scripts, but when I try to connect to the queue manager or queue, I get an error back.
Any advice on what is wrong with the setup or how to fix this and get my connection back up and running would be much appreciated.
Here are specifics about my configuration:
$ uname -srvpio
Linux 2.6.32-573.22.1.el6.x86_64 #1 SMP Thu Mar 17 03:23:39 EDT 2016 x86_64 x86_64 GNU/Linux
$ /opt/mqm/bin/dspmqsver
Name: WebSphere MQ Advanced Message Security
Version: 7.5.0.0
Level: p000-L120604
BuildType: IKAP - (Production)
$ rpm -qa |grep 'MQ' |sort
MQSeriesAMS-7.5.0-0.x86_64
MQSeriesClient-7.5.0-0.x86_64
MQSeriesExplorer-7.5.0-0.x86_64
MQSeriesFTAgent-7.5.0-0.x86_64
MQSeriesFTBase-7.5.0-0.x86_64
MQSeriesFTLogger-7.5.0-0.x86_64
MQSeriesFTService-7.5.0-0.x86_64
MQSeriesFTTools-7.5.0-0.x86_64
MQSeriesGSKit-7.5.0-0.x86_64
MQSeriesJava-7.5.0-0.x86_64
MQSeriesJRE-7.5.0-0.x86_64
MQSeriesMan-7.5.0-0.x86_64
MQSeriesMsg_cs-7.5.0-0.x86_64
MQSeriesMsg_de-7.5.0-0.x86_64
MQSeriesMsg_es-7.5.0-0.x86_64
MQSeriesMsg_fr-7.5.0-0.x86_64
MQSeriesMsg_hu-7.5.0-0.x86_64
MQSeriesMsg_it-7.5.0-0.x86_64
MQSeriesMsg_ja-7.5.0-0.x86_64
MQSeriesMsg_ko-7.5.0-0.x86_64
MQSeriesMsg_pl-7.5.0-0.x86_64
MQSeriesMsg_pt-7.5.0-0.x86_64
MQSeriesMsg_ru-7.5.0-0.x86_64
MQSeriesMsg_Zh_CN-7.5.0-0.x86_64
MQSeriesMsg_Zh_TW-7.5.0-0.x86_64
MQSeriesRuntime-7.5.0-0.x86_64
MQSeriesSamples-7.5.0-0.x86_64
MQSeriesSDK-7.5.0-0.x86_64
MQSeriesServer-7.5.0-0.x86_64
MQSeriesXRClients-7.5.0-0.x86_64
MQSeriesXRService-7.5.0-0.x86_64
$ ./dispModVersion.pl MQSeries
Module Installed CPAN
MQSeries 1.34 1.34
$ perl -v
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux
Copyright 1987-2015, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
$ perl -V
Summary of my perl5 (revision 5 version 22 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.32-573.22.1.el6.x86_64, archname=x86_64-linux
uname='linux ******* 2.6.32-573.22.1.el6.x86_64 #1 smp thu mar 17 03:23:39 edt 2016 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Dprefix=******'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',
optimize='-O2',
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-16)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.12.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.12'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Apr 18 2016 15:46:59
%ENV:
PERL5BIN="*******/bin"
PERL5HOME="*******"
PERL5SITE="*******/lib/site_perl/5.22.1"
#INC:
*******/lib/site_perl/5.22.1/x86_64-linux
*******/lib/site_perl/5.22.1
*******/lib/5.22.1/x86_64-linux
*******/lib/5.22.1
When I first tried to install MQSeries, I got the following error:
t/99-pod.t .. 2/63
# Failed test 'POD test for MQSeries/Message/IIH.pm'
# at Test/Pod.pm line 187.
# MQSeries/Message/IIH.pm (415): Non-ASCII character seen before =encoding in 'Villagâ–’mez'. Assuming CP1252
# Looks like you failed 1 test of 63.
t/99-pod.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/63 subtests
Test Summary Report
-------------------
t/99-pod.t (Wstat: 256 Tests: 63 Failed: 1)
Failed test: 61
Non-zero exit status: 1
Files=1, Tests=63, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.34 cusr 0.00 csys = 0.37 CPU)
Result: FAIL
Failed 1/1 test programs. 1/63 subtests failed.
Then, I modified the file MQSeries/Message/IIH.pm to add =encoding ISO-8859-1 at the start of the file, per bug report on CPAN, I ran the install again and got the following:
t/99-pod.t .. ok
All tests successful.
Files=1, Tests=63, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.34 cusr 0.01 csys = 0.39 CPU)
Result: PASS
make[1]: Entering directory `build/MQSeries-1.34-SLJq6K/MQClient'
PERL_DL_NONLAZY=1 "perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
t/10constants.t ........... ok
t/20convert.t ............. Failed 5/6 subtests
t/30basic.t ............... ok
t/31properties.t .......... ok
t/32async_put.t ........... ok
t/40oo-qmgr.t ............. 3/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 38.
# Failed test 'MQSeries::QueueManager - constructor'
# at t/40oo-qmgr.t line 39.
t/40oo-qmgr.t ............. 5/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 52.
# Failed test 'MQSeries::QueueManager - Connect'
# at t/40oo-qmgr.t line 58.
t/40oo-qmgr.t ............. 7/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 73.
# Failed test 'MQSeries::QueueManager - constructor'
# at t/40oo-qmgr.t line 74.
Can't call method "Open" on an undefined value at t/40oo-qmgr.t line 77.
# Looks like you planned 14 tests but ran 7.
# Looks like you failed 3 tests of 7 run.
# Looks like your test exited with 13 just after 7.
t/40oo-qmgr.t ............. Dubious, test returned 13 (wstat 3328, 0xd00)
Failed 10/14 subtests
t/50oo-command.t .......... ok
t/51oo-command-changes.t .. ok
t/52oo-command-filter.t ... ok
t/60-logs.t ............... ok
t/70-config.t ............. ok
Test Summary Report
-------------------
t/20convert.t (Wstat: 0 Tests: 2 Failed: 1)
Failed test: 2
Parse errors: Bad plan. You planned 6 tests but ran 2.
t/40oo-qmgr.t (Wstat: 3328 Tests: 7 Failed: 3)
Failed tests: 3, 5, 7
Non-zero exit status: 13
Parse errors: Bad plan. You planned 14 tests but ran 7.
Files=11, Tests=5334, 1264 wallclock secs ( 0.96 usr 0.02 sys + 1.56 cusr 0.18 csys = 2.72 CPU)
Result: FAIL
Failed 2/11 test programs. 4/5334 subtests failed.
If I force the install, I can get it to finish the install after everything is said and done, but then I get the following error when trying to connect:
MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at testMQConnectivity.pl line 16.
MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at testMQConnectivity.pl line 16.
at MQSeries/QueueManager.pm line 809.
MQSeries::QueueManager::Connect(MQSeries::QueueManager=HASH(0x24a7180)) called at MQSeries/QueueManager.pm line 155
MQSeries::QueueManager::new(undef, "QueueManager", "*******", "Reason", SCALAR(0x151d4f0), "CompCode", SCALAR(0x151d610), "ClientConn", ...) called at testMQConnectivity.pl line 16
I edited the CONFIG file after pulling the data from CPAN to reference my remote MQ Queues that I can connect to using /opt/mqm/samp/bin/amqsputc or /opt/mqm/samp/bin/amqsgetc, after setting export MQSERVER=..., if I run make test TEST_VERBOSE=1 from the working CPAN directory, I see the following output:
t/20convert.t:
t/20convert.t .............
1..6
ok 1
ok 2
ok 3
ok 4
MQGET failed: CompCode => 2, Reason => 2033
not ok 5
Message conversion failed.
Should be: 'This msg is in EBCDIC'
Is: ''
not ok 6
Failed 2/6 subtests
t/31properties.t:
t/31properties.t ..........
1..22
ok 1 - use MQClient::MQSeries;
Connecting to queue manager '*******' (MQCONN)
ok 2 - MQCONN
Opening queue manager for inquire
ok 3 - MQOPEN - queue manager
Querying queue manager attributes (MQINQ)
ok 4 - MQINQ
Closing queue manager object handle (MQCLOSE)
ok 5 - MQCLOSE - queue manager
Create message handle object (MQCRTMH)
ok 6 - MQCRTMH
Set message property (MQSETMP - string)
ok 7 - MQSETMP - string
Set message property (MQSETMP - float)
ok 8 - MQSETMP - float
Set message property (MQSETMP - int)
ok 9 - MQSETMP - int
Inquire message property (MQINQMP - float)
ok 10 - MQINQMP - float
ok 11 - MQINQMP - float value okay (3.14164996147156)
Delete float property
ok 12 - MQDLTMP - float
Opening queue '*******' (MQOPEN)
ok 13 - MQOPEN - queue
Putting message with properties (MQPUT)
ok 14 - MQPUT
Create message handle object (MQCRTMH #2)
ok 15 - MQCRTMH \#2
Getting message (MQGET)
not ok 16 - MQGET
# Failed test 'MQGET'
# at t/31properties.t line 146.
Inquire message property (MQINQMP - int)
not ok 17 - MQINQMP - int
# Failed test 'MQINQMP - int'
# at t/31properties.t line 156.
Use of uninitialized value $prop in concatenation (.) or string at t/31properties.t line 157.
not ok 18 - MQINQMP - int value okay ()
# Failed test 'MQINQMP - int value okay ()'
# at t/31properties.t line 157.
# got: undef
# expected: '42'
Delete message handle (MQDLTMH)
ok 19 - MQDLTMH
Delete message handle (MQDLTMH #2)
ok 20 - MQDLTMH \#2
Closing queue (MQCLOSE)
ok 21 - MQCLOSE
Disconnecting (MQDISC)
ok 22 - MQDISC
# Looks like you failed 3 tests of 22.
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/22 subtests
t/32async_put.t:
t/32async_put.t ...........
1..25
ok 1 - use MQClient::MQSeries;
Connecting to queue manager '*******' (MQCONN)
ok 2 - MQCONN
Opening queue manager for inquire
ok 3 - MQOPEN - queue manager
Querying queue manager attributes (MQINQ)
MQINQ returned: CompCode => 0, Reason => 0
ok 4 - MQINQ
Closing queue manager object handle (MQCLOSE)
ok 5 - MQCLOSE - queue manager
Opening queue '*******' (MQOPEN)
ok 6 - MQOPEN - queue
Putting message #1 (async MQPUT)
ok 7 - MQPUT - 1
Putting message #2 (async MQPUT)
ok 8 - MQPUT - 2
Putting message #3 (async MQPUT)
ok 9 - MQPUT - 3
Putting message #4 (async MQPUT)
ok 10 - MQPUT - 4
Putting message #5 (async MQPUT)
ok 11 - MQPUT - 5
Getting status info (MQSTAT)
ok 12 - MQSTAT
not ok 13 - MQSTAT result
# Failed test 'MQSTAT result'
# at t/32async_put.t line 120.
# Structures begin differing at:
# $got->{PutSuccessCount} = '5'
# $expected->{PutSuccessCount} = '0'
Getting message #1 (MQGET)
ok 14 - MQGET - 1
ok 15 - MQGET message content - 1
Getting message #2 (MQGET)
ok 16 - MQGET - 2
ok 17 - MQGET message content - 2
Getting message #3 (MQGET)
ok 18 - MQGET - 3
ok 19 - MQGET message content - 3
Getting message #4 (MQGET)
ok 20 - MQGET - 4
ok 21 - MQGET message content - 4
Getting message #5 (MQGET)
ok 22 - MQGET - 5
ok 23 - MQGET message content - 5
Closing queue (MQCLOSE)
ok 24 - MQCLOSE
Disconnecting (MQDISC)
ok 25 - MQDISC
# Looks like you failed 1 test of 25.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/25 subtests
And t/40oo-qmgr.t, which was previously failing now executes successfully:
t/40oo-qmgr.t:
t/40oo-qmgr.t .............
1..14
ok 1 - use MQClient::MQSeries;
ok 2 - use MQSeries::QueueManager;
ok 3 - MQSeries::QueueManager - constructor
ok 4 - MQSeries::QueueManager - constructor - AutoConnect=0
ok 5 - MQSeries::QueueManager - Connect
ok 6 - MQSeries::QueueManager - Disconnect
ok 7 - MQSeries::QueueManager - constructor
ok 8 - MQSeries::QueueManager - Open
ok 9 - MQSeries::QueueManager - Inquire
ok 10 - MQSeries::QueueManager - Inquire - Platform
ok 11 - MQSeries::QueueManager - Inquire - CodedCharSetId
ok 12 - MQSeries::QueueManager - Inquire - CommandLevel
ok 13 - MQSeries::QueueManager - Inquire - DeadLetterQName
ok 14 - MQSeries::QueueManager - Close
ok
Yielding the final results:
Test Summary Report
-------------------
t/20convert.t (Wstat: 0 Tests: 6 Failed: 2)
Failed tests: 5-6
t/31properties.t (Wstat: 768 Tests: 22 Failed: 3)
Failed tests: 16-18
Non-zero exit status: 3
t/32async_put.t (Wstat: 256 Tests: 25 Failed: 1)
Failed test: 13
Non-zero exit status: 1
Files=11, Tests=5345, 183 wallclock secs ( 1.02 usr 0.08 sys + 1.48 cusr 0.18 csys = 2.76 CPU)
Result: FAIL
Failed 3/11 test programs. 6/5345 subtests failed.
Any ideas on how to get this resolved and get the package up and running?
If I run /opt/mqm/samp/bin/amqsputc or /opt/mqm/samp/bin/amqsgetc, I can connect to the same host, port, channel, queue manager, and queue from this host.
Thanks!

error in solving acoupled,first order differential equations in ipython

I have a following coupled, first order differential equations:
dB(t)/dt=-a*A(t);
dA(t)/dt=b*B(t);
dJ(t)/dt=cA(t)-dB(t)
Solve the system using paramenters a = 0.05, b = 0.02, c = 0.03 and d = 0.04 of your own choice over a time interval from 0 to 200.
Here is my code:
a=0.05
b=0.02
c=0.03
d=0.04
def function(x,t):
x1, x2, x3 = x[0], x[1], x[2]
#x1, x2, x3 = A, B, J
dx1=b*x1
dx2=-a*x0
dx3=c*x0-d*x1
return [dx1, dx2, dx3]
x0 = [100,100, 1]
t = linspace(0, 200, 200)
x = odeint(function, x0, t)
The output I got is:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-f8f398346307> in function(x, t)
8 #x1, x2, x3 = A, B, J
9 dx1=b*x1
---> 10 dx2=-a*x0
11 dx3=c*x0-d*x1
12 return [dx1, dx2, dx3]
TypeError: can't multiply sequence by non-int of type 'float'
Repeated convergence failures (perhaps bad Jacobian or tolerances).
Run with full_output = 1 to get quantitative information.
what is the problem of my code?
You have three first-order equations, not second order. (Or did you mean to write second order derivatives in your equations 1, 2, and 3?)
deriv should return the three values dA/dt, dB/dt and dJ/dt, but currently it returns an array of length 5.
zinit should contain three values: A(0), B(0) and J(0).
I think i have fixed it.
a=0.05
b=0.02
c=0.03
d=0.04
def function(x,t):
x1, x2, x3 = x[0], x[1], x[2]
#x1, x2, x3 = A, B, J
dx1=b*x2
dx2=-a*x1
dx3=c*x1-d*x2
return [dx1, dx2, dx3]
x0 = [100,100, 1]
t = linspace(0, 200, 200)
x = odeint(function, x0, t)