Type: Posts; User: LMHmedchem
Search took 0.02 seconds.
January 19th, 2014, 06:59 PM
I am looking at something like this,
// resize 2D storage structure
void resizeVec( std::vector<std::vector<double> > &vec , int ROWS , int...
January 19th, 2014, 06:08 PM
Well, as I said, I didn't write this code and had never really looked at it before it failed today. I can hard code the array size using static and process the files I am looking at, but I would have...
January 19th, 2014, 04:25 PM
This program has worked for a long time as written. I will process a smaller input file with no issues. It was also my understanding that the compiler needed to know the size of an array to know how...
January 19th, 2014, 03:17 PM
gcc version 4.8.2 (GCC)
I am compiling with g++, but it looks as if this is written in c. Would it make any difference to compile with gcc?
If I convert to static and hard code for this input...
January 19th, 2014, 02:24 PM
I have a little program that does some statistical processing on text files. The program has thrown a segmentation fault with an input file that is larger that I have used before. I didn't...
October 18th, 2013, 12:13 PM
I guess I need to add some additional error checking like that. These global variables, like the number of graph neighbors, are used for thousands of calculations and it would be a bore to check...
October 17th, 2013, 07:20 PM
For the second case,
XV0 = XV0 + 1/sqrt(fabs( (double)molAtoms[currentAtom].valenceDelta ));
The class member molAtoms[currentAtom].valenceDelta is a float, but XVO is a double. I am running...
October 17th, 2013, 05:40 PM
Since X0 and XV0 are doubles, I changed to,
// simple X0, sum reciprocal square root of simple delta
X0 = X0 + 1/sqrt( (double)molAtoms[currentAtom].simpleDelta );
October 17th, 2013, 03:30 PM
Well removing the space does get it to compile, except there are some errors. Oddly, these compiler errors do not show up under gcc3.4 cygwin, only under gcc3.3 opensuse. That is another issue I...
October 17th, 2013, 03:09 PM
Well that would be annoyingly simple. I need to go back a bit and test that. Why would all the other versions of gcc that this compiles under not care about the extra space?
October 17th, 2013, 02:35 PM
The opensuse version of g77 is 3.3.3-hammer. Under cygwin, the version is 3.4.4. I would have to open the cent VM to check, but I think that is 3.4 as well. I have compiled this src under cygwin and...
October 17th, 2013, 02:15 PM
I am trying to compile some code under opensuse 12.2. The code compiles fine under cygwin and CentOS. Under suse, I get the error "directory name must immediately follow -I"
This is the...
July 15th, 2013, 04:14 PM
I guess I should have indicated that I was posting pseudo code, at least for the assignments. These vectors are populated with push_back and I have printed them to confirm their contents. This src...
July 15th, 2013, 03:20 PM
I found that if I use sort with greater<float>(), then it will work,
sort( vec2.begin(), vec2.end(), greater<float>() );
This gives the anticipated behavior for both vectors. Can someone...
July 15th, 2013, 03:13 PM
I have two vectors of float that I need to sort in reverse order. reverse() seems to work for one of them, but not the other. I have toggled between sort() and reverse(). for one vector, the expected...
Well I was able to get this working,
in bash script find_OS_NAME.sh,
# script to find the OS distribution and version
As advertized, I would like to call a script from a makfile to glean some information about the OS. What I more or less need is the OS name and version (CentOS-5.9, OPENSUSE-12.2, Cygwin,...
Unfortunately, I have had great trouble getting gdb to play nicely with g77. If anyone has a good writeup on how to do that, I would appreciate a link.
I add a second conditional in the for loop....
Once again, now that I have written the whole thing up, I see the problem. I swear that writing up a post is the best debugging exercise. The third string isn't found because there is no trailing...
I have some cpp code that is looping through an array of char looking for a delimiter. The code saves the chars in a string until it finds the delimiter, then it adds the string to a vector of...
February 16th, 2013, 11:33 AM
I have some code that I have been compiling for windows and linux using gcc, g++, and g77. I would like to take a look at compiling the same code for OSX. I have vbox VMs for the different OSs I...
September 9th, 2012, 12:09 PM
Thanks Paul, this has been helpful. Now I need to make up a simple dll and play around with the calling code. The amount of data being passed back and forth is not small. I would expect the calling...
September 8th, 2012, 01:24 AM
Thanks, that's a bit help. I will probably make generic functions (open_lib, sync_lib, close_lib) and abstract the OS specific functions in those. Is there a standard for passing data between the...
September 7th, 2012, 03:59 PM
I have a program that I would like to be able to call from other programs and pass data between the two programs though memory (meaning not file based). The program being called (calledApp.exe) is in...
August 4th, 2012, 06:39 PM
I probably need to pay more attention to resource management than I do, but I will leave that for another time.
That sounds like an interesting implementation. Do you have a reference for the...
Click Here to Expand Forum to Full Width