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 8543413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:17:44+00:00 2026-06-11T12:17:44+00:00

I am wonder why these two commands return two different results. First one is:

  • 0

I am wonder why these two commands return two different results. First one is:

[root@node30 par-run-d2]# make -C NQU/
make: Entering directory `/home/ut/gpgpu-sim/benchmarks/par-run-d2/NQU'
nvcc  -c -arch sm_11 --keep --compiler-options -fno-strict-aliasing \
        -I. -I/usr/local/cuda//include/ -I/home/ut/NVIDIA_GPU_Computing_SDK/C//common/inc/ \
          -L/home/ut/NVIDIA_GPU_Computing_SDK/C//lib -lcutil -DUNIX nqueen.cu -o nqueen 
nqueen.cu(681): warning: variable "start" was declared but never referenced

nqueen.cu(681): warning: variable "end" was declared but never referenced

nqueen.cu(681): warning: variable "start" was declared but never referenced

nqueen.cu(681): warning: variable "end" was declared but never referenced

gcc -g -c nqueen.cu.cpp -o nqueen.cu_o
echo ../../..
../../..
../../../scripts/gen_ptxinfo
Generating nqueen.ptxinfo...
make: *** [nqueen.cu_o] Error 255
make: Leaving directory `/home/ut/gpgpu-sim/benchmarks/par-run-d2/NQU'

And the second one is:

[root@node30 par-run-d2]# cd NQU/
[root@node30 NQU]# make
g++  -g nqueen.cu_o -L../../../libcuda/ -lcuda \
        -L/home/ut/NVIDIA_GPU_Computing_SDK/C//lib -lcutil \
        -L../../../src/ -lgpgpusim \
        -L../../../src/intersim -lintersim \
        -L../../../src/cuda-sim/ -lgpgpu_ptx_sim \
        -lm -lz -lGL   -o gpgpu_ptx_sim__nqueen
rm -rf *.cpp*.i *.cpp*.ii *.cu.c *.cudafe*.* *.fatbin.c *.cu.cpp *.linkinfo *.cpp_o core *.cubin cubin.bin *_o *.hash nqueen

Any idea why “make -C X” differs from “cd X/; make” ?

  • 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-11T12:17:45+00:00Added an answer on June 11, 2026 at 12:17 pm

    The sequence cd X; make is changing the current directory of the invoking shell (the interactive shell of your terminal). Make that a sub-shell like (cd X; make) to avoid that, which is much longer to type than make -C X which does the chdir syscall inside the make process so cannot change the working directory of the parent process (your interactive shell usually).

    Also the -w flag behavior would be different. And most recursive $(MAKE) in Makefile-s are doing a -C somesubdir

    PS. Remember that the cd shell built-in invokes the chdir(2) syscall which has no effect on the parent process.

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

Sidebar

Related Questions

I wonder what these two words mean. I encountered them in Doctrine's documentation ,
I wonder how apps like these generate screenshots for different browsers. Are they using
I wonder why these two code doesn't produce the same plot? code 1: x=[2,5,7];
I wonder what is the difference between these two: gcc -s : Remove all
i wonder what the difference is between these two declarations: var delay = (function()
Can someone explain what the different between these two instantiations of the ArrayList class?
I wonder what is the difference between these two approaches. They both work but
I wonder, what are the pros and the cons of these two approaches to
I wonder what is the keyboard shortcut for these two combo boxs and specially
I came across these two somewhat similar things. In one of my applications, there

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.