Search Results

Search: Posts Made By: wanliushao
Forum: Programming 11-24-2014
4,376
Posted By wanliushao
MPI C++ in a nested loop
I have a MPI program like this:
void slave1(int j){
MPI_Status status;
MPI_Recv(&j,1,MPI_INT,0,0,MPI_COMM_WORLD,&status);}

void slave2(int j){
MPI_Status status;...
Forum: Programming 11-04-2014
1,773
Posted By wanliushao
How to wait the slave to be finished first then execute the master--MPI C++?
Hi,
How to wait the slave to be finished first then execute the master?
Can someone give me the specific function? Or the detailed example.
Thanks~
2,829
Posted By wanliushao
Thanks~
Thanks~
2,829
Posted By wanliushao
Append awk results into file or array
for a in {1..100}
do
awk '{ sum+=$a} END {print sum}' a=$a file1 > file2
done

I know I will get only one number if following the code above, how can I get 100 sum numbers in file2?
13,075
Posted By wanliushao
Split file into 20000 files
I want to split one files (>200000000 lines) into 20000 files, when I use
spilt -l 23360 -d file it shows output file suffixes exhausted, seems the maximum numbers is 100.....how to solve it?
2,870
Posted By wanliushao
awk '{print $NF}' file | pr -s -t3 Thanks~ This...
awk '{print $NF}' file | pr -s -t3
Thanks~ This works, but the data file is very large, when try to use this to divide it into 20000 parts, the error shows: width too narrow. What should be the...
2,870
Posted By wanliushao
awk dynamically append columns into file
Hi, I have a large data file, want to separate it into 100 part and export one specific field as a file; then I want to append each part's column into one file. How to realize that?

1 2 3 1
2 3...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 06:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy