mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2023-06-12, 22:33   #1
pepi37
 
pepi37's Avatar
 
Dec 2011
After 1.58M nines:)

23·13·17 Posts
Default Adjustable divide data in row

Ok, as always I have some strange problems: if I can say at start dont judge my definitions or decisions and tell me what is better or not:thanks for that.
So problem is: I have 5 computers running linux: two are Ryzen 3700X one is Ryzen 3600 , one is Ryzen 3900 and one is Intel I5-9600K
So I need to divide data for processing ( CRUS sequences) equal and in row .
This is real data
3700X 4 workers - 2 cores per worker (*2 since I got same CPU)
3900X 4 workers - 3 cores per worker
3600 2 worker - 3 cores per worker
Intel 1 worker with 6 cores.

So I can sum all number of cores ( in this case 40 cores) divide it with number or candidates lets say 1000 candidates : so every core got
25 workunits)
For that I use script Batalov wrote and it works perfectly

Quote:
echo 'SPLIT [number of workers]'
range=$(seq 1 $1);
for i in `seq 1 $1`; do
echo '[Worker #'$i']'; awk 'a++%'$1'=='$i'-1' in.txt
done > final.txt
So that is first part. and it is easy.

Second part is puzzling me
For 3700 I need to take first 8 sections from "final.txt- (Batalov script) since it has 8 cores: sort it again to be in row and split it in 4 equal parts.
So I take 8 sections, sort it and using Batalov script got perfect answer.

But can be done faster then this? - that is my question
I would like that answer can be adjustable since for other situations number of workers can be changes.

Prefer linux script as answer.

Thanks for any reply

Last fiddled with by pepi37 on 2023-06-12 at 22:33
pepi37 is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does a prime p divide a Fermat Number? MattcAnderson Math 8 2020-10-14 01:05
TF data SethTro Data 8 2020-04-30 23:35
Prime numbers 2kMp+1 that (don't) divide MMp ET_ Operazione Doppi Mersennes 26 2019-02-03 18:25
How to divide a circle into 16 pieces with only 5 lines???? 4 lil pigs mom Homework Help 52 2006-12-05 08:41
ERROR: Factor doesn't divide N! chalsall Software 4 2003-04-10 23:32

All times are UTC. The time now is 11:43.


Sun Sep 24 11:43:48 UTC 2023 up 11 days, 9:26, 0 users, load averages: 1.69, 1.33, 1.13

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔