I was making an attempt to read the first line, then the next 5 lines of the file...each line is one word, the file path...and store each file path all into the same buffer, i changed it to strlen()...
Type: Posts; User: johngoodman
I was making an attempt to read the first line, then the next 5 lines of the file...each line is one word, the file path...and store each file path all into the same buffer, i changed it to strlen()...
Ok, that's working now, thank you! I've been doing a little looking around and I think there is an easier route to do simple file IO. What if I went a different route, say fscanf.... dealing with...
Here is my second version going off what you said about my previous code:
int p;
int id;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &p);
...
int p;
int id;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &p);
MPI_Comm_rank(MPI_COMM_WORLD, &id);
if(id==0) { // Process 0
FILE *infile;
...
I'm having difficulties passing the right amount of characters to other processes using scatter. I'm trying to open a file which contains 6 file names and splitting it up and sending a file name to...
Never mind, solved it
I solved the problem, the only thing not working now is my ranges, all the recipients calculate 21 prime numbers resulting in 63...I want to split the range up into three parts. I'm having trouble...
When I get a moment I will do that, thank you for the recommendation
That makes sense Salem, thank you, but now it's going through and giving me zero as the result. Here is my revised code:
int main(int argc, char **argv){
int myID;
int numProcs;
...
I wrote a program which sends a starting and ending range to other processes and the processes calculate the prime numbers in that range and return the count of prime numbers to the head process,...
I'm trying to complete a basic socket program. I have a class which is the server and I have 3 clients/nodes. The master is supposed to split a range of values into three equal parts and pass...
I removed the parentheses making the vectors actually instance variables rather than functions, but that line is still giving me a problem:
In file included from simulation.cc:1:
cache.cc: In...
What you are seeing is me in the early stages still fiddling with concepts giving a first shot at things and I throw it on here to kind of get other peoples' feedback, I only do this when I'm not...
I really appreciate all the help, but my four files of code isn't effort enough? Believe me I'm putting in the effort, I'm really new to C++
The problem I'm currently trying to solve is the one on this line in cache's read function: int hitFlag = v.at(0)->set.read(offset, tag);
and my loop initializing all the sets in the constructor: ...
I'm getting an error when I attempt compiling my program. I left out the block.cc/h files because they don't pertain to the problem at hand at the moment. I'm building a cache simulator but the...
Is there a way of passing all the variables I want from the server to the client in one read? Otherwise, yes, I see what you have pointed out but I don't really know how to properly pass the values...
I'm trying to complete a basic socket program. I have a class which is the server and I have a client which is in a different class. The master is supposed to pass a given range of values to the...
Thank you for the response! So then what would it look like to split up a 64 bit address...I'd like my cache to be able to handle up to 64 bits using unsigned longs
I'm attempting to make a cache simulator in C++. But I need to access individual bits in an integer to figure out where in my "cache" the writing actually gets done. I'm pretty new to bit...
I'm actually passing ints to a function which takes in unsigned longs so I can handle up to 64 bits
For now I'm just attempting a directly mapped cache
I need to break the bits up into 3 sections: tag, set index, and block index. I think I can figure out the set and block index sizes based on the values passed in. The tag bits are just the...
I'm attempting to make a cache simulator in C++. But I need to access individual bits in an integer to figure out where in my "cache" the writing actually gets done. I'm pretty new to bit shifting....
I'm having difficulties trying to keep track of each individual thread's run time. The program works, in finding the primes but all I'm trying to do now is get each thread's run time and how many...