Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8732819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:30:41+00:00 2026-06-13T09:30:41+00:00

I have an mpi program and managed to compile and link it via Xcode

  • 0

I have an mpi program and managed to compile and link it via Xcode 4.
Now I want to debug it using Xcode 4.

How can I pipe the standard input to the program from a file?

In terminal I would type

mpirun -np 2 program < input.txt

I am able to run the program defining a custom executable (mpirun) in the “Info” panel of the Scheme editor, I also know that I can pass arguments in the “Arguments” panel. But Xcode 4 does not seem to accept “< input.txt” as an argument, even if I check “Use custom working directory” + add the correct directory of the input script in the “Options” panel.

This article Says it is possible to use “< input.txt” as an argument, but I guess that worked in Xcode 2 or Xcode 3, but it does not seem to work in Xcode 4 anymore.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:30:42+00:00Added an answer on June 13, 2026 at 9:30 am

    In Xcode 4.5.1:

    1. Open the scheme editor (Product menu -> Edit Scheme…)
    2. Select the Run Debug scheme
    3. In the ‘Info’ tab panel, change the ‘Launch’ radio button selection from ‘Automatically’ to ‘Wait for MyApp.app to launch’
    4. Close the scheme editor
    5. Press the Run button to build and run your target. (Xcode’s status window in the toolbar will show ‘Waiting for MyApp to launch’)
    6. Launch Terminal and cd to your built application’s folder. (It will be something like /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dmzfrqdevydjuqbexdivolfeujsj/Build/Products/Debug / )
    7. Launch your app piping in whatever you want into standard input:

      echo mydata | ./MyApp.app/Contents/MacOs/MyApp
      
    8. Switch back to Xcode and the debugger will have detected your application’s launch and attached to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have an MPI program written in C and I want to use
I am using MPI2.2 standard to write parallel program in C. I have 64
i'm working with supercomputer, using MPI. but problem in.. C++ have a program, which
I'm trying to write a program using MPI and I have a question that
Ok, this is a really weird one. I have an MPI program, where each
I'm writing an MPI C program. I have troubles debugging it, because whenever I
i have an issue with synchronizing Master/slaves processes using MPI. I wish that the
I had a problem with a program that uses MPI and I have just
I have a strange problem freeing allocated memory in my mpi program: Here is
I use VS2k8 to write and compile (but not run) a program using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.