9 Replies - 1596 Views - Last Post: 27 November 2009 - 11:55 PM Rate Topic: -----

#1 joshp523   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 25-November 09

Trying to run a C program in Unix

Posted 25 November 2009 - 09:05 PM

I just want to be able to run the "random" graph generator. I'm using UNIX and tried using the "make" command but it says such a file does not exist.

Here is the link to download what I'm talking about: https://sdm.lbl.gov/...raph/index.html

As you'll see the zip contains 4 graph generators, the only one I'm trying to run is located in the folder named "random." Thank you for any and all help. I'm sure I'm just doing something silly, but I have no one else to ask for help at this time.

-Josh

Is This A Good Question/Topic? 0
  • +

Replies To: Trying to run a C program in Unix

#2 Guest_c.user*


Reputation:

Re: Trying to run a C program in Unix

Posted 25 November 2009 - 10:42 PM

run make in the Makefile folder (the root folder)
but I needed to change the Makefile.var

CC = icc
to
CC = gcc

it created a binary in the random folder GTgraph-random
Was This Post Helpful? 0

#3 joshp523   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 25-November 09

Re: Trying to run a C program in Unix

Posted 27 November 2009 - 01:55 PM

View Postc.user, on 25 Nov, 2009 - 09:42 PM, said:

run make in the Makefile folder (the root folder)
but I needed to change the Makefile.var

CC = icc
to
CC = gcc

it created a binary in the random folder GTgraph-random


I'm running make in the "random" folder, but how do I change the Makefile.var? Are you saying to compile everything in the random folder with gcc or did you mean something else? Thanks for your help.
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6727
  • View blog
  • Posts: 31,155
  • Joined: 10-May 07

Re: Trying to run a C program in Unix

Posted 27 November 2009 - 02:00 PM

If there is only one source code file, I would just run make file.c & it should auto link it for you. Can you show us how you are trying to build this executable?
Was This Post Helpful? 0
  • +
  • -

#5 Guest_c.user*


Reputation:

Re: Trying to run a C program in Unix

Posted 27 November 2009 - 04:21 PM

joshp523 said:

I'm running make in the "random" folder

I didn't check it but because I ran the root Makefile

i.e.
cd ..; make;

it compiled properly
there are two files over the random folder, Makefile and Makefile.var
that Makefile.var I changed
Was This Post Helpful? 0

#6 joshp523   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 25-November 09

Re: Trying to run a C program in Unix

Posted 27 November 2009 - 06:47 PM

View Postno2pencil, on 27 Nov, 2009 - 01:00 PM, said:

If there is only one source code file, I would just run make file.c & it should auto link it for you. Can you show us how you are trying to build this executable?


Sure. Here is the link to download what I'm talking about: https://sdm.lbl.gov/...raph/index.html. It will help greatly to download this zip in order to test for yourself and be able to follow along with what I'm trying to explain.

When downloaded you'll notice the main folder is GTgraph containing Makefile, Makefile.var, README, an adobe doc, and folders called "random," "R-MAT," "sprng2.0-lite," and"SSCA2." These four folders are random graph generators. I am trying to use only the one called "random," which contains multiple source files, header files, and one Makefile.var.

I've been trying to run this graph generator in Unix by typing
 make 
while in GTgraph\random. Right now the error returned is
 
make: icc: Command not found
make: *** [graph.o] Error 127


Was This Post Helpful? 0
  • +
  • -

#7 ccubed   User is offline

  • It's That Guy
  • member icon

Reputation: 164
  • View blog
  • Posts: 1,416
  • Joined: 13-June 08

Re: Trying to run a C program in Unix

Posted 27 November 2009 - 11:29 PM

Like c.user said, for whatever reason, they mistyped GCC and put ICC instead. The program they want is gcc.
Was This Post Helpful? 0
  • +
  • -

#8 Oler1s   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1397
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Trying to run a C program in Unix

Posted 27 November 2009 - 11:32 PM

icc is intel's compiler. It's not a typo. They clearly intended the default to be compilation through Intel's compiler.

This post has been edited by Oler1s: 27 November 2009 - 11:32 PM

Was This Post Helpful? 0
  • +
  • -

#9 ccubed   User is offline

  • It's That Guy
  • member icon

Reputation: 164
  • View blog
  • Posts: 1,416
  • Joined: 13-June 08

Re: Trying to run a C program in Unix

Posted 27 November 2009 - 11:42 PM

View PostOler1s, on 27 Nov, 2009 - 10:32 PM, said:

icc is intel's compiler. It's not a typo. They clearly intended the default to be compilation through Intel's compiler.


People still use it? I didn't even know they were still developing it. Still, I haven't seen many things that use ICC as default over GCC or other.
Was This Post Helpful? 0
  • +
  • -

#10 Oler1s   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1397
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Trying to run a C program in Unix

Posted 27 November 2009 - 11:55 PM

Quote

People still use it? I didn't even know they were still developing it. Still, I haven't seen many things that use ICC as default over GCC or other.
Depends on what you're programming. Of course they develop it, and more actually. Intel's waving the performance flag in all of their products, so if you're into that level of optimisation or things like cluster programming, high performance BLAS, inspecting and improving multicore programming, Intel does have a serious suite of products for that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1