aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-11-02 08:11:32 -0600
committerMatt Strapp <strap012@umn.edu>2020-11-02 08:11:32 -0600
commit85060d16f804b5514cedf647c568126e201f5a24 (patch)
tree8445c17a271c7032dc8579b037e897b5f3828445
parentTry to make debugging less awful (diff)
downloadcsci4061-85060d16f804b5514cedf647c568126e201f5a24.tar
csci4061-85060d16f804b5514cedf647c568126e201f5a24.tar.gz
csci4061-85060d16f804b5514cedf647c568126e201f5a24.tar.bz2
csci4061-85060d16f804b5514cedf647c568126e201f5a24.tar.lz
csci4061-85060d16f804b5514cedf647c568126e201f5a24.tar.xz
csci4061-85060d16f804b5514cedf647c568126e201f5a24.tar.zst
csci4061-85060d16f804b5514cedf647c568126e201f5a24.zip
Add a thing or twelve
-rw-r--r--P2/lib/utils.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c
index 960ab18..c30f7e3 100644
--- a/P2/lib/utils.c
+++ b/P2/lib/utils.c
@@ -46,6 +46,7 @@ void sendChunkData(char *inputFile, int nMappers) {
Maybe copy message.msgText into a new array, do the
backwards iteration, and then replace message.msgText
with the temp array? Or something? */
+ //fseek()
// TODO! help
@@ -54,11 +55,9 @@ void sendChunkData(char *inputFile, int nMappers) {
// message.msgText
// }
- message.msgType = map++;
+ message.msgType = (map++ % nMappers) + 1 ;
//THIS IS DEBUG, NOT ACTUALLY FUNCTIONAL (like at all)
msgsnd(msgid, &message, map, 0);
- if (map > nMappers)
- map = 1;
}
for (int i = 1; i < nMappers; i++) {