-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug #1268: Use a Fortran program main for AMPIF
Co-authored-by: Sam White <white67@illinois.edu> Change-Id: Ice267d09db00ea295bedffdcbc0bbb5b2bef3b7c
- Loading branch information
1 parent
b64d465
commit 9aa1e4c
Showing
10 changed files
with
89 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
#include "ck.h" | ||
|
||
#ifndef __BIGSIM__ | ||
int main(int argc, char **argv) | ||
{ | ||
int stack_top=0; | ||
memory_stack_top = &stack_top; | ||
|
||
ConverseInit(argc, argv, (CmiStartFn) _initCharm, 0, 0); | ||
|
||
return 0; | ||
return charm_main(argc, argv); | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
program charmxx | ||
|
||
use iso_c_binding, only:c_char, c_ptr, c_null_ptr, c_loc | ||
implicit none | ||
integer :: i, argc, ierr | ||
integer, parameter :: arg_len = 256 | ||
character(kind=c_char, len=arg_len), dimension(:), allocatable, & | ||
& target :: raw_arguments | ||
type(c_ptr), dimension(:), allocatable :: argv | ||
|
||
argc = command_argument_count() + 1 | ||
|
||
allocate (raw_arguments(argc)) | ||
allocate (argv(argc+1)) | ||
|
||
do i = 1, argc | ||
call get_command_argument(i - 1, raw_arguments(i)) | ||
end do | ||
do i = 1, argc | ||
raw_arguments(i) = trim(adjustl(raw_arguments(i)))//char(0) | ||
end do | ||
do i = 1, argc | ||
argv(i) = c_loc(raw_arguments(i)) | ||
end do | ||
argv(argc+1) = c_null_ptr | ||
|
||
call charm_main_fortran_wrapper(argc, argv) | ||
|
||
if (allocated(argv)) deallocate(argv) | ||
if (allocated(raw_arguments)) deallocate(raw_arguments) | ||
|
||
end program charmxx |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters