Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added recipe for scotch #1427

Merged
merged 32 commits into from
Oct 16, 2016
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ecf9d3e
Add license
basnijholt Aug 30, 2016
5ad5a14
Add build recipe
basnijholt Aug 30, 2016
4e3dc89
Edit [win] selector
basnijholt Aug 30, 2016
3cf9e8a
Correct name of LICENSE
basnijholt Aug 30, 2016
74a83b6
Correct selectors of [linux]
basnijholt Aug 30, 2016
8e2bbb8
Add Jinja templates
basnijholt Aug 30, 2016
a72d719
Correct md5
basnijholt Aug 30, 2016
f5ea92b
Correct [osx] selector
basnijholt Aug 30, 2016
440d5a5
Add test section
basnijholt Aug 30, 2016
2962671
Suggestions jakirkham
basnijholt Aug 30, 2016
afd3266
Remove libgcc
basnijholt Aug 30, 2016
ce06309
toolchain -> gcc
basnijholt Aug 30, 2016
0bffdd0
Remove sed, add -L/lib, add bison, flex, and toolchain, remove libgcc
basnijholt Aug 31, 2016
abcbff5
library search path
basnijholt Aug 31, 2016
904a2b4
PREFIX in include path
basnijholt Aug 31, 2016
86bbec6
Rename Makefile.inc.i686_mac_darwin10
basnijholt Aug 31, 2016
9470b2b
Remove clock_gettime.patch
basnijholt Aug 31, 2016
ef9c127
Exclude test
basnijholt Aug 31, 2016
31a58b4
Add test for /lib/ files
basnijholt Aug 31, 2016
6bb7c0c
Merge pull request #3 from conda-forge/master
basnijholt Sep 20, 2016
1c8e316
More jinja templating
basnijholt Sep 24, 2016
2c6496b
gcc -> clang
basnijholt Sep 24, 2016
7d376d6
Test for installed header files
basnijholt Sep 24, 2016
3b65579
Template friendly url
basnijholt Sep 26, 2016
5c36d65
Add lib and include path in MacOS build file
basnijholt Sep 26, 2016
e92001e
Run executables in test
basnijholt Sep 26, 2016
42e220b
Merge remote-tracking branch 'upstream/master'
basnijholt Sep 27, 2016
a4d5035
conda-forge zlib for OSX
basnijholt Oct 3, 2016
d87384b
shared libs
basnijholt Oct 3, 2016
1423d7a
Revert to non shared lib
basnijholt Oct 3, 2016
5a3c137
fix test
basnijholt Oct 3, 2016
763fcbd
Revert to working commit
basnijholt Oct 3, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions recipes/scotch/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

cd src/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./configure?

echo 'prefix = $PREFIX' > Makefile.inc
echo '' >> Makefile.inc
if [ `uname` == "Darwin" ]; then
cp Make.inc/Makefile.inc.i686_mac_darwin10 Makefile.inc
sed -i '' 's/-DSCOTCH_PTHREAD//g' Makefile.inc
sed -i '' 's/-O3/-O3 -fPIC/g' Makefile.inc
else
cp Make.inc/Makefile.inc.x86-64_pc_linux2 Makefile.inc
sed -i "s@CFLAGS\t\t=@CFLAGS\t= -I${PREFIX}/include@" Makefile.inc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to do this for the library search path too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why or how?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would be to pick up zlib.

How would be to add -L${PREFIX}/lib. Though I really am hoping they have a configure file we overlooked.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I looked at the source briefly. They don't have a configure. 😖

My recommendation would be to copy these files into the recipe and modify them as you see fit. We did this with SuiteSparse and had much success. Keeping this sed stuff is more likely to cause you hurt later on.

sed -i "s@CLIBFLAGS\t=@CLIBFLAGS\t= -fPIC@g" Makefile.inc
sed -i 's#-l$(SCOTCHLIB)errexit#-l$(SCOTCHLIB)errexit -lm#g' esmumps/Makefile
fi
make esmumps | tee make.log 2>&1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make check or similar?

make check
cd ..

# install.
mkdir -p $PREFIX/lib/
cp lib/* $PREFIX/lib/
mkdir -p $PREFIX/bin/
cp bin/* $PREFIX/bin/
mkdir -p $PREFIX/include/
cp include/* $PREFIX/include/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No make install?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No make install?

make esmumps also does make install too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that's confusing. Why do we need to copy stuff over then?

18 changes: 18 additions & 0 deletions recipes/scotch/clock_gettime.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- src/libscotch/common.c (revision 22563)
+++ src/libscotch/common.c (working copy)
@@ -104,7 +104,14 @@
#else /* COMMON_TIMING_OLD */
struct timespec tp;

- clock_gettime (CLOCK_REALTIME, &tp); /* Elapsed time */
+#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
+ clock_gettime(CLOCK_REALTIME, &tp);
+#else
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ tp.tv_sec = tv.tv_sec;
+ tp.tv_nsec = tv.tv_usec * 1000;
+#endif

return ((double) tp.tv_sec + (double) tp.tv_nsec * 1.0e-9L);
#endif /* COMMON_TIMING_OLD */
46 changes: 46 additions & 0 deletions recipes/scotch/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% set name = "scotch" %}
{% set version = "6.0.4" %}
{% set md5 = "d58b825eb95e1db77efe8c6ff42d329f" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
fn: scotch_{{ version }}.tar.gz
md5: {{ md5 }}
url: http://gforge.inria.fr/frs/download.php/file/34618/scotch_6.0.4.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scotch_6.0.4.tar.gz -> scotch_{{ version }}.tar.gz. That should make it easier to update. 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please template the version with jinja here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it, but because the number in the url changes for every file I initially didn't.

patches:
- clock_gettime.patch # [osx]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this patch? Has it been submitted upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I don't know. It was done in another recipe I found and on the homebrew version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one. If so, I'm not seeing the patch. I did see a similarly named patch for Perl. In any event, I think we can drop this.


build:
skip: true # [win]
number: 0

requirements:
build:
- gcc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop and replace with toolchain.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This configures compilation on the OSes to use the system toolchains. On OS X, we use clang. On Linux, we use gcc from devtoolset-2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reversed the change again, because it didn't compile:

/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lz

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hear that this is a problem, but this isn't the right fix. Please re-reverse it and look at comment.

- zlib 1.2.* # [linux]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to unix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have bison and flex. It looks like they would come in handy here.

run:
- zlib 1.2.* # [linux]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to unix.

- libgcc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to ship libgcc as we are dependent only on system libraries that the system toolchains use.


test:
commands:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a bunch of executables that are installed. Can we please run --help or --version or similar to check that they do run without crashing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a few.

- test # [osx]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check to make sure all files are installed correctly? Is there a CLI that we can use to run --help, --version, or similar?


about:
home: https://www.labri.fr/perso/pelegrin/scotch/
license: CeCILL-C
license_file: LICENSE_en.txt
summary: 'SCOTCH: Static Mapping, Graph, Mesh and Hypergraph Partitioning, and Parallel and Sequential Sparse Matrix Ordering Package'
description: |
Software package and libraries for sequential and parallel
graph partitioning, static mapping and clustering, sequential
mesh and hypergraph partitioning, and sequential and parallel
sparse matrix block ordering.
doc_url: http://gforge.inria.fr/docman/?group_id=248

extra:
recipe-maintainers:
- basnijholt