Page 1 of 2 12 LastLast
Results 1 to 16 of 26

Thread: Need to make a file that opens 4 instances of 1 program.

  1. #1
    Flat cap, Whippets, Cave. Clunk's Avatar
    Join Date
    Jan 2006
    Posts
    11,056
    Thanks
    360
    Thanked
    725 times in 459 posts

    Need to make a file that opens 4 instances of 1 program.

    I want to have one icon on my desktop that will start 4 instances of one program and assign each instance to a seperate core.

    Does anyone know how to do this?

    At the moment, I am opening each one and manually setting the affinity, which is a pain.

    Thanks

    Edit: Im on XP home.
    Quote Originally Posted by Blitzen View Post
    stupid betond belief.
    You owe it to yourself to click here really.

  2. #2
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,164
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts
    Why are you wanting too assign the affinity manually?

    It often is better too let the OS handle this.

    If they are all placing equal demands this is, you doo get a form of 'bucketing' by manually assigning affinities.
    throw new ArgumentException (String, String, Exception)

  3. #3
    Chaos Monkey Apex's Avatar
    Join Date
    Jul 2003
    Location
    Huddersfield
    Posts
    4,528
    Thanks
    957
    Thanked
    233 times in 163 posts
    • Apex's system
      • Motherboard:
      • Asus Z87M-PLUS
      • CPU:
      • Intel i5-4670K
      • Memory:
      • 32 GiB
      • Storage:
      • 14 TiB
      • Graphics card(s):
      • R9 480X 8Gib
      • PSU:
      • 750
      • Case:
      • Core View 21
      • Operating System:
      • Windows 10 pro
      • Monitor(s):
      • Dell S2721DGFA
      • Internet:
      • 200Mb nTL Cable
    +cpu0 i think is the cmd line you need to set in the shortcut to force it to a core, not sure try it out



  4. #4
    radix lecti dave87's Avatar
    Join Date
    Sep 2005
    Location
    England
    Posts
    12,806
    Thanks
    657
    Thanked
    931 times in 634 posts
    • dave87's system
      • Motherboard:
      • Asus
      • CPU:
      • i5 3470k under Corsair H80 WC
      • Memory:
      • 8gb DDR3
      • Storage:
      • 240gb SSD + 120gb SSD
      • Graphics card(s):
      • Asus HD7950
      • PSU:
      • XFX 600w Modular
      • Case:
      • Lian Li PC-A05FNB + Acoustipack
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • 2x Dell S2309W (1920x1080)
      • Internet:
      • BT Infinity Option 2
    I'm guessing he means to stress test the system in a similar way to Orthos?

    Not sure on how you would code it, but once setup, doesn't it stay setup?

  5. #5
    Flat cap, Whippets, Cave. Clunk's Avatar
    Join Date
    Jan 2006
    Posts
    11,056
    Thanks
    360
    Thanked
    725 times in 459 posts
    Quote Originally Posted by TheAnimus View Post
    Why are you wanting too assign the affinity manually?

    It often is better too let the OS handle this.

    If they are all placing equal demands this is, you doo get a form of 'bucketing' by manually assigning affinities.
    You are right, but in this instance, i need to assign 1 core to 1 instance of SP2004, its just for stress testing. If I let the O/S decide what to do, it bottlenecks everything to one or two cores and sends the pagefile slightly mental.

    Quote Originally Posted by Apex View Post
    +cpu0 i think is the cmd line you need to set in the shortcut to force it to a core, not sure try it out
    Yes, I remember doing it for an old version of prime to run on dual core, but I wasnt sure how to include it in a batch file (or whatever kind of file I need to use).

    Quote Originally Posted by dave87 View Post
    I'm guessing he means to stress test the system in a similar way to Orthos?

    Not sure on how you would code it, but once setup, doesn't it stay setup?
    Yes, just like orthos, only 2 x orthos doesnt play nice for me for some reason, and 4 x sp2004, which is the same, plays fine

    When you set the affinity manually, its per session. If I could make it permanent, I could make a little batch file to start the 4 x exes i think. That would probably make it easier.
    Quote Originally Posted by Blitzen View Post
    stupid betond belief.
    You owe it to yourself to click here really.

  6. #6
    radix lecti dave87's Avatar
    Join Date
    Sep 2005
    Location
    England
    Posts
    12,806
    Thanks
    657
    Thanked
    931 times in 634 posts
    • dave87's system
      • Motherboard:
      • Asus
      • CPU:
      • i5 3470k under Corsair H80 WC
      • Memory:
      • 8gb DDR3
      • Storage:
      • 240gb SSD + 120gb SSD
      • Graphics card(s):
      • Asus HD7950
      • PSU:
      • XFX 600w Modular
      • Case:
      • Lian Li PC-A05FNB + Acoustipack
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • 2x Dell S2309W (1920x1080)
      • Internet:
      • BT Infinity Option 2
    The only way I can think of doing it, is to have 4 installs, and then have 4 shortcuts with a command line switch to tell it which core to use. You'll have to check the sp2004 documentation as to whether it will acknowledge the command line switches.

  7. #7
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,164
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts
    Windows its easy too make a .bat file launch apps.

    START "cmd.exe"
    START "cmd.exe"
    START "cmd.exe"
    START "cmd.exe"

    in a .bat file will start 4 command prompts.

    START launches it as a new proccess, rather than waiting for it too finish before moving onto the next.
    throw new ArgumentException (String, String, Exception)

  8. #8
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    and remember kids, that's infinitely easier than "cmd &" on *nix

  9. #9
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,164
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts
    twas actually RISC OS i was trying too think how you would do it on

    (free beer for the first right awnser!)

    But actually i prefer the start syntax from a sense point of view (how does the derivation of & mean run in background?)
    throw new ArgumentException (String, String, Exception)

  10. #10
    Late Night Ninja! CrazyMonkey's Avatar
    Join Date
    Oct 2006
    Location
    Bristol
    Posts
    1,510
    Thanks
    29
    Thanked
    44 times in 43 posts
    • CrazyMonkey's system
      • Motherboard:
      • Asus M4N98TD Evo
      • CPU:
      • Phenom II X6 1055T @ 4.1ghz
      • Memory:
      • 8GB DDR3 Dominator @ 1700mhz
      • Storage:
      • 120GB OCZ Vertex 2E - 1TB Hitatchi
      • Graphics card(s):
      • 2x 460 1GB
      • PSU:
      • 850W
      • Case:
      • Silverstone Fortress FT02R-WRI Ltd.Edition
      • Operating System:
      • Win 7, XP, Server2008 RC1, Gentoo
      • Monitor(s):
      • 24" Acer LED - 22" Belinea - 19" Samsung - 19" IIyama
      • Internet:
      • 50 MB Virgin Media Cable
    Batch file and include "+cpu0" as a parameter

    Either use "START" or "EXEC"

  11. #11
    NOT Banned
    Join Date
    Jan 2007
    Posts
    5,905
    Thanks
    412
    Thanked
    278 times in 253 posts
    here you go clunk,
    http://rapidshare.com/files/30906109/imagecfg.rar

    all instructions in there. dunno how to autostart sp2004 auto so you'll still have to click the stress button for each one

  12. #12
    Flat cap, Whippets, Cave. Clunk's Avatar
    Join Date
    Jan 2006
    Posts
    11,056
    Thanks
    360
    Thanked
    725 times in 459 posts
    Quote Originally Posted by moogle View Post
    here you go clunk,
    http://rapidshare.com/files/30906109/imagecfg.rar

    all instructions in there. dunno how to autostart sp2004 auto so you'll still have to click the stress button for each one
    When I click on the run.bat, it only opens one instance of sp2004 and a command prompt.

    If I manually open 4 instances of sp2004 and then run the other bat file, it sets them all to core 0.

    Unless Ive done something wrong.

    I put 4 instances of the sp2004.exe in the folder and renamed them to core0.exe, core1.exe, core2.exe, core3.exe.

    Quote Originally Posted by Blitzen View Post
    stupid betond belief.
    You owe it to yourself to click here really.

  13. #13
    NOT Banned
    Join Date
    Jan 2007
    Posts
    5,905
    Thanks
    412
    Thanked
    278 times in 253 posts
    ya my bad, the run.bat doesnt work. that was just to help you run them all at once. when run manually they work for me. core 0 and 1 on the correct cores. as long as set core has run on the files all you need to do is run each one.

  14. #14
    Flat cap, Whippets, Cave. Clunk's Avatar
    Join Date
    Jan 2006
    Posts
    11,056
    Thanks
    360
    Thanked
    725 times in 459 posts
    core0.exe is assigned correctly
    core1.exe is assigned correctly
    core2.exe is assigned correctly
    core3.exe is assigned to cpu core 0 and core 1, so I have to change them manually.

    Quote Originally Posted by Blitzen View Post
    stupid betond belief.
    You owe it to yourself to click here really.

  15. #15
    NOT Banned
    Join Date
    Jan 2007
    Posts
    5,905
    Thanks
    412
    Thanked
    278 times in 253 posts
    Quote Originally Posted by Clunk View Post
    core0.exe is assigned correctly
    core1.exe is assigned correctly
    core2.exe is assigned correctly
    core3.exe is assigned to cpu core 0 and core 1, so I have to change them manually.



    http://www.robpol86.com/Pages/imagecfg.php

    thats the usage, try changing set core.bat to
    Code:
    :: Run.bat
    :: Sets the Affinity of Core 0 - 3.exe (For Quad Cores)
    ::
    @echo off
    echo Setting Core0.exe Affinity
    imagecfg -u Core0.exe
    imagecfg -a 0x1 Core0.exe
    echo Setting Core1.exe Affinity
    imagecfg -u Core1.exe
    imagecfg -a 0x2 Core1.exe
    echo Setting Core2.exe Affinity
    imagecfg -u Core2.exe
    imagecfg -a 0x3 Core2.exe
    echo Setting Core3.exe Affinity
    imagecfg -u Core3.exe
    imagecfg -a 0x4 Core3.exe
    echo All Done
    pause

  16. #16
    Registered+ Zathras's Avatar
    Join Date
    Jul 2003
    Location
    Canary Wharf/Richmond
    Posts
    1,454
    Thanks
    13
    Thanked
    7 times in 4 posts
    Quote Originally Posted by TheAnimus View Post
    twas actually RISC OS i was trying too think how you would do it on

    (free beer for the first right awnser!)
    I'd probably use a Filer_Run in an Obey file to start multiple multitasking tasks from the same batch file. Of course, RISC OS has no support for multiple-core processors!

    There're other ways of doing it: Wimp_StartTask for one, using a TaskObey file etc....

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 63
    Last Post: 14-11-2011, 09:17 AM
  2. Windows - a brief guide inside
    By Paul Adams in forum Software
    Replies: 31
    Last Post: 23-06-2007, 03:14 PM
  3. right click menu
    By shiato storm in forum Help! Quick Relief From Tech Headaches
    Replies: 0
    Last Post: 15-01-2006, 11:45 PM
  4. How do you backup?
    By Howard in forum PC Hardware and Components
    Replies: 48
    Last Post: 05-01-2005, 09:05 AM
  5. Can someone make me a simple program?
    By Applecrusher in forum Software
    Replies: 3
    Last Post: 08-06-2004, 04:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •