LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-14-2013, 06:00 AM   #1
sryzdn
Member
 
Registered: Feb 2013
Posts: 253

Rep: Reputation: 1
Setting the compiler


Hi,

The file I have enclosed is a shell script as a part of a package that should be modified according to compiler settings in my computer to get the code run.

I have MPICH installed with mpif90 and mpicc both in the following path: /usr/local/bin/mpif90\mpicc

The "make" command complains about not finding ifort, which is ok because I have no ifort. But all my trials to replace it with mpif90 have failed. I don't know how to add the "-DMPI" option.

Thanks for your help in advance.
Attached Files
File Type: txt getmachine.txt (12.1 KB, 23 views)
 
Old 10-14-2013, 06:11 AM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,090
Blog Entries: 3

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
line 100 uncomment it
Quote:
# echo 'DEFS=-DFLUSH -DMPI' >> makefile to
to
Quote:
echo 'DEFS=-DFLUSH -DMPI' >> makefile to
note the the uncoment of the pound sign.

line 194 uncomment
Quote:
# echo 'DEFS=-DMPI' >> makefile
to
Quote:
echo 'DEFS=-DMPI' >> makefile

Last edited by Drakeo; 10-14-2013 at 06:14 AM.
 
Old 10-14-2013, 07:45 AM   #3
sryzdn
Member
 
Registered: Feb 2013
Posts: 253

Original Poster
Rep: Reputation: 1
Thanks I uncommented the lines, but I am receiving the following error:

Quote:
$ make
/bin/sh getmachine gulp
make[1]: Entering directory `/home/sryzdn/Packages/GULP/Src/Linux'
/usr/local/bin/mpif90 -O3 -mp1 -I.. -DFLUSH -c ../datatypes.F90
gfortran: error: unrecognized command line option ‘-mp1’
make[1]: *** [datatypes.o] Error 1
make[1]: Leaving directory `/home/sryzdn/Packages/GULP/Src/Linux'
mv: cannot stat ‘gulp’: No such file or directory
make: *** [gulp] Error 1
 
Old 10-16-2013, 02:03 PM   #4
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,090
Blog Entries: 3

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
this program gives you options all the way through make sure you read your options.
Quote:
# PG compiler
# echo 'OPT=-fast' > makefile
# echo 'OPT1=-O1' >> makefile
# Intel compiler
echo 'OPT=-O3 -mp1 ' > makefile
echo 'OPT1=-O1' >> makefile
echo 'OPT2=-O3 -mp1 ' >> makefile
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting enironment variables for custom build of compiler amandeepgautam Red Hat 1 07-04-2012 02:07 PM
Setting up an arm cross compiler knobby67 Linux - Embedded & Single-board computer 1 09-29-2009 08:19 AM
problem setting up c compiler in toolchain slade17 Linux From Scratch 4 04-09-2007 06:59 PM
Python upgradation,setting compiler $PATH jared78 Linux - Newbie 9 01-20-2006 01:12 AM
setting environmental variable cc to a working compiler blathen Linux - Newbie 2 10-27-2003 01:30 AM


All times are GMT -5. The time now is 07:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration