Yep, allocation with malloc works fine. Except now I have OpenCL errors, will fix those... Then look at the libs you use. What is openCL good for? Do you really need it? Testing many combinations on an algorithm at once.
|
|
|
Stack overflow... Now I'll know to be weary of static variables. I'll try replacing large static arrays with allocated memory and hopefully it will work... I thought the stack size would grow to meet larger variables... It would be nice if there was some error or warning when this happens.
|
|
|
I fiddled with the code and slowly removed parts until I got a super small program that crashes: #include <errno.h>
int main () { if (!errno) { int bar[2096159]; } return 0; } This gives: (null):Parrallel BitCoin Trading Algorithm matt$ gcc -g test.c -o test (null):Parrallel BitCoin Trading Algorithm matt$ gdb test GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done
(gdb) run Starting program: /Users/matt/Programming/Bit Coin algorithm/Parrallel BitCoin Trading Algorithm/test Reading symbols for shared libraries +. done
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00007fff5f3ffff8 0x00007fff5fc1404c in __dyld__ZNK26ImageLoaderMachOCompressed18findExportedSymbolEPKcPPK11ImageLoader () (gdb)
But if the array is one smaller: #include <errno.h>
int main () { if (!errno) { int bar[2096158]; } return 0; } Then this happens: (null):Parrallel BitCoin Trading Algorithm matt$ gcc -g test.c -o test (null):Parrallel BitCoin Trading Algorithm matt$ gdb test GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done
(gdb) run Starting program: /Users/matt/Programming/Bit Coin algorithm/Parrallel BitCoin Trading Algorithm/test Reading symbols for shared libraries +. done
Program exited normally. (gdb)
Stack trace: (gdb) bt #0 0x00007fff5fc1404c in __dyld__ZNK26ImageLoaderMachOCompressed18findExportedSymbolEPKcPPK11ImageLoader () #1 0x00007fff5fc0f141 in __dyld__ZNK16ImageLoaderMachO18findExportedSymbolEPKcbPPK11ImageLoader () #2 0x00007fff5fc12b34 in __dyld__ZN26ImageLoaderMachOCompressed15resolveTwolevelERKN11ImageLoader11LinkContextEPKS0_bPKcPS5_ () #3 0x00007fff5fc12dd0 in __dyld__ZN26ImageLoaderMachOCompressed7resolveERKN11ImageLoader11LinkContextEPKchiPPKS0_PNS_10LastLookupE () #4 0x00007fff5fc1699e in __dyld__ZN26ImageLoaderMachOCompressed20doBindFastLazySymbolEjRKN11ImageLoader11LinkContextE () #5 0x00007fff5fc0478f in __dyld__ZN4dyld18fastBindLazySymbolEPP11ImageLoaderm () #6 0x00007fff8812800a in dyld_stub_binder () #7 0x0000000100001030 in pvars () #8 0x0000000100000ef4 in start ()
Well I'm stumped...
|
|
|
At this point in the program nothing is initialised since it's at the main function entry. I ran gdb again and it shows 0xbea7d7cc again. No idea where it came from. What I'll try to do is make and share a minimalist version of the program that replicates the problem...
|
|
|
Months means the markets can change even more so. I think completely oppositely: Use technical analysis more so in day trading. Dissonance between the fundamentals and the price shows opportunity for longer trades. Markets follow reality and not just predictable price patterns. If you can figure out something most others cannot then you can make good decisions. No doubt most people are clueless to the silver and gold manipulation and economics... knowledge of which puts people into an advantage.
|
|
|
you can't possibly know all the fundamental factors involved that go into the price of gold.
this is why technical analysis is so important. You can know what you can and that's better than blindness.
|
|
|
The manipulation is staring you in your face, it's hard to disagree with it.
|
|
|
Well I just tried compiling and running outside of Xcode and I get the same thing... Matthew-Mitchell:Parrallel BitCoin Trading Algorithm matt$ gcc -g cmain.c -o test -lcurl -framework OpenCL -std=c99 -arch i386 Matthew-Mitchell:Parrallel BitCoin Trading Algorithm matt$ gdb testGNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... done
(gdb) run Starting program: /Users/matt/Programming/Bit Coin algorithm/Parrallel BitCoin Trading Algorithm/test Reading symbols for shared libraries .+++.................................................................. done
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0xbea7d7cc 0x00003e9a in main (argc=0, argv=0x1000) at cmain.c:572 572 int main (int argc, const char * argv[]) { (gdb)
Also when running directly in the command line, it returns instantly.
|
|
|
What I mean is hedging isn't manipulation so it's all lies.
|
|
|
And who is JP Morgan "hedging" silver for? Doesn't add up.
|
|
|
I removed all optimisation and now the line during the crash is shown at entering the main function... I removed all curllib and the same problem occurs... I removed all of the OpenCL and the same problem occurs... What? Is Xcode broken... I replaced the entire program with: #include <stdlib.h> #include <stdio.h>
int main(){ printf(":O"); return EXIT_SUCCESS; }
It works... Time to scratch my head...
|
|
|
Well I modified the code: int main (int argc, const char * argv[]) { float usd,btc,bid,ask,order_price,possible_price; printf("HALLO\n"); DateData * prices = load_prices(); It never prints HALLO and it now crashes o the printf line...
|
|
|
I don't really know what MitChip is but it seems like it isn't competing with bitcoin at all and it's competing more with payment processors like Visa.
|
|
|
OK but what is wrong with this line? FILE * file = fopen("price.dat", "rb"); That's as perfect as a line of code can be. It makes me think the compiler is corrupting the program somehow.
|
|
|
This is is not a C++ object. I'm not even using C++, I'm using C. The type is CombinationResult[PPO_COMBINATIONS * 11]. Also I don't know why declaring several variables on one line is bad style...
|
|
|
Forgot about that, it's a structure with an int and float.
|
|
|
I'm currently unable to test that but that should not be the case. It works when I return from the other function before the suspected bad line occurs.
|
|
|
The recent fall in gold and silver didn't happen with bitcoin.
|
|
|
|