Thanks for the reply.
Chris
Type: Posts; User: Chris_1980
Thanks for the reply.
Chris
Lets say I have a structure:
struct chromosome { array[100]; fitness;}; struct chromosome old_chrome[100];
And in a while loop the values of array are changed. In the loop in every iteration I...
I am wondering if its possible to execute a part of code in main() that will not affect the rest of the execution. For example assign different values to variables that will be only valid inside a...
Again thanks to everybody. However I feel dummy because I cant understand this:
After the for loop old_chrome[i] and new_chrome[i] point to the same place at the memory. Now (later in the code) if I...
Thanks for the quick reply. So after the "for loop" copy the new and old will write at the same point. As a result, if lets say the new_chrome[i].genes[i] is changed by some process after the "for...
Dear all,
I am wondering if I understand well. In the structure below
struct chromosome{
double genes[NUM_OF_GENES];
};
struct chromosome ...
Dear All.
Maybe this is a little bit irrelative question for this forum but maybe someone has experience on this. I would like to minimize a function of the form (A*x-b)^2 ( A matrix x vector b...
the */ after the
/*MPI_Send(&array2,0,MPI_INT,0,9,cowork_comm);*/
}
shouldnt be there but it's a typo; it's not the problem
in the code below. I use MPI_Comm_excl to exclude rank 0 of MPI_COMM_WORLD
and then split the remaining ranks in "buckets" and correspond a communicator. I use Allreduce in order to sum the...
Dear codeplug,
Many thanks for your reply. You helped me a lot. I couldnt spot this
Best,
Chris
Hello,
I would welcome any info about boards like the C Board but about MPI or general parallel programming
Many thanks,
Christos
In the code below. I splitt the comm WORLD_COMM in 6 subgroups and Allreduce the rank before splitting.
#include "mpi.h"
#include <stdio.h>
int main(argc,argv)
int argc;
char *argv[];...
I am using derived datatypes to broadcast array of structures as below. But what is happens is that I send only the half of what I would like. rank1 should have values (0-9) until i=9 like rank0. But...
thank you. This is what I was thinking. No way to avoid loading network
many thanks
THanks for the reply codeplug.
Is there any other way to do this without changing these lines of code?
Many thanks on behalf
In the code below. I use MPI_Allreduce in order to sum the old_chrome[x].fitness.
#include <stdio.h>
#include <mpi.h>
#include <time.h>
#include <stdlib.h>
thank you very match sprintf worked fine
How its possible since the only thing that you said is to open the file and print if it is ok. You have to read the data and then print
In the code below I would like each time to open a file with name input_i where i could be a number that varies for example from 1 to 10. Could you help me on this.
Many thanks
if ((infileX...
my question could be is there any way of saying any character in awk like the "*" operator
As far as i understand there is the "." operator which means any but only one character.
for example A.U ...
I have a list of records like below:
N_p_hello[f]_lolo where p and f is a number from 0 to 1000 and i would like to substitute the hello[f] with the number f so it will be
N_p_f_lolo
I tried...
Hello to All,
I have a problem. I have a list like below:
A_1_ccc_2_0 = 2
A_3_ccc_4_1 = 1
A_2_ccc_2_2 = 4
.
.
.
thanks for the answer
Hello,
I would welcome some help in the code below. I would like to Scatter from the node 0,the genes' field in different nodes in a chunk of 2.
#include <stdio.h>
#include <stdlib.h>...
Hi to all,
In the example code below I was wondering how to Scatter
struct chromosome{
double fitness;
double genes[NUM_OF_GENES];