Parcourir la source

environment module

Julien Dehos il y a 7 ans
Parent
commit
a819b1470f

+ 0 - 14
test_module/run/gafip.mod

@@ -1,14 +0,0 @@
-#%Module -*- tcl -*-
-
-proc ModulesHelp { } {
-        puts stderr "The gafip module" 
-}
-
-module-whatis "genetic algorithms for image processing"
-
-module load OpenCV
-module load Python
-
-append-path  PATH             /nfs/home/lisic/jdehos/opt/bin
-append-path  LD_LIBRARY_PATH  /nfs/home/lisic/jdehos/opt/lib
-append-path  PYTHONPATH       /nfs/home/lisic/jdehos/opt/lib

+ 11 - 0
test_module/run/mytest.mod

@@ -0,0 +1,11 @@
+#%Module -*- tcl -*-
+
+proc ModulesHelp { } {
+        puts stderr "my test module" 
+}
+
+module-whatis "my test module"
+
+append-path  PATH             /nfs/home/lisic/jdehos/opt/bin
+append-path  LD_LIBRARY_PATH  /nfs/home/lisic/jdehos/opt/lib
+

+ 6 - 0
test_module/src/mylib.cpp

@@ -0,0 +1,6 @@
+#include "mylib.hpp"
+
+int doubler(int x) {
+    return 2*x;
+}
+

+ 7 - 0
test_module/src/mylib.hpp

@@ -0,0 +1,7 @@
+#ifndef MYLIB_HPP_
+#define MYLIB_HPP_
+
+int doubler(int x);
+
+#endif
+

+ 14 - 0
test_module/src/mymain.cpp

@@ -0,0 +1,14 @@
+#include "mylib.hpp"
+
+#include <iostream>
+#include <stdlib.h>
+
+int main(int argc, char ** argv) {
+    if (argc != 2) {
+        std::cout << "usage: " << argv[0] << " <x>\n";
+        exit(-1);
+    }
+    std::cout << doubler(atoi(argv[1])) << std::endl;
+    return 0;
+}
+