[cig-commits] [commit] devel: fixed a Makefile issue in Scotch that prevented the use of the --always-make compiler option (c7475fd)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Oct 31 20:27:22 PDT 2014


Repository : https://github.com/geodynamics/specfem3d

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d/compare/bf83cf9d236d8ed266f0a67f698df33f39d799d2...c7475fd92655192fa2da88247549f99195ce5352

>---------------------------------------------------------------

commit c7475fd92655192fa2da88247549f99195ce5352
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Sat Nov 1 03:34:08 2014 +0100

    fixed a Makefile issue in Scotch that prevented the use of the --always-make compiler option


>---------------------------------------------------------------

c7475fd92655192fa2da88247549f99195ce5352
 src/decompose_mesh/scotch_5.1.12b/src/Makefile     | 27 +++-------------------
 .../scotch_5.1.12b/src/libscotch/library_version.c | 11 ++++++---
 .../scotch_5.1.12b/src/scotch/Makefile             |  1 +
 src/meshfem3D/meshfem3D.f90                        |  2 +-
 4 files changed, 13 insertions(+), 28 deletions(-)

diff --git a/src/decompose_mesh/scotch_5.1.12b/src/Makefile b/src/decompose_mesh/scotch_5.1.12b/src/Makefile
index 178f8f8..263c327 100644
--- a/src/decompose_mesh/scotch_5.1.12b/src/Makefile
+++ b/src/decompose_mesh/scotch_5.1.12b/src/Makefile
@@ -34,25 +34,12 @@ VERSION	= 5
 RELEASE = 1
 PATCHLEVEL = 12
 
-.PHONY				:	clean	default	install	ptscotch	realclean	required	scotch
+.PHONY				:	clean	default	install	realclean	required	scotch
 
 default				:	scotch
 
 required			:	Makefile.inc	../bin	../include	../lib
 
-Makefile.inc			:
-					@echo "#####################################################################"
-			        	@echo "BEFORE COMPILING Scotch OR PT-Scotch, YOU SHOULD HAVE AN APPROPRIATE"
-					@echo "Makefile.inc FILE IN THIS DIRECTORY. PLEASE LOOK INTO DIRECTORY"
-	        			@echo " ./Make.inc FOR AN EXISTING Makefile.inc FILE THAT FITS YOUR NEED, OR"
-		        		@echo "USE THEM AS MODELS IN CASE YOU NEED TO BUILD A NEW ONE FOR YOUR"
-		        		@echo "PARTICULAR PLATFORM."
-			        	@echo "#####################################################################"
-			        	@echo "Then, type \"make scotch\" (default) for the sequential library"
-			        	@echo "and software, or \"make ptscotch\" for the parallel library and"
-			        	@echo "software."
-					@exit 1
-
 include Makefile.inc
 
 prefix		?= /usr/local
@@ -90,14 +77,8 @@ $(mandir)/man1			:	$(mandir)
 					-$(MKDIR) $(mandir)/man1
 
 scotch				:	required
-					(cd libscotch ;      $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
-					(cd scotch ;         $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
-					(cd libscotchmetis ; $(MAKE)                                                                scotch && $(MAKE) install)
-
-ptscotch			:	required
-					(cd libscotch ;      $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) ptscotch && $(MAKE) ptinstall)
-					(cd scotch ;         $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) ptscotch && $(MAKE) ptinstall)
-					(cd libscotchmetis ; $(MAKE)                                                                ptscotch && $(MAKE) ptinstall)
+					(cd libscotch ;      $(MAKE) scotch ; $(MAKE) install)
+					(cd scotch ;         $(MAKE) scotch ; $(MAKE) install)
 
 install				:	required	$(bindir)	$(includedir)	$(libdir)	$(mandir)/man1
 					-$(CP) -f ../bin/[agm]*$(EXE) $(bindir)
@@ -108,10 +89,8 @@ install				:	required	$(bindir)	$(includedir)	$(libdir)	$(mandir)/man1
 clean				:	required
 					(cd libscotch ;      $(MAKE) clean)
 					(cd scotch ;         $(MAKE) clean)
-					(cd libscotchmetis ; $(MAKE) clean)
 
 realclean			:	required
 					(cd libscotch ;      $(MAKE) realclean)
 					(cd scotch ;         $(MAKE) realclean)
-					(cd libscotchmetis ; $(MAKE) realclean)
 					-$(RM) ../bin/* ../include/* ../lib/*
diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version.c
index 9147f9a..af3b645 100644
--- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version.c
+++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version.c
@@ -76,7 +76,12 @@ int * const                 versptr,
 int * const                 relaptr,
 int * const                 patcptr)
 {
-  *versptr = SCOTCH_VERSION;
-  *relaptr = SCOTCH_RELEASE;
-  *patcptr = SCOTCH_PATCHLEVEL;
+//  *versptr = SCOTCH_VERSION;
+//  *relaptr = SCOTCH_RELEASE;
+//  *patcptr = SCOTCH_PATCHLEVEL;
+
+// DK DK hardwired this to avoid compilation problems on some machines
+  *versptr = 5;
+  *relaptr = 1;
+  *patcptr = 12;
 }
diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/Makefile b/src/decompose_mesh/scotch_5.1.12b/src/scotch/Makefile
index b091be4..2b9d9af 100644
--- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/Makefile
+++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/Makefile
@@ -33,6 +33,7 @@
 bindir		= ../../bin
 includedir	= ../../include
 libdir		= ../../lib
+SCOTCHLIB=scotch
 
 ##
 ##  General inference rules.
diff --git a/src/meshfem3D/meshfem3D.f90 b/src/meshfem3D/meshfem3D.f90
index ec2d9f0..22ead68 100644
--- a/src/meshfem3D/meshfem3D.f90
+++ b/src/meshfem3D/meshfem3D.f90
@@ -418,7 +418,7 @@
       ! done with mesher
       stop 'Done creating a chunk of the earth Mesh (HEX8 elements), see directory MESH/'
 
-    elseif (NGNOD == 27) then
+    else if (NGNOD == 27) then
       ! creates mesh in MESH/
 !! to uncomment when finished ==> call earth_chunk_HEX27_Mesher()
       ! done with mesher



More information about the CIG-COMMITS mailing list